board/ti/am335x/README: update for NAND boot

NAND boot mode on AM335x EVM has been verified, and steps
to use it has been documented and update in this README

Signed-off-by: Pekon Gupta <pekon@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Tom Rini <trini@ti.com>
This commit is contained in:
pekon gupta
2013-11-19 11:02:18 +05:30
committed by Scott Wood
parent 6e562b1106
commit 32f4d729e7

View File

@@ -46,23 +46,42 @@ NAND
The AM335x GP EVM ships with a 256MiB NAND available in most profiles. In The AM335x GP EVM ships with a 256MiB NAND available in most profiles. In
this example to program the NAND we assume that an SD card has been this example to program the NAND we assume that an SD card has been
inserted with the files to write in the first SD slot and that mtdparts inserted with the files to write in the first SD slot and that mtdparts
have been configured correctly for the board. As a time saving measure we have been configured correctly for the board. All images are first loaded
load MLO into memory in one location, copy it into the three locatations into memory, then written to NAND.
that the ROM checks for additional valid copies, then load U-Boot into
memory. We then write that whole section of memory to NAND.
U-Boot # mmc rescan Step-1: Building u-boot for NAND boot
U-Boot # env default -f -a Set following CONFIGxx options for NAND device.
U-Boot # nand erase.chip CONFIG_SYS_NAND_PAGE_SIZE number of main bytes in NAND page
U-Boot # saveenv CONFIG_SYS_NAND_OOBSIZE number of OOB bytes in NAND page
U-Boot # load mmc 0 81000000 MLO CONFIG_SYS_NAND_BLOCK_SIZE number of bytes in NAND erase-block
U-Boot # cp.b 81000000 81020000 20000 CONFIG_SYS_NAND_ECCPOS ECC map for NAND page
U-Boot # cp.b 81000000 81040000 20000 CONFIG_NAND_OMAP_ECCSCHEME (refer doc/README.nand)
U-Boot # cp.b 81000000 81060000 20000
U-Boot # load mmc 0 81080000 u-boot.img Step-2: Flashing NAND via MMC/SD
U-Boot # nand write 81000000 0 260000 # select BOOTSEL to MMC/SD boot and boot from MMC/SD card
U-Boot # load mmc 0 ${loadaddr} uImage U-Boot # mmc rescan
U-Boot # nand write ${loadaddr} kernel 500000 # erase flash
U-Boot # nand erase.chip
U-Boot # env default -f -a
U-Boot # saveenv
# flash MLO. Redundant copies of MLO are kept for failsafe
U-Boot # load mmc 0 0x82000000 MLO
U-Boot # nand write 0x82000000 0x00000 0x20000
U-Boot # nand write 0x82000000 0x20000 0x20000
U-Boot # nand write 0x82000000 0x40000 0x20000
U-Boot # nand write 0x82000000 0x60000 0x20000
# flash u-boot.img
U-Boot # load mmc 0 0x82000000 u-boot.img
U-Boot # nand write 0x82000000 0x80000 0x60000
# flash kernel image
U-Boot # load mmc 0 0x82000000 uImage
U-Boot # nand write 0x82000000 ${nandsrcaddr} ${nandimgsize}
# flash filesystem image
U-Boot # load mmc 0 0x82000000 filesystem.img
U-Boot # nand write 0x82000000 ${loadaddress} 0x300000
Step-3: Set BOOTSEL pin to select NAND boot, and POR the device.
The device should boot from images flashed on NAND device.
NOR NOR
=== ===