diff mbox

[U-Boot,5/6] omap3: overo: Allow boot with kernel in UBI rootfs

Message ID 1430263075-27682-6-git-send-email-ashcharles@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Ash Charles April 28, 2015, 11:17 p.m. UTC
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 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Tom Rini May 10, 2015, 2:09 p.m. UTC | #1
On Tue, Apr 28, 2015 at 04:17:54PM -0700, Ash Charles wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 61213df..e1db29a 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -140,6 +140,8 @@ 
 		"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" \
@@ -148,6 +150,13 @@ 
 		"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 " \
@@ -175,6 +184,10 @@ 
 		"fi;" \
 	"fi;" \
 	"run nandboot; " \
+	"if test -z \"${fdtfile}\"; then "\
+		"setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \
+	"fi;" \
+	"run nanddtsboot; " \
 
 /*
  * Miscellaneous configurable options