Part Number: 66AK2H12
I have a revision 4 K2HEVM.
It boots correctly from SPI flash, but I would like to boot directly from NAND flash.
uboot runs correctly; I have been using uboot commands to alter NAND flash, and then resetting. NAND is present and reliable, and all experiments use "nand ecclayout set 1" to ensure the ECC is RBL compatible.
I have tried several different GPH executables, all single stage, and I have noticed the following:
- If the image is "large", it does not boot. Furthermore, RBL hangs, looping somewhere. It appears that it has initialized the EMIF interface the RBL does not move anything from NAND into MSMC (all images load into MSMC). This is based on observing memory contents in the emulator when a boot does not complete.
-As an experiment, I copied the contents of the SPI flash (0x5_0000 bytes) from SPI into SDRAM and then into NAND flash. This worked. I note this image appears to have a small, first stage boot loader of length 0x2480. This image presumably then loads u-boot from a higher address in SPI flash.
- Before writing the NAND flash copy of the SPI code, I zeroed out the SDRAM copy of SPI from 0x3000 to 0x5_0000. I then wrote this to NAND flash. This boots. (Presumably the first stage boot loader loads, runs, and completes the boot from SPI flash).
- If I change the first word to 0x00ff_0000, increasing the GPH header length, and re-write NAND flash, (so, GPH header with length 0x0000_ff00), the image boots.
- However, if I change the first word to 0x1000_0001 and rewrite NAND flash (so, GPH header indicating a length of 0x0001_0010), the image does not boot.
It appears that GPH images > 64KB do not boot from NAND flash; from the emulator it appears that the RBL initializes EMIF and then stops based on observing the length of the image.
Is there, in the RBL, a length restriction on the image size when booting from NAND flash?
Thanks.