[Qi] bad magic when booting from NAND

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Thu Apr 9 07:21:01 CEST 2009


Hi Michael, Werner.

Thanks for your help! After I removed printing of Qi header I was able
to insert print commands to nand read function.

Attached are the patch, Qi output with the patch applied, unmodified
Qi output in case you need version information.

As you can see there are many bad blocks while reading nand kernel.
And original Qi nand_read_ll() stops when bad block count reaches 4.
Now in the end we get kernel CRC and bad magic errors.

If you tell me what to do I can do more testing and debugging. Is
there any documentation that describes how this should work.

Regards,
  Dmitry
-------------- next part --------------


Qi Bootloader s3c2442  thinkdebian master_c2a6b7ab3df7c1b6 
\0xd0\0xa7\0xd1\0x82\0xd0\0xb2 \0xd0\0x90\0xd0\0xbf\0xd1\0x80 9 08:47:30 MSD 2009  Copyright (C) 2008 Openmoko, Inc.

     Detected: Freerunner / GTA02, A6 PCB
Battery condition reasonable

Trying kernel: SD Card EXT2 P1 Kernel
    Card Type: SD 2.0 SDHC / Mfr: 0x03, OEM "SD" / SU08G", rev 8.0 / s/n: 1882195497 / date: 7/2008
    SDHC size: 7790 MiB
    Partition: 1 start +16 512-byte blocks, size 7790 MiB
 ** skipping 
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: SD Card EXT2 P2 Kernel
    Partition: 2 start +0 512-byte blocks, size 0 MiB
 ** ext2fs_devread() read outside partition sector 2
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: SD Card EXT2 P3 Kernel
    Partition: 3 start +0 512-byte blocks, size 0 MiB
 ** ext2fs_devread() read outside partition sector 2
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: NAND Kernel
     RAW open: +1024 512-byte blocks
        Found: "openmoko/2.6.28-stable+gitr0+f19"
         Size: 1844 KiB
     RAW open: +1024 512-byte blocks
Bad kernel header
bad magic 6f6b6f6d

No usable kernel image found

Memory Testing 0x30000000 length 128 MB
 Test series 1  .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad_block.patch
Type: text/x-diff
Size: 1803 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20090409/faa4b6d3/attachment.patch 
-------------- next part --------------
Battery condition reasonable

Trying kernel: SD Card EXT2 P1 Kernel
    Card Type: SD 2.0 SDHC / Mfr: 0x03, OEM "SD" / SU08G", rev 8.0 / s/n: 1882195497 / date: 7/2008
    SDHC size: 7790 MiB
    Partition: 1 start +16 512-byte blocks, size 7790 MiB
 ** skipping 
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: SD Card EXT2 P2 Kernel
    Partition: 2 start +0 512-byte blocks, size 0 MiB
 ** ext2fs_devread() read outside partition sector 2
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: SD Card EXT2 P3 Kernel
    Partition: 3 start +0 512-byte blocks, size 0 MiB
 ** ext2fs_devread() read outside partition sector 2
Failed to mount ext2 filesystem...
Unable to mount ext2 filesystem

Trying kernel: NAND Kernel
     RAW open: +1024 512-byte blocks
        Found: "openmoko/2.6.28-stable+gitr0+f19"
         Size: 1844 KiB
     RAW open: +1024 512-byte blocks
 ** nand bad block 00000600
 ** nand bad block count 00000001
 ** nand bad block 00000600
 ** nand bad block count 00000002
 ** nand bad block 00000604
 ** nand bad block count 00000003
 ** nand bad block 00000608
 ** nand bad block count 00000004
 ** nand bad block 0000060c
 ** nand bad block count 00000005
 ** nand bad block 00000610
 ** nand bad block count 00000006
 ** nand bad block 00000614
 ** nand bad block count 00000007
 ** nand bad block 00000618
 ** nand bad block count 00000008
 ** nand bad block 0000061c
 ** nand bad block count 00000009
 ** nand bad block 00000620
 ** nand bad block count 0000000a
 ** nand bad block 00000624
 ** nand bad block count 0000000b
 ** nand bad block 00000628
 ** nand bad block count 0000000c
 ** nand bad block 0000062c
 ** nand bad block count 0000000d
 ** nand bad block 00000630
 ** nand bad block count 0000000e
 ** nand bad block 00000634
 ** nand bad block count 0000000f
 ** nand bad block 00000638
 ** nand bad block count 00000010
 ** nand bad block 0000063c
 ** nand bad block count 00000011
 ** nand bad block 00000640
 ** nand bad block count 00000012
 ** nand bad block 00000644
 ** nand bad block count 00000013
 ** nand bad block 00000648
 ** nand bad block count 00000014
 ** nand bad block 0000064c
 ** nand bad block count 00000015
 ** nand bad block 00000650
 ** nand bad block count 00000016
 ** nand bad block 00000654
 ** nand bad block count 00000017
 ** nand bad block 00000658
 ** nand bad block count 00000018
 ** nand bad block 0000065c
 ** nand bad block count 00000019
 ** nand bad block 00000660
 ** nand bad block count 0000001a
 ** nand bad block 00000664
 ** nand bad block count 0000001b
 ** nand bad block 00000668
 ** nand bad block count 0000001c
 ** nand bad block 0000066c
 ** nand bad block count 0000001d
 ** nand bad block 00000670
 ** nand bad block count 0000001e
 ** nand bad block 00000674
 ** nand bad block count 0000001f
 ** nand bad block 00000678
 ** nand bad block count 00000020
 ** nand bad block 0000067c
 ** nand bad block count 00000021
 ** nand bad block 00000680
 ** nand bad block count 00000022
 ** nand bad block 00000684
 ** nand bad block count 00000023
 ** nand bad block 00000688
 ** nand bad block count 00000024
 ** nand bad block 0000068c
 ** nand bad block count 00000025
 ** nand bad block 00000690
 ** nand bad block count 00000026
 ** nand bad block 00000694
 ** nand bad block count 00000027
 ** nand bad block 00000698
 ** nand bad block count 00000028
 ** nand bad block 0000069c
 ** nand bad block count 00000029
 ** nand bad block 000006a0
 ** nand bad block count 0000002a
 ** nand bad block 000006a4
 ** nand bad block count 0000002b
 ** nand bad block 000006a8
 ** nand bad block count 0000002c
 ** nand bad block 000006ac
 ** nand bad block count 0000002d
 ** nand bad block 000006b0
 ** nand bad block count 0000002e
 ** nand bad block 000006b4
 ** nand bad block count 0000002f
 ** nand bad block 000006b8
 ** nand bad block count 00000030
 ** nand bad block 000006bc
 ** nand bad block count 00000031
 ** nand bad block 000006c0
 ** nand bad block count 00000032
 ** nand bad block 000006c4
 ** nand bad block count 00000033
 ** nand bad block 000006c8
 ** nand bad block count 00000034
 ** nand bad block 000006cc
 ** nand bad block count 00000035
 ** nand bad block 000006d0
 ** nand bad block count 00000036
 ** nand bad block 000006d4
 ** nand bad block count 00000037
 ** nand bad block 000006d8
 ** nand bad block count 00000038
 ** nand bad block 000006dc
 ** nand bad block count 00000039
 ** nand bad block 000006e0
 ** nand bad block count 0000003a
 ** nand bad block 000006e4
 ** nand bad block count 0000003b
 ** nand bad block 000006e8
 ** nand bad block count 0000003c
 ** nand bad block 000006ec
 ** nand bad block count 0000003d
 ** nand bad block 000006f0
 ** nand bad block count 0000003e
 ** nand bad block 000006f4
 ** nand bad block count 0000003f
 ** nand bad block 000006f8
 ** nand bad block count 00000040
 ** nand bad block 000006fc
 ** nand bad block count 00000041

Kernel CRC ERROR: read 0xbd3e8efe vs hdr CRC 0xff9bd935
bad magic 6f6b6f6d

No usable kernel image found

Memory Testing 0x30000000 length 128 MB
 Test series 1  ...


More information about the openmoko-kernel mailing list