uboot通过添加指令自动启动内核
2008-09-01 18:01
411 查看
我的uboot始终有些问题,总是不能自动启动内核(对uboot搞的还不太懂),内核烧到nand flash中,uboot不能自动启动,最后发现uboot中有一个nboot指令,可以将nand flash中的内容加载到sdram中,于是我把这个指令加到了uboot/include/configs/*.h中:
*是你板子的名字
在这里以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 image 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 ...
这个问题有待进一步解决。。。
*是你板子的名字
在这里以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 image 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 ...
这个问题有待进一步解决。。。
相关文章推荐
- uboot通过tftp来启动内核
- OK6410 uboot编译以及设置uboot开机自动启动内核
- linux下添加自动启动项,linux 开机自动启动脚本方法
- 简要分析Uboot是如何启动内核
- UT-Exynos 4412开发板使用uboot启动 内核kernel3.0.15 ,android4.0.4开发板
- 简要分析Uboot是如何启动内核! 分类: uboot深入浅出
- jenkins 通过shell启动java应用程序会随着job完成而被自动关闭的解决方法
- uboot启动内核的实现
- uboot终极目标:启动内核
- 分析uboot是如何启动内核的
- uboot启动内核的实现
- uboot启动内核的实现
- 分析uboot是如何启动内核的
- Ubuntu启动自动设置IPv6地址并添加静态路由
- uboot终于能从flash上引导linux内核了,但是内核启动又出现了问题
- 如何给Windows添加自动启动的程序
- C# 通过服务启动窗体(把窗体添加到服务里)实现用户交互的windows服务
- ubuntu下添加开机自动启动程序
- 轻松学习Ionic (四) 修改应用图标及添加启动画面(更新官方命令行工具自动生成)
- uboot自动引导内核参数