[U-Boot] [PATCH] ARM: omap3_logic: Add scripts to program NAND
Adam Ford
aford173 at gmail.com
Wed Jan 4 19:06:48 CET 2017
This patch adds scripts to burn the kernel, U-Boot, and MLO to NAND.
The RootFS needs to be added and programmed from the kernel for now.
Signed-off-by: Adam Ford <aford173 at gmail.com>
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 90faaf4..632885a 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -227,7 +227,33 @@
"nandbootz=run nandbootcommon; "\
"bootz ${loadaddr} - ${fdtaddr}\0"\
"nandboot=run nandbootcommon; "\
- "bootm ${loadaddr} - ${fdtaddr}\0"\
+ "bootm ${loadaddr} - ${fdtaddr}\0" \
+ "nandburnkernel=echo 'Burn Image to NAND...'; "\
+ "nand unlock;" \
+ "echo 'Erasing Kernel partition...';" \
+ "nand erase.part kernel; "\
+ "run loadimage; " \
+ "echo 'Flashing Kernel partition...';" \
+ "nand write ${loadaddr} kernel ${filesize}; \0" \
+ "nandburnzimage=setenv bootfile zImage; run nandburnkernel\0"\
+ "nandburnuimage=setenv bootfile uImage; run nandburnkernel\0"\
+ "nandburnuboot=echo 'Burn U-Boot to NAND...'; " \
+ "nand unlock;" \
+ "echo 'Erasing U-Boot partition...';" \
+ "nand erase.part u-boot; "\
+ "mmc rescan; " \
+ "load mmc ${mmcdev} ${loadaddr} u-boot.img; " \
+ "echo 'Flashing U-Boot partition...';" \
+ "nand write ${loadaddr} u-boot ${filesize};\0" \
+ "nandburnmlo=echo 'Burn MLO to NAND...'; " \
+ "nand unlock;" \
+ "echo 'Erasing MLO partition...';" \
+ "nand erase.part MLO; "\
+ "mmc rescan; " \
+ "load mmc ${mmcdev} ${loadaddr} MLO; " \
+ "nandecc hw;" \
+ "echo 'Flashing MLO partition...';" \
+ "nand write ${loadaddr} MLO ${filesize};\0"
#define CONFIG_BOOTCOMMAND \
"run autoboot"
--
2.7.4
More information about the U-Boot
mailing list