[U-Boot] [PATCH] ARM: omap3_logic: Add scripts to program NAND
Adam Ford
aford173 at gmail.com
Wed Jan 4 20:51:50 CET 2017
On Wed, Jan 4, 2017 at 12:15 PM, Ladislav Michl <ladis at linux-mips.org> wrote:
> 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...
>
I can see that argument. I only added it because the custom version
we have published has similar types of scripts. Because we distribute
modules and not final product, I was trying to make it easier for our
customers to use U-Boot.
I guess I'm ok with dropping it in favor of a boot script from the SD card.
adam
> 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