/*-1* Copyright (c) 1999 Michael Smith <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer.9* 2. Redistributions in binary form must reproduce the above copyright10* notice, this list of conditions and the following disclaimer in the11* documentation and/or other materials provided with the distribution.12*13* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND14* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE15* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE16* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE17* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL18* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS19* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)20* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT21* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY22* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF23* SUCH DAMAGE.24*/2526#include <stand.h>27#include "bootstrap.h"28#include "libuboot.h"2930#if defined(LOADER_NET_SUPPORT)31#include "dev_net.h"32#endif3334/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */35void (*exitfn)(int) = exit;3637/*38* We could use linker sets for some or all of these, but39* then we would have to control what ended up linked into40* the bootstrap. So it's easier to conditionalise things41* here.42*43* XXX rename these arrays to be consistent and less namespace-hostile44*/4546/* Exported for libsa */47struct devsw *devsw[] = {48#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT)49&uboot_storage,50#endif51#if defined(LOADER_NET_SUPPORT)52&netdev,53#endif54NULL55};5657struct fs_ops *file_system[] = {58#if defined(LOADER_UFS_SUPPORT)59&ufs_fsops,60#endif61#if defined(LOADER_CD9660_SUPPORT)62&cd9660_fsops,63#endif64#if defined(LOADER_EXT2FS_SUPPORT)65&ext2fs_fsops,66#endif67#if defined(LOADER_NFS_SUPPORT)68&nfs_fsops,69#endif70#if defined(LOADER_TFTP_SUPPORT)71&tftp_fsops,72#endif73#if defined(LOADER_GZIP_SUPPORT)74&gzipfs_fsops,75#endif76#if defined(LOADER_BZIP2_SUPPORT)77&bzipfs_fsops,78#endif79NULL80};8182struct netif_driver *netif_drivers[] = {83#if defined(LOADER_NET_SUPPORT)84&uboot_net,85#endif86NULL,87};8889/* Exported for PowerPC only */90/*91* Sort formats so that those that can detect based on arguments92* rather than reading the file go first.93*/94extern struct file_format uboot_elf64;9596struct file_format *file_formats[] = {97&uboot_elf,98&uboot_elf64,99NULL100};101102/*103* Consoles104*/105extern struct console uboot_console;106107struct console *consoles[] = {108&uboot_console,109NULL110};111112113