韦东山Linux嵌入式课程社区
直播中

杨杰

7年用户 1050经验值
私信 关注

为什么我在uboot下格式化nand flash后选择从nor flash启动会出错?

我试着在uboot下面格式化nand flash,之后我选择从nor flash启动。就出现如下错误

NAND read: device 0 offset 0x60000, size 0x200000

reading NAND page at offset 0x60000 failed
Could not read entire image due to bad blocks
2097152 bytes read: ERROR
## Booting image at 30007fc0 ...
Bad Magic Number


然后直接进入menu选择,好像不能自动引导内核了,我重新刷整个系统。刷成功之后启动还是这样,这是为什么?

回帖(7)

吴娜

2019-8-14 09:05:14
这是现在nor启动一上电的信息
U-Boot 1.1.6 (Nov 26 2010 - 08:49:16)
DRAM:  64 MB
Flash:  2 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment
In:    serial
Out:   serial
Err:   serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:5ch,P:1h,S:1h]
CLKDIVN:5h

S3C2440A USB Downloader ver R0.03 2004 Jan  |
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3

FORMAT: +++

NOTE: Power off/on or press the reset button for 1 sec
in order to get a valid USB device address.

Hit any key to stop autoboot:  0

Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x200000

reading NAND page at offset 0x60000 failed

Could not read entire image due to bad blocks

2097152 bytes read: ERROR

## Booting image at 30007fc0 ...

Bad Magic Number



##### 100ask Bootloader for OpenJTAG #####

[n] Download u-boot to Nand Flash
[o] Download u-boot to Nor Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
Set the boot parameters
Boot the system
[r] Reboot u-boot
[q] Quit from menu

Enter your selection: q

OpenJTAG>

OpenJTAG>

OpenJTAG> print

bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0
bootdelay=2
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ipaddr=192.168.7.17
serverip=192.168.7.11
netmask=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
mtdids=nand0=nandflash0
mtdparts=mtdparts=nandflash0:256k@0(bootloader),128k(params),2m(kernel),-(root)
partition=nand0,0
mtddevnum=0
mtddevname=bootloader
Environment size: 443/131068 bytes

OpenJTAG>

我之前就是format nand flash了,从0到0x04000000,然后从nor flash启动也不行了,而后利用nor里面的uboot烧写了重新烧写了整个系统,还是这样,,我不太清楚这个fformat nand flash是什么用途,不是擦除我指定的地址的东西吗?
举报

李常杰

2019-8-14 09:17:47
需***啊
举报

李常杰

2019-8-14 09:37:03
我自己弄好了,应该就是nand flash有坏块导致的,我把nand flash先nand srcub一下,然后把里面kernel分区erase,在重新烧写kernel image就可以启动了。谢谢了
举报

赵秀英

2019-8-14 09:55:26
我的也是U-Boot 1.1.6 (Nov 26 2010 - 08:49:16)

DRAM:  64 MB
Flash:  2 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:5ch,P:1h,S:1h]
CLKDIVN:5h


+---------------------------------------------+
| S3C2440A USB Downloader ver R0.03 2004 Jan  |
+---------------------------------------------+
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: +++
NOTE: Power off/on or press the reset button for 1 sec
      in order to get a valid USB device address.

Hit any key to stop autoboot:  0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x200000

reading NAND page at offset 0x60000 failed
Could not read entire image due to bad blocks
2097152 bytes read: ERROR
## Booting image at 30007fc0 ...
Bad Magic Number

##### 100ask Bootloader for OpenJTAG #####
[n] Download u-boot to Nand Flash
[o] Download u-boot to Nor Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
Set the boot parameters
Boot the system
[r] Reboot u-boot
[q] Quit from menu
Enter your selection:
而且u-boot菜单不等输入 这是怎么!!! 求助!!!
举报

更多回帖

×
20
完善资料,
赚取积分