1、uboot 里环境变量的设置
这个设置 一般都是在和平台有关的文件 ,我使用的是mini2440 开发板 。就在
uboot 根目录下的 include/configs/mini2440.h 里
#define CONFIG_BOOTDELAY 2
#define CONFIG_BOOTARGS "noinitrd root=/dev/mtdblock3 console=ttySAC0 init=/linuxrc"
#define CONFIG_ETHADDR 08:08:11:18:12:27
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.0.230
#define CONFIG_SERVERIP 192.168.0.1
#define CONFIG_GATEWAYIP 192.168.0.1
#define CONFIG_OVERWRITE_ETHADDR_ONCE
/*#define CONFIG_BOOTFILE "elinos-lart" */
#define CONFIG_BOOTCOMMAND "nand read.i 0x30008000 60000 500000;bootm 0x30008040"
#define CONFIG_EXTRA_ENV_SETTINGS \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0" \
""
可以在uboot 源码里 搜这些定义,找到你使用的平台里的定义就是了
2、在内核的 arch/arm/mach-xxx 目录下有对应平台的 关于存储分配的地方 mini2440开发板上的文件是 mach-mini2440.c
static struct mtd_partition friendly_arm_default_nand_part[] = {
[0] = {
.name = "supervivi",
.size = 0x00040000,
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "Kernel",
.offset = 0x00060000,
.size = 0x00500000,
},
[3] = {
.name = "root",
.offset = 0x00560000,
.size = 1024 * 1024 * 1024, //
},
[4] = {
.name = "nand",
.offset = 0x00000000,
.size = 1024 * 1024 * 1024, //
}
};
阅读(1933) | 评论(0) | 转发(0) |