📄 bootconfig.h
字号:
/***************************************** Copyright (c) 2002-2004 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//* This file is part of the EM86XX boot loader *//* * bootconfig.c */#ifndef __BOOTLOADER_BOOTCONFIG_H#define __BOOTLOADER_BOOTCONFIG_H// configuration data structure#define BOOTCONFIG_HEADSIGN (('B') | ('O' << 8) | ('O' << 16) | ('T' << 24))#define BOOTCONFIG_BODYSIGN (('C') | ('O' << 8) | ('N' << 16) | ('F' << 24))#define BOOTCONFIG_MAJOR 0x01#define BOOTCONFIG_MINOR 0x00#define BOOTCONFIG_KERNELPARAMLEN 256#define BOOTCONFIG_PATHLEN 24#define DEFAULT_LOADER_FILENAME "loader.bin"#define DEFAULT_ROMFS_FILENAME "romfs.bin"#define DEFAULT_KERNEL_FILENAME "linux.bin"#define DEFAULT_KERNELGZ_FILENAME "linux.bin.gz"#define DEFAULT_MISC_FILENAME "misc.bin"#define DEFAULT_INST_FILENAME "install.bin"#define DEFAULT_INITRD_FILENAME "initrd.bin"#define DEFAULT_KERNELFS_FILENAME "linux.bin"#ifdef CONFIG_ENABLE_2NDBOOT#define DEFAULT_2NDLOADER_FILENAME "2ndloader.bin"#endif#ifdef CONFIG_ENABLE_IRQHANDLER#define DEFAULT_IRQHANDLER_FILENAME "irqhandler.bin"#endif#ifdef CONFIG_ENABLE_BITMAPS#define DEFAULT_IMAGE_FILENAME "bitmap.bin"#endif#ifdef CONFIG_ENABLE_UCODES#define DEFAULT_UCODE_FILENAME "ucode.bin"#endif#ifdef CONFIG_ENABLE_USERPREF#define DEFAULT_USERPREF_FILENAME "userpref.bin"#endif#ifdef CONFIG_ENABLE_VSYNCPARAM#define DEFAULT_VSYNCPARAM_FILENAME "vsyncparam.bin"#endif#ifdef CONFIG_ENABLE_DVI#define DEFAULT_DVI_FILENAME "dvi.bin"#endifenum { BOOTNET_NONE, BOOTNET_STATIC, BOOTNET_BOOTP, BOOTNET_DHCP };typedef struct { unsigned short major_version; // major version of configuration unsigned short minor_version; // minor version of configuration unsigned int checksum; // checksum : BOOTCONFIG_BODYSIGN // kernel parameter char kernel_cmdline[BOOTCONFIG_KERNELPARAMLEN]; // network configuration unsigned char macaddr[6]; // hardware address unsigned short protocol; // BOOTNET_xxx unsigned int ipaddr; // IP address unsigned int netmask; // network mask unsigned int gateway; // gateway unsigned int server; // server for download unsigned int dns; // DNS server unsigned char domain[24]; // domain name unsigned char loader_filename[BOOTCONFIG_PATHLEN]; unsigned char romfs_filename[BOOTCONFIG_PATHLEN]; unsigned char kernel_filename[BOOTCONFIG_PATHLEN]; unsigned char misc_filename[BOOTCONFIG_PATHLEN]; unsigned char inst_filename[BOOTCONFIG_PATHLEN]; unsigned char initrd_filename[BOOTCONFIG_PATHLEN]; unsigned char kernelfs_filename[BOOTCONFIG_PATHLEN];#ifdef CONFIG_ENABLE_2NDBOOT unsigned char scnd_loader_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_IRQHANDLER unsigned char irqhandler_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_BITMAPS unsigned char bitmap_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_UCODES unsigned char ucode_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_USERPREF unsigned char userpref_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_VSYNCPARAM unsigned char vsyncparam_filename[BOOTCONFIG_PATHLEN];#endif#ifdef CONFIG_ENABLE_DVI unsigned char dvi_filename[BOOTCONFIG_PATHLEN];#endif} bootconfig_1_0_t;typedef bootconfig_1_0_t bootconfig_t;// global variablesextern bootconfig_t g_bootconfig;// function prototypesint bootconfig_load(int index);int bootconfig_save(void);int bootconfig_lastsaved(int *idx);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -