1183878Sraj/*- 2183878Sraj * Copyright (c) 2008 Semihalf, Rafal Jaworowski 3183878Sraj * All rights reserved. 4183878Sraj * 5183878Sraj * Redistribution and use in source and binary forms, with or without 6183878Sraj * modification, are permitted provided that the following conditions 7183878Sraj * are met: 8183878Sraj * 1. Redistributions of source code must retain the above copyright 9183878Sraj * notice, this list of conditions and the following disclaimer. 10183878Sraj * 2. Redistributions in binary form must reproduce the above copyright 11183878Sraj * notice, this list of conditions and the following disclaimer in the 12183878Sraj * documentation and/or other materials provided with the distribution. 13183878Sraj * 14183878Sraj * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15183878Sraj * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16183878Sraj * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17183878Sraj * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18183878Sraj * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19183878Sraj * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20183878Sraj * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21183878Sraj * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22183878Sraj * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23183878Sraj * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24183878Sraj * SUCH DAMAGE. 25183878Sraj * 26183878Sraj */ 27183878Sraj 28183878Sraj#include <sys/cdefs.h> 29183878Sraj__FBSDID("$FreeBSD$"); 30183878Sraj 31183878Sraj#include <stand.h> 32183878Sraj#include "bootstrap.h" 33183878Sraj#include "libuboot.h" 34183878Sraj 35183878Sraj#if defined(LOADER_NET_SUPPORT) 36183878Sraj#include "dev_net.h" 37183878Sraj#endif 38183878Sraj 39183878Srajstruct devsw *devsw[] = { 40183878Sraj#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) 41185099Sraj &uboot_storage, 42183878Sraj#endif 43183878Sraj#if defined(LOADER_NET_SUPPORT) 44183878Sraj &netdev, 45183878Sraj#endif 46183878Sraj NULL 47183878Sraj}; 48183878Sraj 49183878Srajstruct fs_ops *file_system[] = { 50183878Sraj#if defined(LOADER_UFS_SUPPORT) 51183878Sraj &ufs_fsops, 52183878Sraj#endif 53183878Sraj#if defined(LOADER_CD9660_SUPPORT) 54183878Sraj &cd9660_fsops, 55183878Sraj#endif 56183878Sraj#if defined(LOADER_EXT2FS_SUPPORT) 57183878Sraj &ext2fs_fsops, 58183878Sraj#endif 59183878Sraj#if defined(LOADER_NFS_SUPPORT) 60183878Sraj &nfs_fsops, 61183878Sraj#endif 62183878Sraj#if defined(LOADER_TFTP_SUPPORT) 63183878Sraj &tftp_fsops, 64183878Sraj#endif 65183878Sraj#if defined(LOADER_GZIP_SUPPORT) 66183878Sraj &gzipfs_fsops, 67183878Sraj#endif 68183878Sraj#if defined(LOADER_BZIP2_SUPPORT) 69183878Sraj &bzipfs_fsops, 70183878Sraj#endif 71183878Sraj NULL 72183878Sraj}; 73183878Sraj 74183878Srajstruct netif_driver *netif_drivers[] = { 75183878Sraj#if defined(LOADER_NET_SUPPORT) 76183878Sraj &uboot_net, 77183878Sraj#endif 78183878Sraj NULL, 79183878Sraj}; 80183878Sraj 81183878Srajstruct file_format *file_formats[] = { 82183878Sraj &uboot_elf, 83183878Sraj NULL 84183878Sraj}; 85183878Sraj 86183878Srajextern struct console uboot_console; 87183878Sraj 88183878Srajstruct console *consoles[] = { 89183878Sraj &uboot_console, 90183878Sraj NULL 91183878Sraj}; 92