主题 : Wrong Image Format for bootm commandERROR: can't get kernel image! 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 15118
精华: 0
发帖: 7
金钱: 35 两
威望: 7 点
贡献值: 0 点
综合积分: 14 分
注册时间: 2010-02-28
最后登录: 2011-06-09
楼主  发表于: 2010-04-13 23:04

 Wrong Image Format for bootm commandERROR: can't get kernel image!

我用的是tekkamanninja-U-boot-2009.11 中直接可用的uboot.bin
重启板子时出现
Wrong Image Format for bootm command
ERROR: can't get kernel image!

我是按照这个来做的http://www.arm79.com/simple/?t531.html
我的分区是
name            :       offset          size            flag
------------------------------------------------------------
vivi            :       0x00000000      0x00040000      0
param           :       0x00040000      0x00020000      0
kernel          :       0x00060000      0x00500000      0
root            :       0x00560000      0x3fa80000      0

[u-boot@MINI2440]# printenv
bootdelay=1
baudrate=115200
ethaddr=08:08:11:18:12:27
tekkaman=bmp d 70000
stdin=serial
stdout=serial
stderr=serial
ethact=dm9000
bootargs=noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
bootcmd=nand read 0x30008000 0x60000 0x200000;bootm 0x30008000
filesize=3B22C00
fileaddr=30008000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.230
serverip=192.168.1.101

Environment size: 385/131068 bytes
文件系统是root_qtopia-128M.img

[u-boot@MINI2440]# tftp 0x30008000 uImage
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:08:11:18:12:27
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.230
Filename 'uImage'.
Load address: 0x30008000
Loading: T #################################################################
         ###########################################
done
Bytes transferred = 1582552 (1825d8 hex)

[u-boot@MINI2440]# nand erase 0x60000 0x200000

NAND erase: device 0 offset 0x60000, size 0x200000
Erasing at 0x24000000000002 --   0% complete.
OK
[u-boot@MINI2440]# nand write 0x30008000 0x60000 0x200000

NAND write: device 0 offset 0x60000, size 0x200000
Writing at 0x24000000020000 -- 100% is complete. 2097152 bytes written: OK
[u-boot@MINI2440]# tftp 0x30008000 root_qtopia-128M.img

         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
done
Bytes transferred = 62008320 (3b22c00 hex)
[u-boot@MINI2440]# nand erase 0x560000 0x3fa80000

NAND erase: device 0 offset 0x560000, size 0x3fa80000
Skipping bad block at  0x58000000000000

Skipping bad block at  0x5a000000000000

Skipping bad block at  0x4d2000000000000

Skipping bad block at  0xa72000000000000

Erasing at 0xf9c00003fa80000 --   0% complete.
NAND 256MiB 3,3V 8-bit: MTD Erase failure: -22

NAND 256MiB 3,3V 8-bit: MTD get bad block failed: -22
ERROR//------》虽然出错但是可用

[u-boot@MINI2440]# nand write.yaffs 0x30008000 0x560000 0x3b22c00

NAND write: device 0 offset 0x560000, size 0x3b22c00
Skip the first good block 56000000000000
Skip bad block 0x58000000000000
Skip bad block 0x5a000000000000
Writing at 0x60000000020000 -- 1% is complete.
完成后重启开发板出现
Wrong Image Format for bootm command
ERROR: can't get kernel image!

但是当我用
tftp 0x30008000 uImage;bootm 0x30008000 时可以正常启动linux,我以为是
这两句有问题,但是不知道是为什么,希望各位指点下
nand erase 0x60000 0x200000
nand write 0x30008000 0x6000 0x200000
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-04-14 11:57
也许你可以在进入U-Boot后手动执行nand read 0x30008000 0x60000 0x200000,然后用md 0x30008000看看从NAND Flash里面读出来的uImage数据是否和你编译出来的uImage一致。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2010-04-14 12:06
我用的是tekkamanninja-U-boot-2009.11 中直接可用的uboot.bin

看不懂你这句话的语法,如果你下载的是他博客上的u-boot.bin image附件,建议你最好clone他在GITHUB上的源代码自己编译生成u-boot.bin。一般来说,博客上的附件并不是从最新的源代码编译出来的,很可能包括一些已经fix的bug。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 46191
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
贡献值: 0 点
综合积分: 20 分
注册时间: 2011-05-11
最后登录: 2011-08-02
3楼  发表于: 2011-06-10 15:58
级别: 新手上路
UID: 83694
精华: 0
发帖: 5
金钱: 25 两
威望: 5 点
贡献值: 0 点
综合积分: 10 分
注册时间: 2012-12-10
最后登录: 2013-08-02
4楼  发表于: 2013-08-02 10:26
同仁,我是新手,也碰到了你这样的问题,内核定制好,用tftp甭管下载到内存还是烧写到NandFlash,用uboot命令,boot bootm  go 等命令都不能引导内核,关闭电源,打到NOR启动,然后用NOR里的uboot选项,如g:boot linux from RAm 或b : boot the system等都可以引导内核正常启动。
请指点一二,详解更好。