*是你板子的名字
在这里以sbc2410x.h为例
#define CONFIG_BOOTDELAY 3
#define CONFIG_BOOTARGS "console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.1:/friendly-arm/rootfs_netserv ip=192.168.0.69:192.168.0.1:192.168.0.1:255.255.255.0:debian:eth0:off"
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.0.69
#define CONFIG_SERVERIP 192.168.0.1
/*#define CONFIG_BOOTFILE "elinos-lart" */
//#define CONFIG_BOOTCOMMAND "dhcp; bootm"
#define CONFIG_BOOTCOMMAND "nboot 0x30400000 0 0x60000\;bootm"
将红的是注释掉,加上蓝的。
其中nboot是uboot指令--将nand flash中的内容加载到sdram中,0x30400000是拷到的sdram的地址,0是nand flash设备号,0x60000是内核在nand flash的地址。在通过bootm从0x30400000启动内核。
虽然这样是可以自动启动内核了,但是这样还存在一些问题,会显示两次启动信息:
Loading from device 0: <NULL> at 0x4e000000 (offset 0x60000)
Image Name: Linux-2.6.13-utulinux2440
Created: 2007-11-04 6:37:51 UTC
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 1477940 Bytes = 1.4 MB
Load Address: 30008000
Entry Point: 30008000
## Booting p_w_picpath at 30400000 ...
Image Name: Linux-2.6.13-utulinux2440
Created: 2007-11-04 6:37:51 UTC
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 1477940 Bytes = 1.4 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
这个问题有待进一步解决。。。