1*9dc70af8SWarner Losh /*- 2*9dc70af8SWarner Losh * Copyright (c) 2008 Semihalf, Rafal Jaworowski 3*9dc70af8SWarner Losh * All rights reserved. 4*9dc70af8SWarner Losh * 5*9dc70af8SWarner Losh * Redistribution and use in source and binary forms, with or without 6*9dc70af8SWarner Losh * modification, are permitted provided that the following conditions 7*9dc70af8SWarner Losh * are met: 8*9dc70af8SWarner Losh * 1. Redistributions of source code must retain the above copyright 9*9dc70af8SWarner Losh * notice, this list of conditions and the following disclaimer. 10*9dc70af8SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 11*9dc70af8SWarner Losh * notice, this list of conditions and the following disclaimer in the 12*9dc70af8SWarner Losh * documentation and/or other materials provided with the distribution. 13*9dc70af8SWarner Losh * 14*9dc70af8SWarner Losh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*9dc70af8SWarner Losh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*9dc70af8SWarner Losh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*9dc70af8SWarner Losh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*9dc70af8SWarner Losh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*9dc70af8SWarner Losh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*9dc70af8SWarner Losh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*9dc70af8SWarner Losh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*9dc70af8SWarner Losh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*9dc70af8SWarner Losh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*9dc70af8SWarner Losh * SUCH DAMAGE. 25*9dc70af8SWarner Losh * 26*9dc70af8SWarner Losh */ 27*9dc70af8SWarner Losh 28*9dc70af8SWarner Losh #include <stand.h> 29*9dc70af8SWarner Losh #include "bootstrap.h" 30*9dc70af8SWarner Losh #include "libuboot.h" 31*9dc70af8SWarner Losh 32*9dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT) 33*9dc70af8SWarner Losh #include "dev_net.h" 34*9dc70af8SWarner Losh #endif 35*9dc70af8SWarner Losh 36*9dc70af8SWarner Losh /* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ 37*9dc70af8SWarner Losh void (*exitfn)(int) = exit; 38*9dc70af8SWarner Losh 39*9dc70af8SWarner Losh struct devsw *devsw[] = { 40*9dc70af8SWarner Losh #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) 41*9dc70af8SWarner Losh &uboot_storage, 42*9dc70af8SWarner Losh #endif 43*9dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT) 44*9dc70af8SWarner Losh &netdev, 45*9dc70af8SWarner Losh #endif 46*9dc70af8SWarner Losh NULL 47*9dc70af8SWarner Losh }; 48*9dc70af8SWarner Losh 49*9dc70af8SWarner Losh struct fs_ops *file_system[] = { 50*9dc70af8SWarner Losh #if defined(LOADER_UFS_SUPPORT) 51*9dc70af8SWarner Losh &ufs_fsops, 52*9dc70af8SWarner Losh #endif 53*9dc70af8SWarner Losh #if defined(LOADER_CD9660_SUPPORT) 54*9dc70af8SWarner Losh &cd9660_fsops, 55*9dc70af8SWarner Losh #endif 56*9dc70af8SWarner Losh #if defined(LOADER_EXT2FS_SUPPORT) 57*9dc70af8SWarner Losh &ext2fs_fsops, 58*9dc70af8SWarner Losh #endif 59*9dc70af8SWarner Losh #if defined(LOADER_NFS_SUPPORT) 60*9dc70af8SWarner Losh &nfs_fsops, 61*9dc70af8SWarner Losh #endif 62*9dc70af8SWarner Losh #if defined(LOADER_TFTP_SUPPORT) 63*9dc70af8SWarner Losh &tftp_fsops, 64*9dc70af8SWarner Losh #endif 65*9dc70af8SWarner Losh #if defined(LOADER_GZIP_SUPPORT) 66*9dc70af8SWarner Losh &gzipfs_fsops, 67*9dc70af8SWarner Losh #endif 68*9dc70af8SWarner Losh #if defined(LOADER_BZIP2_SUPPORT) 69*9dc70af8SWarner Losh &bzipfs_fsops, 70*9dc70af8SWarner Losh #endif 71*9dc70af8SWarner Losh NULL 72*9dc70af8SWarner Losh }; 73*9dc70af8SWarner Losh 74*9dc70af8SWarner Losh struct netif_driver *netif_drivers[] = { 75*9dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT) 76*9dc70af8SWarner Losh &uboot_net, 77*9dc70af8SWarner Losh #endif 78*9dc70af8SWarner Losh NULL, 79*9dc70af8SWarner Losh }; 80*9dc70af8SWarner Losh 81*9dc70af8SWarner Losh struct file_format *file_formats[] = { 82*9dc70af8SWarner Losh &uboot_elf, 83*9dc70af8SWarner Losh NULL 84*9dc70af8SWarner Losh }; 85*9dc70af8SWarner Losh 86*9dc70af8SWarner Losh extern struct console uboot_console; 87*9dc70af8SWarner Losh 88*9dc70af8SWarner Losh struct console *consoles[] = { 89*9dc70af8SWarner Losh &uboot_console, 90*9dc70af8SWarner Losh NULL 91*9dc70af8SWarner Losh }; 92