当前位置: 技术问答>linux和unix
u-boot引导内核启动问题
来源: 互联网 发布时间:2016-10-19
本文导语: 大家好,刚刚移植好的内核放到板子里运行,我把uboot做成SD卡方式启动,运行的时候出了问题。以下给出问题: block: 2771 is relocated to block: 4085 block: 2968 is relocated to block: 4084 block: 2991 is re...
大家好,刚刚移植好的内核放到板子里运行,我把uboot做成SD卡方式启动,运行的时候出了问题。以下给出问题:
block: 2771 is relocated to block: 4085
block: 2968 is relocated to block: 4084
block: 2991 is relocated to block: 4083
block: 3001 is relocated to block: 4082
block: 3179 is relocated to block: 4081
block: 3855 is relocated to block: 4080
block: 3975 is relocated to block: 4079
1 bytes read: OK
reading install_tag
0 bytes read
read zImage from NAND
reading zImage
2938180 bytes read
Ready to boot zImage from 500000
Starting kernel ...
Uncompressing Linux.............................................................
................................................................................
............................................. done, booting the kernel.
我在uboot里打印出环境变量信息:
Avengers>> printenv
bootcmd=setenv autoboot boot; bootz 0x500000; setenv autoboot none
bootdelay=0
baudrate=115200
ethaddr="00:00:5A:9F:6D:82"
ipaddr=50.1.1.10
serverip=50.1.1.1
preboot=keyboot;fatcheck
rootpath=/tftpboot/rootfs_arm
stdin=serial
stdout=serial
stderr=serial
ethprime=eth0
usbMode=host
default_load_addr=0x00500000
image_name=zImage
bootfile=zImage
initrd_name=ramdisk.image.gz
initrd_load_addr=800000
initrd_size=400000
standalone_mtd=fsload $(default_load_addr) $(image_name);setenv bootargs $(bootargs) root=/dev/mtdblock0 rw rootfstype=jffs2 ip=$(ipaddr):$(serverip)$(bootargs_end);bootm $(default_load_addr);
standalone_initrd=fsload $(default_load_addr) $(image_name);fsload $(initrd_load_addr) $(initrd_name);setenv bootargs $(bootargs) root=/dev/ram0 rw initrd=0x$(initrd_load_addr),0x$(initrd_size) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm $(default_load_addr);
ethact=u2o-eth
Environment size: 887/65532 bytes
Avengers>>
请大家看看是什么原因。
block: 2771 is relocated to block: 4085
block: 2968 is relocated to block: 4084
block: 2991 is relocated to block: 4083
block: 3001 is relocated to block: 4082
block: 3179 is relocated to block: 4081
block: 3855 is relocated to block: 4080
block: 3975 is relocated to block: 4079
1 bytes read: OK
reading install_tag
0 bytes read
read zImage from NAND
reading zImage
2938180 bytes read
Ready to boot zImage from 500000
Starting kernel ...
Uncompressing Linux.............................................................
................................................................................
............................................. done, booting the kernel.
我在uboot里打印出环境变量信息:
Avengers>> printenv
bootcmd=setenv autoboot boot; bootz 0x500000; setenv autoboot none
bootdelay=0
baudrate=115200
ethaddr="00:00:5A:9F:6D:82"
ipaddr=50.1.1.10
serverip=50.1.1.1
preboot=keyboot;fatcheck
rootpath=/tftpboot/rootfs_arm
stdin=serial
stdout=serial
stderr=serial
ethprime=eth0
usbMode=host
default_load_addr=0x00500000
image_name=zImage
bootfile=zImage
initrd_name=ramdisk.image.gz
initrd_load_addr=800000
initrd_size=400000
standalone_mtd=fsload $(default_load_addr) $(image_name);setenv bootargs $(bootargs) root=/dev/mtdblock0 rw rootfstype=jffs2 ip=$(ipaddr):$(serverip)$(bootargs_end);bootm $(default_load_addr);
standalone_initrd=fsload $(default_load_addr) $(image_name);fsload $(initrd_load_addr) $(initrd_name);setenv bootargs $(bootargs) root=/dev/ram0 rw initrd=0x$(initrd_load_addr),0x$(initrd_size) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm $(default_load_addr);
ethact=u2o-eth
Environment size: 887/65532 bytes
Avengers>>
请大家看看是什么原因。
|
在bootargs 中增加:
console=ttyS0,115200
比如
setenv bootargs console=ttyS0,115200
saveenv
reset
console=ttyS0,115200
比如
setenv bootargs console=ttyS0,115200
saveenv
reset
|
boot loader与内核的机器码必须一致才能正常引导系统。