Skip to content
Snippets Groups Projects
Commit c6ac7e3b authored by Khoronzhuk, Ivan's avatar Khoronzhuk, Ivan Committed by Tom Rini
Browse files

k2hk_evm: add script to automate NAND flash process


Add script to automate NAND flash process. As for now the board has
two burn scripts - burn to boot from SPI NOR flash and burn to boot
from AEMIF NAND flash, rename burn_uboot script to burn_uboot_spi.
Also update README to contain NAND burn U-boot process description.

Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
parent 0e7f2dba
No related branches found
No related tags found
No related merge requests found
...@@ -38,11 +38,13 @@ board configuration file: include/configs/k2hk_evm.h ...@@ -38,11 +38,13 @@ board configuration file: include/configs/k2hk_evm.h
Supported boot modes: Supported boot modes:
- SPI NOR boot - SPI NOR boot
- AEMIF NAND boot
Supported image formats:- Supported image formats:-
- u-boot.bin: for loading and running u-boot.bin through Texas instruments - u-boot.bin: for loading and running u-boot.bin through Texas instruments
code composure studio (CCS) code composure studio (CCS)
- u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
- u-boot-nand.gph: gpimage for programming AEMIF NAND flash for NAND boot
Build instructions: Build instructions:
=================== ===================
...@@ -55,6 +57,10 @@ To build u-boot-spi.gph ...@@ -55,6 +57,10 @@ To build u-boot-spi.gph
>make k2hk_evm_config >make k2hk_evm_config
>make u-boot-spi.gph >make u-boot-spi.gph
To build u-boot-nand.gph
>make k2hk_evm_config
>make u-boot-nand.gph
Load and Run U-Boot on K2HK EVM using CCS Load and Run U-Boot on K2HK EVM using CCS
========================================= =========================================
...@@ -115,8 +121,28 @@ instructions:- ...@@ -115,8 +121,28 @@ instructions:-
5. At the U-Boot console type following to setup u-boot environment variables. 5. At the U-Boot console type following to setup u-boot environment variables.
setenv addr_uboot 0x87000000 setenv addr_uboot 0x87000000
setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000> setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
run burn_uboot run burn_uboot_spi
Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
to "SPI Little Endian Boot mode" as per instruction at to "SPI Little Endian Boot mode" as per instruction at
http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup. http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup.
6. Power ON the EVM. The EVM now boots with u-boot image on the NOR flash. 6. Power ON the EVM. The EVM now boots with u-boot image on the NOR flash.
AEMIF NAND Flash programming instructions
======================================
U-Boot image can be flashed to first 1024KB of the NAND flash using following
instructions:-
1. Start CCS and run U-boot as described above.
2. Suspend Target. Select Run -> Suspend from top level menu
CortexA15_1 (Free Running)"
3. Load u-boot-nand.gph binary from build folder on to DDR address 0x87000000
through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
using CCS", but using address 0x87000000.
4. Free Run the target as desribed earlier (step 4) to get u-boot prompt
5. At the U-Boot console type following to setup u-boot environment variables.
setenv filesize <size in hex of u-boot-nand.gph rounded to hex 0x10000>
run burn_uboot_nand
Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
to "ARM NAND Boot mode" as per instruction at
http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup.
6. Power ON the EVM. The EVM now boots with u-boot image on the NAND flash.
...@@ -221,8 +221,10 @@ ...@@ -221,8 +221,10 @@
"get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0" \ "get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0" \
"get_mon_ubi=ubifsload ${addr_mon} ${name_mon}\0" \ "get_mon_ubi=ubifsload ${addr_mon} ${name_mon}\0" \
"get_uboot_net=dhcp ${addr_uboot} ${tftp_root}/${name_uboot}\0" \ "get_uboot_net=dhcp ${addr_uboot} ${tftp_root}/${name_uboot}\0" \
"burn_uboot=sf probe; sf erase 0 0x100000; " \ "burn_uboot_spi=sf probe; sf erase 0 0x100000; " \
"sf write ${addr_uboot} 0 ${filesize}\0" \ "sf write ${addr_uboot} 0 ${filesize}\0" \
"burn_uboot_nand=nand erase 0 0x100000; " \
"nand write ${addr_uboot} 0 ${filesize}\0" \
"args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1\0" \ "args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment