Template:EZSDK flash images NAND

Flashing Images to NAND from SD Card
To keep the u-boot on NAND, required to be flashed.

Setting up the board

 * 1) Please insert the SD card with the EZSDK installed into the slot in EVM.
 * 2) Ensure that the switch settings for NAND is ON as shown here:

Note: With the psp release 04.04.00.01, to use 16-bit NAND, set the CS0BW (buswidth) switch on the EVM to ON state. Please read the PSP Release notes for details on the NAND Flash changes. The CS0BW switch is the 8th Pin on the EVM Boot Mode Switch.

Now your board is setup for running the script

Running the setup-nand-images script
Note! Before continuing ensure that the environment variable EZSDK which points to where your EZ SDK is installed is set by running:

host $ echo $EZSDK

This command should print your EZSDK installation directory. If it doesn't, you will have to set it again as described in the Software Developers Guide.

The images are flashed to NAND via the shell script "setup-nand-images.sh" in the "$EZSDK/bin/" folder which generates the minicom script in the EZSDK installation directory for flashing the images. To run the script for flashing of NAND images execute the following command:

Note! The size used in command to flash the u-boot and kernel images to NAND are the default sizes of images aligned with NAND page size with a buffer of 4KiB.

host $ $EZSDK/bin/setup-nand-images.sh

The script will ask whether you want to flash the kernel image to NAND. If you go by the default options it would flash both u-boot and kernel images need to be flashed on NAND.

Power cycle the board and press any key to stop autoboot of the uboot. Once the autoboot is stopped, this script will automatically flash the images to NAND. Once you have finished running the script, please change the boot mode settings to NAND boot as shown here:

Run the minicom on your host by

host $ minicom -w

and set the boot parameters accordingly on u-boot prompt.

Running the script manually using minicom
The setup-nand-images.sh will create a minicom script file in EZSDK directory by the name "setup_u-boot_nand.minicom" or "setup_u-boot_uImage_nand.minicom" depending whether you want it to flash the kernel image to NAND or not.

If you don't want to run the minicom script now, you can manually run minicom in the future with this setup script using:

host $ minicom -S setup_u-boot_xxxx_nand.minicom

Setting the boot parameters
If the script is also used to flash the kernel image to NAND, to boot with this kernel image on NAND, set the bootcmd parameter in the format as shown here:

u-boot :> setenv bootcmd 'nand read 0x81000000 0x00280000 ; bootm 0x81000000'

Note! 0x81000000 is the load address in DDR where the command would load the kernel image and 0x00280000 is the offset to the partition on NAND for the kernel image