]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
omap3: overo: Allow boot with kernel in UBI rootfs
authorAsh Charles <ashcharles@gmail.com>
Tue, 28 Apr 2015 23:17:54 +0000 (16:17 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 10 May 2015 11:29:39 +0000 (07:29 -0400)
If regular NAND booting fails to find a valid uImage in the
kernel partition in NAND, try to boot using a zImage and dtb found
in a UBI volume in the rootfs partition.  This is the NAND analog
of mmc zImage booting for device-tree based kernels.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
include/configs/omap3_overo.h

index 61213df9a8a9ee59476ad493d463f73fd07b31b3..e1db29ad285c11948a44455a4c7e720534ce4403 100644 (file)
                "bootm ${loadaddr}\0" \
        "loadzimage=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}\0" \
        "loadfdt=load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+       "loadubizimage=ubifsload ${loadaddr} ${bootdir}/${bootfile}\0" \
+       "loadubifdt=ubifsload ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "mmcbootfdt=echo Booting with DT from mmc ...; " \
                "run mmcargs; " \
                "bootz ${loadaddr} - ${fdtaddr}\0" \
                "if nand read ${loadaddr} linux; then " \
                        "bootm ${loadaddr};" \
                "fi;\0" \
+       "nanddtsboot=echo Booting from nand with DTS...; " \
+               "run nandargs; " \
+               "ubi part rootfs; "\
+               "ubifsmount ubi0:rootfs; "\
+               "run loadubifdt; "\
+               "run loadubizimage; "\
+               "bootz ${loadaddr} - ${fdtaddr}\0" \
 
 #define CONFIG_BOOTCOMMAND \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "fi;" \
        "fi;" \
        "run nandboot; " \
+       "if test -z \"${fdtfile}\"; then "\
+               "setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \
+       "fi;" \
+       "run nanddtsboot; " \
 
 /*
  * Miscellaneous configurable options