From daa483debea9596f23f5869f7623cec1ef761718 Mon Sep 17 00:00:00 2001 From: "ahaslam@baylibre.com" Date: Fri, 17 Mar 2017 16:55:23 +0100 Subject: [PATCH] da850: Add instructions to copy AIS image to NAND Add instructions to write an AIS image to NAND by using the u-boot nand tools. Signed-off-by: Axel Haslam --- board/davinci/da8xxevm/README.da850 | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/board/davinci/da8xxevm/README.da850 b/board/davinci/da8xxevm/README.da850 index 29cb4ec408..519267e2f0 100644 --- a/board/davinci/da8xxevm/README.da850 +++ b/board/davinci/da8xxevm/README.da850 @@ -47,6 +47,47 @@ U-Boot > sf erase 0 +320000 U-Boot > tftp u-boot.ais U-Boot > sf write c0700000 0 $filesize +Flashing the images to NAND +=========================== +The AIS image can be written to NAND using the u-boot "nand" commands. + +Example: + +OMAPL138_LCDK requires the AIS image to be written to the second block of +the NAND flash. + +From the "nand info" command we see that the second block would start at +offset 0x20000: + + U-Boot > nand info + sector size 128 KiB (0x20000) + Page size 2048 b + +From the tftp command we see that we need to copy 0x74908 bytes from +memory address 0xc0700000 (0x75000 if we align a page of 2048): + + U-Boot > tftp u-boot.ais + Load address: 0xc0700000 + Bytes transferred = 477448 (74908 hex) + +The commands to write the image from memory to NAND would be: + + U-Boot > nand erase 0x20000 0x75000 + U-Boot > nand write 0xc0700000 0x20000 0x75000 + +Alternatively, MTD partitions may be defined. Using "mtdparts" to +conveniently have a bootloader partition starting at the second block +(offset 0x20000): + + setenv mtdids nand0=davinci_nand.0 + setenv mtdparts mtdparts=davinci_nand.0:128k(bootenv),2m(bootloader) + +In this case the commands would be simplified to: + + U-Boot > tftp u-boot.ais + U-Boot > nand erase.part bootloader + U-Boot > nand write 0xc0700000 bootloader + Flashing the images to MMC ========================== If the boot pins are set to boot from mmc, the RBL will try to load the