Hi
I followed section 4 (SD card method) of AM3517 SOM M2 programming for End-Product Manufacturing (Application note 539) to program images on to NAND memory and boot from NAND. AM3517 boot from SD card and programs images on to NAND flash without any error but AM3517 fails to load kernel from NAND flash when I change boot switch configuration to boot from NAND flash and power cycle.
After power cycle AM3517 boots up from NAND and executes UBOOT correctly but fails to to load kernel. "Error: Bad compare! failed" error appears on my terminal when it tries to load kernel from NAND.
I am using default images and boot.scr which are part of AM3517_SOM-M2_Programming_for_End-Product_Manufacturing_Files.
Here is terminal dump during this operation
40X▒
U-Boot SPL 2011.09 (Apr 29 2013 - 11:42:40)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
U-Boot 2011.09 (Apr 29 2013 - 11:42:40)
AM35XX-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 Mhz
AM3517EVM Board + LPDDR/NAND
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: HW ECC [Kernel/FS layout] selected
512 MiB
MMC: OMAP SD/MMC: 0
In: serial
Out: serial
Err: serial
Die ID #7460000100000000015da3961000d009
Net: Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot: 0
reading boot.scr
1755 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
Initializing MMC
Initializing and erasing NAND
NAND erase.chip: device 0 whole chip
Skipping bad block at 0x0ddc0000
Skipping bad block at 0x17c60000
Skipping bad block at 0x1e940000
Erasing at 0x1ffe0000 -- 100% complete.
OK
loading MLO
reading MLO
36840 bytes read
HW ECC [X-loader/U-boot layout] selected
NAND write: device 0 offset 0x0, size 0x20000
131072 bytes written: OK
NAND write: device 0 offset 0x20000, size 0x20000
131072 bytes written: OK
NAND write: device 0 offset 0x40000, size 0x20000
131072 bytes written: OK
NAND write: device 0 offset 0x60000, size 0x20000
131072 bytes written: OK
loading u-boot
reading u-boot.img
265740 bytes read
HW ECC [X-loader/U-boot layout] selected
NAND write: device 0 offset 0x80000, size 0x1c0000
1835008 bytes written: OK
loading kernel
NAND erase: device 0 offset 0x280000, size 0x1000000
Erasing at 0x1260000 -- 100% complete.
OK
reading uImage
3029008 bytes read
4 BIT SW ECC selected
NAND write: device 0 offset 0x280000, size 0x1000000
16777216 bytes written: OK
loading rootfs
Clearing buffer (This takes a couple minutes and there are no status updates.)
loading from SD (This takes about 5 minutes and there are no status updates.)
reading rootfs.jffs2
14106504 bytes read
NAND erase: device 0 offset 0x780000, size 0x1f880000
Skipping bad block at 0x0ddc0000
Skipping bad block at 0x17c60000
Skipping bad block at 0x1e940000
Erasing at 0x1ffe0000 -- 100% complete.
OK
4 BIT SW ECC selected
writing NAND (This takes about 1.5 minutes and there are no status updates.)
NAND write: device 0 offset 0x780000, size 0xd74000
14106624 bytes written: OK
setting up boot process
HW ECC [Kernel/FS layout] selected
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x260000 -- 100% complete.
Writing to Nand... done
AM3517_EVM #
------------------------------------------------------------------------------------------------------------------------------------------------------------
Power off board; remove S D card, change boot switch to boot from NAND and apply power
------------------------------------------------------------------------------------------------------------------------------------------------------------
U-Boot SPL 2011.09 (Apr 29 2013 - 11:42:40)
Texas Instruments Revision detection unimplemented
U-Boot 2011.09 (Apr 29 2013 - 11:42:40)
AM35XX-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 Mhz
AM3517EVM Board + LPDDR/NAND
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: HW ECC [Kernel/FS layout] selected
512 MiB
MMC: OMAP SD/MMC: 0
In: serial
Out: serial
Err: serial
Die ID #7460000100000000015da3961000d009
Net: Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
Booting from nand ...
NAND read: device 0 offset 0x280000, size 0x500000
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
......
.....
......
......
.....
Error: Bad compare! failed
Error: Bad compare! failed
NAND read from offset 280000 failed -74
0 bytes read: ERROR
## Booting kernel from Legacy Image at 83000000 ...
Image Name: Linux-2.6.37
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3028944 Bytes = 2.9 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
AM3517_EVM #