⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootconfig.h

📁 bootloader源代码
💻 H
字号:
/***************************************** Copyright (c) 2001-2002  Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//* This file is part of the boot loader *//* * bootconfig.c * * first revision by Ho Lee 10/30/2002 */#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_PATHLEN		32#define DEFAULT_LOADER_FILENAME	"loader.bin"#define DEFAULT_ROMFS_FILENAME	"romfs.bin"#define DEFAULT_KERNEL_FILENAME	"linux.bin"enum { 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	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];} 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 + -