Hi,
My SD with worked fine in the customised AM335x board running as initramfs but I am having trouble when trying to manually write image files from SD to NAND in u-boot.
The default NAND partitions I could see when booting up from SD is as follow
[ 5.087055] Creating 10 MTD partitions on "omap2-nand.0":
[ 5.091645] 0x000000000000-0x000000020000 : "NAND.SPL" --->128 K
[ 5.097802] 0x000000020000-0x000000040000 : "NAND.SPL.backup1" --->128 K
[ 5.104451] 0x000000040000-0x000000060000 : "NAND.SPL.backup2" --->128 K
[ 5.111122] 0x000000060000-0x000000080000 : "NAND.SPL.backup3" --->128 K
[ 5.117535] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os" --->256 K
[ 5.124502] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot" --->1 M
[ 5.131953] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env" --->128 K
[ 5.138298] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1" --->128 K
[ 5.145541] 0x000000200000-0x000000a00000 : "NAND.kernel" --->8 M
[ 5.163324] 0x000000a00000-0x000010000000 : "NAND.file-system" --->246 M
And when under the U-BOOT prompt I could:
(1) flash my 'MLO' to 'NAND.SPL'-
U-Boot# fatload mmc 0 0x82000000 MLO
U-Boot# nand write 0x82000000 0x0 0x20000
NAND write 131072 bytes OK
(2) flash my 'u-boot.img' to 'NAND.u-boot'-
U-Boot# fatload mmc 0 0x82000000 u-boot.img
U-Boot# nand write 0x82000000 0xc0000 0x100000
NAND write 437852 bytes OK
(3) flash my 'am335x-evm.dtb' to 'NAND.u-boot-spl-os'
U-Boot# ext4load mmc 0:2 0x82000000 boot/am335x-evm.dtb
U-Boot# nand write 0x82000000 0x80000 0x40000
NAND write 33850 bytes OK
And then I got stuck as my image is 'zImage' for initramfs and is about 50 M. I could load it but I don't know where to write to as 'NAND.kernel' only has 8M.
I then changed the 'NAND.kernel' size to 100 M, which I am not sure if it's correct thing to do but just for a try to see if I can write zImage to the NAND. I then got stuck when trying to write the zImage to 'NAND.kernel'.
U-Boot# ext4load mmc 0:2 0x82000000 boot/zImage
52010112 bytes read in 5487 ms (9 MiB/s)
Timeout!NAND write to offset 200000 failed -5
0 bytes written: ERROR
How to write my zImage to the NAND? is it because the size is too large?
I am guessing It probably isn't correct anyway, as refer to my SD card which has boot and rootfs partitions as:
boot/MLO
boot/u-boot.img
rootfs/boot/zImage
rootfs/boot/am335x-evm.dtb
and I am guessing I should write my whole rootfs into 'NAND.file-system' instead? hence my second (real) question is; how to write and boot from NAND (as initramfs) given the four files I have.
Thanks for your help.
George