Skip to contentSkip to conversation

omap3_beagle: xM A/B validate new dtb exits in file system

PATCH New robertcnelson 2 participants 4 messages May 2, 2014 – May 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 omap3_beagle: xM A/B validate new dtb exits in file system

From: Robert Nelson <[email protected]>

Fall back to previous dtb used when omap3-beagle-xm-ab.dtb doesn't exist in file system

CC Tom Rini <[email protected]>
CC Nishanth Menon <[email protected]>
---
 include/configs/omap3_beagle.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/omap3_beagle.h +7 -1
index a1d38ff..06b9006 100644
@@ -248,6 +248,12 @@
 			"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
+	"validatefdt=" \
+		"if test $beaglerev = xMAB; then " \
+			"if test ! -e mmc ${bootpart} ${bootdir}/${fdtfile}; then " \
+				"setenv fdtfile omap3-beagle-xm.dtb; " \
+			"fi; " \
+		"fi; \0" \
 	"bootenv=uEnv.txt\0" \
 	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
 	"importbootenv=echo Importing environment from mmc ...; " \
@@ -263,7 +269,7 @@
 		"rootfstype=${ramrootfstype}\0" \
 	"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \
 	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+	"loadfdt=run validatefdt; load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"bootm ${loadaddr}\0" \
Signature · 1 line
1.9.2
#1 lore raw

PATCH 2/2 omap3_beagle: xM A/B validate new dtb exits in file system

Quoted 38 lines · robertcnelson

From: Robert Nelson <[email protected]>

Fall back to previous dtb used when omap3-beagle-xm-ab.dtb doesn't exist in file system

CC Tom Rini <[email protected]>
CC Nishanth Menon <[email protected]>
---
 include/configs/omap3_beagle.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/omap3_beagle.h +7 -2
index a1d38ff..06b9006 100644
@@ -248,6 +248,12 @@
                        "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
+       "validatefdt=" \
+               "if test $beaglerev = xMAB; then " \
+                       "if test ! -e mmc ${bootpart} ${bootdir}/${fdtfile}; then " \
+                               "setenv fdtfile omap3-beagle-xm.dtb; " \
+                       "fi; " \
+               "fi; \0" \
        "bootenv=uEnv.txt\0" \
        "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
        "importbootenv=echo Importing environment from mmc ...; " \
@@ -263,7 +269,7 @@
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \
        "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+       "loadfdt=run validatefdt; load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "bootm ${loadaddr}\0" \
--
Quoted 1 line

1.9.2

Little git send-email failure here, I was trying to send this second as patch as [RFC].

This is my first thoughts of keeping backward compatibility with less then v3.15-rc3 kernels.

Thoughts?

Regards,

Signature · 2 lines
Robert Nelson
http://www.rcn-ee.com/
#2 lore raw

PATCH 2/2 omap3_beagle: xM A/B validate new dtb exits in file system

Quoted 44 lines · Robert Nelson
Quoted 38 lines · robertcnelson

From: Robert Nelson <[email protected]>

Fall back to previous dtb used when omap3-beagle-xm-ab.dtb doesn't exist in file system

CC Tom Rini <[email protected]>
CC Nishanth Menon <[email protected]>
---
 include/configs/omap3_beagle.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/omap3_beagle.h +7 -2
index a1d38ff..06b9006 100644
@@ -248,6 +248,12 @@
                        "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
+       "validatefdt=" \
+               "if test $beaglerev = xMAB; then " \
+                       "if test ! -e mmc ${bootpart} ${bootdir}/${fdtfile}; then " \
+                               "setenv fdtfile omap3-beagle-xm.dtb; " \
+                       "fi; " \
+               "fi; \0" \
        "bootenv=uEnv.txt\0" \
        "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
        "importbootenv=echo Importing environment from mmc ...; " \
@@ -263,7 +269,7 @@
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \
        "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+       "loadfdt=run validatefdt; load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "bootm ${loadaddr}\0" \
--
Quoted 1 line

1.9.2

Little git send-email failure here, I was trying to send this second as patch as [RFC].

Quoted 4 lines

This is my first thoughts of keeping backward compatibility with less then v3.15-rc3 kernels.

Thoughts?

Work for me since everything else in the sequence is MMC-centric.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140509/811169cb/attachment.pgp>
#3 lore raw

PATCH 2/2 omap3_beagle: xM A/B validate new dtb exits in file system

In reply to robertcnelson
Quoted 8 lines · robertcnelson at gmail.com

From: Robert Nelson <[email protected]>

Fall back to previous dtb used when omap3-beagle-xm-ab.dtb doesn't exist in file system

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140513/37987b23/attachment.pgp>