Hi Rowboat friends,
I am using a DM3730 based board and I have run into a bit of difficulty trying to get pure NAND boot to work.
I am using the x-loader source that came with Rowboat Devkit 2.1 Gingerbread.
*) First, I checked our standard steps on a beagleboard by flashing the MLO that we built and checking that
it is able to boot without microSD. We flash by booting into u-boot from the SD. For this initial test, we are
flashing the same x-loader that we use for booting from SD since we just want to make sure we can see
the x-loader startup message and we don't care if we don't get past that into u-boot.
Texas Instruments X-Loader 1.5.1 (Jan 6 2012 - 16:49:06)
Beagle Rev C1/C2/C3
Reading boot sector
Loading u-boot.bin from mmc
U-Boot 2010.06 (Dec 31 2011 - 21:04:15)
OMAP3430/3530-GP ES3.0, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 256 MiB
NAND: HW ECC [Kernel/FS layout] selected
256 MiB
*** Warning - bad CRC or NAND, using default environment
In: serial
Out: serial
Err: serial
Beagle Rev C1/C2/C3
Die ID #1308000300000000040323091000a01a
Hit any key to stop autoboot: 0
OMAP3 beagleboard.org # fatload mmc 0:1 80000000 MLO
reading MLO
24964 bytes read
OMAP3 beagleboard.org # nand erase 0 80000
NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nandecc hw 2
HW ECC [X-loader/U-boot layout] selected
OMAP3 beagleboard.org # nand write 80000000 0 80000
NAND write: device 0 offset 0x0, size 0x80000
524288 bytes written: OK
(power off, take out microSD and then on)
Texas Instruments X-Loader 1.5.1 (Jan 6 2012 - 16:49:06)
Beagle Rev C1/C2/C3
Loading u-boot.bin from nand
u-boot.bin not found or blank nand contents - attempting serial boot . . .
## Ready for binary (kermit) download to 0x80008000 at 115200 bps...
As can be seen from above, our test passed on beagleboard C3. We are able to build x-loader/MLO,
put it on SD, then use u-boot to flash it to NAND and then take out the SD and then see the
X-Loader boot message on the serial console.
c) Now, we take this step and test it on our DM3730 board. We are using the same Micron memory as the beagleboard C3.
Texas Instruments X-Loader 1.5.1 (Nov 2 2011 - 15:36:12)
Wiser2 with old memory
Reading boot sector
Loading u-boot.bin from mmc
U-Boot 2010.06-dirty (Jan 16 2012 - 01:18:53)
OMAP34xx/35xx-GP ES2.1, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 256 MiB
NAND: HW ECC [Kernel/FS layout] selected
256 MiB
*** Warning - bad CRC or NAND, using default environment
In: serial
Out: serial
Err: serial
Wiser2
eth gpio 22=1
Die ID #420800029ff800000160a74507005015
Net: smc911x-0
Hit any key to stop autoboot: 0
OMAP3 beagleboard.org # mmc init
mmc1 is available
OMAP3 beagleboard.org # fatload mmc 0:1 80000000 MLO
reading MLO
24964 bytes read
OMAP3 beagleboard.org # nand erase 0 80000
NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nandecc hw 2
HW ECC [X-loader/U-boot layout] selected
OMAP3 beagleboard.org # nand write 80000000 0 80000
NAND write: device 0 offset 0x0, size 0x80000
524288 bytes written: OK
( we power off, take out microSD and power on)
OMAP3 beagleboard.org # 6060606060606060
As can be seen above, the 60,60,60 is because the TI bootROM is not finding any suitable X-Loader for it to boot from NAND.
d) I checked that ECC is correct. As can be seen below:
- first dump memory to check what's there
# md.l 80000000 10
80000000: 000000c0 00000000 00000100 01400080 ..............@.
80000010: 00000040 00000040 40080008 00000008 @...@......@....
80000020: 00480040 00011040 00900100 00400488 @.H.@.........@.
80000030: 00000200 02040000 00a00040 020000c0 ........@.......
- then without changing ecc, we readback u-boot block to check that we get our expected ecc error
OMAP3 beagleboard.org # nand read 80000000 0 80000
NAND read: device 0 offset 0x0, size 0x80000
Error: Bad compare! failed
- now we switch to the correct ecc for bootROM and dump the area
OMAP3 beagleboard.org # nandecc hw 2
HW ECC [X-loader/U-boot layout] selected
OMAP3 beagleboard.org # nand read 80000000 0 80000
NAND read: device 0 offset 0x0, size 0x80000
524288 bytes read: OK
OMAP3 beagleboard.org # md.l 80000000 40
80000000: 00005b48 40200800 ea000012 e59ff014 H[.... @........
80000010: e59ff010 e59ff00c e59ff008 e59ff004 ................
80000020: e59ff000 e51ff004 40200960 12345678 ........`. @xV4.
80000030: 12345678 12345678 12345678 12345678 xV4.xV4.xV4.xV4.
80000040: 12345678 12345678 40200800 40200800 xV4.xV4... @.. @
80000050: 40206348 402094c4 e10f0000 e3c0001f Hc @.. @........
80000060: e38000d3 e129f000 e24f0068 e2800004 ......).h.O.....
80000070: e3a02040 e0802002 e3a01101 e3a03602 @ ... .......6..
80000080: e0811003 e3a03b3e e0811003 e8b007f8 ....>;..........
80000090: e8a107f8 e1500002 1afffffb eb00003a ......P.....:...
This matches the expected data as we read it from disk.
# hexdump -C /mnt/129/home/test/work/x-loader/MLO.forNAND | head -10
00000000 48 5b 00 00 00 08 20 40 12 00 00 ea 14 f0 9f e5 |H[.... @........|
00000010 10 f0 9f e5 0c f0 9f e5 08 f0 9f e5 04 f0 9f e5 |................|
00000020 00 f0 9f e5 04 f0 1f e5 60 09 20 40 78 56 34 12 |........`. @xV4.|
00000030 78 56 34 12 78 56 34 12 78 56 34 12 78 56 34 12 |xV4.xV4.xV4.xV4.|
00000040 78 56 34 12 78 56 34 12 00 08 20 40 00 08 20 40 |xV4.xV4... @.. @|
00000050 48 63 20 40 c4 94 20 40 00 00 0f e1 1f 00 c0 e3 |Hc @.. @........|
00000060 d3 00 80 e3 00 f0 29 e1 68 00 4f e2 04 00 80 e2 |......).h.O.....|
00000070 40 20 a0 e3 02 20 80 e0 01 11 a0 e3 02 36 a0 e3 |@ ... .......6..|
00000080 03 10 81 e0 3e 3b a0 e3 03 10 81 e0 f8 07 b0 e8 |....>;..........|
00000090 f8 07 a1 e8 02 00 50 e1 fb ff ff 1a 3a 00 00 eb |......P.....:...|
I'm really confused why this is not working. I was able to get UBIFS/rootfs to work fine from NAND.
It is just the first stage (MLO/x-loader) that is not working from NAND and I'm really
stumped/banging head on wall as to why this is not working. I'd appreciate any help/suggestions
that you may have.
Thanks,
jaya