[U-Boot] Copy to Flash... 9Flash not Erased

Rudolf J Streif rudolf.streif at gmail.com
Tue Apr 7 04:29:49 CEST 2015


I am getting the "Flash not Erased" error when writing to NOR flash with cp.b. 
I checked all of the obvious such as file exceeding the erased area etc.

Below is the log including environment settings etc. You can see that about 
14k of data is written and then the error occurs for a reason unbeknownst to 
me. Any suggestions are appreciated.

Now, you may want to say "try a newer version of u-boot". However, that is not 
feasible due to other requirements. However, if there has been a known issue 
that has been fixed later, please let me know, what it is so that I can 
eventually backport it. I could not find it while searching the web and the 
mailing list posts.

Thank you,
Rudi


U-Boot 2011.121.4.4 (Apr 01 2015 - 13:30:37)

CPU0:  8572E, Version: 2.1, (0x80e80021)
Core:  E500, Version: 3.0, (0x80210030)
Clock Configuration:
       CPU0:1250 MHz, CPU1:1250 MHz, 
       CCB:500  MHz,
       DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous), LBC:62.500 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: MyBoard
I2C:   ready
DRAM:  Detected UDIMM CT51264AC667.M16FC
Detected UDIMM CT51264AC667.M16FC
6 GiB left unmapped
8 GiB (DDR2, 64-bit, CL=5, ECC off)
Flash: 128 MiB
L2:    1024 KB enabled
PORDEVSR[IO_SEL_SRDS] = e
NAND:  1536 MiB
PCIe1: disabled, devdisr: 0x36000108, sdc: 0
PCIe2: disabled, devdisr: 0x36000108, sdc: 0
PCIe3: disabled, devdisr: 0x36000108, sdc: 0
In:    serial
Out:   serial
Err:   serial
Net:   eTSEC1, eTSEC2, eTSEC3, eTSEC4
Hit any key to stop autoboot:  0 
=> 


=> printenv
baudrate=115200
bootcmd=setenv bootargs root=/dev/mtdblock5 rw rootfstype=jffs2 
console=$consoledev,$baudrate $othbootargs; bootm $kernel_fladdr - $fdt_fladdr
bootdelay=5
bootfile=/export/boot/uImage
burnfdt=protect off $fdt_fladdr +$filesize; erase $fdt_fladdr +$filesize; cp.b 
$fdtaddr $fdt_fladdr $filesize; protect on $fdt_fladdr +$filesize
burnkernel=protect off $kernel_fladdr +$filesize; erase $kernel_fladdr +$filesize; 
cp.b $kernel_addr $kernel_fladdr $filesize; protect on $kernel_fladdr +$filesize
burnrootfs=nand device 0; nand erase.chip clean; nand write $rootfs_addr 0x0 
$filesize
consoledev=ttyS0
eth1addr=00:09:9C:03:80:45
eth2addr=00:09:9C:03:80:46
eth3addr=00:09:9C:03:80:47
ethact=eTSEC1
ethaddr=00:09:9C:03:80:44
fdt_addr=c00000
fdt_fladdr=0xeff00000
fdtaddr=c00000
fdtfile=uImage-myboard_36b.dtb
gatewayip=10.0.0.1
getfdt=tftp $fdtaddr $user/$fdtfile
getkernel=tftp $kernel_addr $user/$kernelfile
getrootfs=tftp $rootfs_addr $user/$rootfsfile
hostname=myboard
hwconfig=fsl_ddr:ecc=off
ipaddr=192.168.100.50
kernel_addr=0x1000000
kernel_fladdr=0xef800000
kernelfile=uImage-myboard.bin
loadall=run loadkernel ; run loadfdt ; run loadrootfs
loadfdt=run getfdt ; run burnfdt
loadkernel=run getkernel ; run burnkernel
loadrootfs=run getrootfs ; run burnrootfs
loads_echo=1
mtdids=nand0=config-flash-0
netdev=eth0
netmask=255.255.255.0
oldkernelfile=uImage-git-r1318-myboard-20130531192736.bin
oldrootfsfile=cssp-bams-myboard2-20140127153741.rootfs.jffs2
othbootargs=rio-scan.scan=1 riohdid=0 enforcing=0 selinux=0 loglevel=8
rootfs_addr=2000000
rootfsfile=core-image-selinux-myboard.jffs2
rootpath=/export/rootfs
serverip=192.168.100.196
stderr=serial
stdin=serial
stdout=serial
uboot=/export/u-boot/u-boot.bin
uboot_fladdr=0xeff80000
user=streif-selinux

Environment size: 1856/8188 bytes

=> run getkernel
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 192.168.100.196; our IP address is 192.168.100.50
Filename 'streif-selinux/uImage-myboard.bin'.
Load address: 0x1000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #
done
Bytes transferred = 3821142 (3a4e56 hex)

=> protect off 0xef800000 +0x3a4e56
Un-Protected 30 sectors

=> erase 0xef800000 +0x3a4e56

.............................. done
Erased 30 sectors


=> flinfo
Bank # 1: CFI conformant flash (16 x 16)  Size: 128 MB in 1024 Sectors
  AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x227E2801
  Erase timeout: 4096 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 1024 bytes

  Sector Start Addresses:
  E8000000 E      E8020000 E      E8040000 E      E8060000 E      E8080000 E    
  E80A0000 E      E80C0000 E      E80E0000 E      E8100000 E      E8120000 E    
<omitted>
  EF800000 E      EF820000 E      EF840000 E      EF860000 E      EF880000 E    
  EF8A0000 E      EF8C0000 E      EF8E0000 E      EF900000 E      EF920000 E    
  EF940000 E      EF960000 E      EF980000 E      EF9A0000 E      EF9C0000 E    
  EF9E0000 E      EFA00000 E      EFA20000 E      EFA40000 E      EFA60000 E    
  EFA80000 E      EFAA0000 E      EFAC0000 E      EFAE0000 E      EFB00000 E    
  EFB20000 E      EFB40000 E      EFB60000 E      EFB80000 E      EFBA0000 E    
  EFBC0000 E      EFBE0000 E      EFC00000 E      EFC20000 E      EFC40000 E    
  EFC60000 E      EFC80000 E      EFCA0000 E      EFCC0000 E      EFCE0000 E    
  EFD00000 E      EFD20000 E      EFD40000 E      EFD60000 E      EFD80000 E    
  EFDA0000 E      EFDC0000 E      EFDE0000 E      EFE00000 E      EFE20000 E    
  EFE40000 E      EFE60000 E      EFE80000 E      EFEA0000 E      EFEC0000 E    
  EFEE0000 E      EFF00000        EFF20000 E      EFF40000 E      EFF60000   
RO 
  EFF80000   RO   EFFA0000   RO   EFFC0000   RO   EFFE0000      

=> md 0xef800000
ef800000: ffffffff ffffffff ffffffff ffffffff    ................
ef800010: ffffffff ffffffff ffffffff ffffffff    ................
ef800020: ffffffff ffffffff ffffffff ffffffff    ................
ef800030: ffffffff ffffffff ffffffff ffffffff    ................
ef800040: ffffffff ffffffff ffffffff ffffffff    ................
ef800050: ffffffff ffffffff ffffffff ffffffff    ................
ef800060: ffffffff ffffffff ffffffff ffffffff    ................
ef800070: ffffffff ffffffff ffffffff ffffffff    ................
ef800080: ffffffff ffffffff ffffffff ffffffff    ................
ef800090: ffffffff ffffffff ffffffff ffffffff    ................
ef8000a0: ffffffff ffffffff ffffffff ffffffff    ................
ef8000b0: ffffffff ffffffff ffffffff ffffffff    ................
ef8000c0: ffffffff ffffffff ffffffff ffffffff    ................
ef8000d0: ffffffff ffffffff ffffffff ffffffff    ................
ef8000e0: ffffffff ffffffff ffffffff ffffffff    ................
ef8000f0: ffffffff ffffffff ffffffff ffffffff    ................
<omitted>
ef820000: ffffffff ffffffff ffffffff ffffffff    ................
ef820010: ffffffff ffffffff ffffffff ffffffff    ................
ef820020: ffffffff ffffffff ffffffff ffffffff    ................
ef820030: ffffffff ffffffff ffffffff ffffffff    ................
ef820040: ffffffff ffffffff ffffffff ffffffff    ................
ef820050: ffffffff ffffffff ffffffff ffffffff    ................
ef820060: ffffffff ffffffff ffffffff ffffffff    ................
ef820070: ffffffff ffffffff ffffffff ffffffff    ................
ef820080: ffffffff ffffffff ffffffff ffffffff    ................
ef820090: ffffffff ffffffff ffffffff ffffffff    ................
ef8200a0: ffffffff ffffffff ffffffff ffffffff    ................
ef8200b0: ffffffff ffffffff ffffffff ffffffff    ................
ef8200c0: ffffffff ffffffff ffffffff ffffffff    ................
ef8200d0: ffffffff ffffffff ffffffff ffffffff    ................
ef8200e0: ffffffff ffffffff ffffffff ffffffff    ................
ef8200f0: ffffffff ffffffff ffffffff ffffffff    ................

=> cp.b 0x1000000 0xef800000 0x3a4e56
Copy to Flash... 9Flash not Erased

=> md 0xef800000                             
ef800000: 27051956 d205005a 54a472c4 003a4e16    '..V...ZT.r..:N.
ef800010: 00000000 00000000 f6e00283 05070201    ................
ef800020: 4c696e75 782d332e 31302e35 392d6c74    Linux-3.10.59-lt
ef800030: 73692d31 2e342e34 00000000 00000000    si-1.4.4........
ef800040: 1f8b0800 00000000 0203dc5a 0d501467    ...........Z.P.g
ef800050: 9a7e6718 701c8836 3fc99268 7488c405    .~g.p..6?..ht...
ef800060: 41193de2 f6c8808d 98aa118c 0b0a89ba    A.=.............
ef800070: c965c840 a28839f0 273566bb e919e86c    .e. at ..9.'5f....l
ef800080: 8478558c b05b0614 47c55e45 dcb839af    .xU..[..G.^E..9.
ef800090: ce4a8c69 374a3cd7 e44ce2dd 25e64748    .J.i7J<..L..%.GH
ef8000a0: 4ca9c4dd a03139e3 0f7defdb 3d430041    L....19..}..=C.A
ef8000b0: b3757b55 1aaaa8e7 ebefe7fd 9ef7f9de    .u{U............
ef8000c0: effdbea6 71014015 805c65b3 c88f4ef5    ....q. at ..\e...N.
ef8000d0: b6cc8f3e d35b35bd 59e6617c 62557493    ...>.[5.Y.a|bUt.
ef8000e0: 5cd5d024 3f1afd6e ef0cce04 55f3d7da    \..$?..n....U...
ef8000f0: 66cc5755 7e653d5b b5b9de23 aacd1ef1    f.WU~e=[...#....
<omitted>
ef803a10: d32ca36c 99696174 83aef728 eaae98b4    .,.l.iat...(....
ef803a20: 9165113c c367c211 e31c27fa e4f014c0    .e.<.g....'.....
ef803a30: ffffffff ffffffff ffffffff ffffffff    ................
ef803a40: ffffffff ffffffff ffffffff ffffffff    ................



More information about the U-Boot mailing list