[U-Boot] [PATCH] ARM: omap3_logic: Add scripts to program NAND
Ladislav Michl
ladis at linux-mips.org
Wed Jan 4 19:15:09 CET 2017
On Wed, Jan 04, 2017 at 12:06:48PM -0600, Adam Ford wrote:
> 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.
Do you really need this all in environment? What about making this u-boot
script and store it on mmc together with MLO, u-boot.img, etc...
ladis
> 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
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
More information about the U-Boot
mailing list