首页 > 代码库 > OK6410 Starting kernel ... undefined instruction pc : [<50008004>]
OK6410 Starting kernel ... undefined instruction pc : [<50008004>]
uboot 源码包:u-boot1.1.6.tar
编译器:arm-linux-gcc-4.3.2
源码路径下配置 # make forlinx_nand_ram128_config
编译 # make
得到uboot.bin之后考到sd卡中,通过sd卡中的mmc.bin将uboot、kernel、filesystem烧到nandflash
启动出现一直重启的错误:
CPU: S3C6410 @532MHz
Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode)
Board: SMDK6410
DRAM: 128 MB
Flash: 0 kB
NAND: 2048 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x100000, size 0x500000
5242880 bytes read: OK
## Booting image at c0008000 ...
Boot with Image
Starting kernel ...
undefined instruction
pc : [<50008004>] lr : [<c7e216bc>]
sp : c7fffddc ip : c7e7ffb8 fp : 00000000
r10: c7f02618 r9 : 00000002 r8 : c7e7ffdc
r7 : 00000000 r6 : 00000000 r5 : 50000124 r4 : 00000000
r3 : 50008000 r2 : 50000100 r1 : 0000065a r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
reset...
提示信息中 NAND read: device 0 offset 0x100000, size 0x500000
uboot 在0x100000到0x500000中读取内核,但是启动失败,可能是内核读取错误。
由于飞凌的烧写是通过sd卡中的 uboot 完成的,因此切换到SD卡启动,printenv查看变量
果然有问题:
bootcmd=nand led-start;nand erase ;fatload mmc 0:1 0x50008000 u-boot.bin;nand write.uboot 0x50008000 0 0x200000;fatload mmc 0:1 0x50008000 zImage;nand write.e 0x500080000x200000 0x500000; fatload mmc 0:1 0x50008000 rootfs.yaffs2; nand write.yaffs2 0x50008000 0x00700000
内核是从0x200000开始写的。
修改:
设置成nandflash启动修改环境变量:
SMDK6410 # setenv bootcmd ‘nand read 0xc0008000 0x200000 0x500000;bootm 0xc0008000‘
SMDK6410 # saveenv
重启,可以顺利启动linux。