ARM: dts: imx6qdl-sabresd: Fix barebox-environment location
Subsystems (2)
Fabio Estevam
reviewerPATCH v2 1/1 ARM: dts: imx6qdl-sabresd: Fix barebox-environment location
After doing a 'saveenv' command, it is no longer possible to boot.
The reason for this behaviour is that the 'barebox' partition has currently a size of 0x80000 (512 kB), which is not sufficient to store the barebox binary. This causes the 'barebox' and 'barebox-environment' partitions to overlap.
Fix this problem by increasing the size of the 'barebox' partition and by placing the 'barebox-environment' right after it.
---
Changes since v1:
- Also adjust the partition size for 'barebox'.
arch/arm/dts/imx6qdl-sabresd.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/dts/imx6qdl-sabresd.dtsi +3 -3
@@ -31,11 +31,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xc0000>; }; - environment_usdhc3: partition@1 { + environment_usdhc3: partition@c0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xc0000 0x80000>; }; };
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerHi Fabio,
Quoted 7 lines · Fabio Estevam
After doing a 'saveenv' command, it is no longer possible to boot.
The reason for this behaviour is that the 'barebox' partition has currently a size of
0x80000(512 kB), which is not sufficient to store the barebox binary. This causes the 'barebox' and 'barebox-environment' partitions to overlap.
Quoted 7 lines
Fix this problem by increasing the size of the 'barebox' partition and by placing the 'barebox-environment' right after it.
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Also adjust the partition size for 'barebox'.
Since we have this problem on many i.MX boards I prefer fixing this for all affected boards, see below.
This should solve the problem for the next few years, but next time we must find a more clever solution.
Sascha
----------------------------8<-------------------------------------
From 54bddad853f07effbe55065c4864a3921c4b2e1e Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Mon, 25 Apr 2016 08:05:29 +0200
Subject: [PATCH] ARM: i.MX: increase barebox partition sizes
After doing a 'saveenv' command, it is no longer possible to boot.
The reason for this behaviour is that the 'barebox' partition has currently
a size of 0x80000 (512 kB), which is not sufficient to store the barebox binary. This causes the 'barebox' and 'barebox-environment' partitions to overlap.
Fix this problem by increasing the size of the 'barebox' partition and by placing the 'barebox-environment' right after it.
This patch increases the barebox partition for all i.MX boards to 0xe0000
--- arch/arm/dts/imx25-karo-tx25.dts | 4 ++-- arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts | 4 ++-- arch/arm/dts/imx51-babbage.dts | 2 +- arch/arm/dts/imx51-genesi-efika-sb.dts | 4 ++-- arch/arm/dts/imx53-ccxmx53.dtsi | 4 ++-- arch/arm/dts/imx53-guf-vincell-lt.dts | 4 ++-- arch/arm/dts/imx53-mba53.dts | 2 +- arch/arm/dts/imx53-qsb-common.dtsi | 2 +- arch/arm/dts/imx53-voipac-dmm-668.dtsi | 4 ++-- arch/arm/dts/imx6dl-eltec-hipercam.dts | 4 ++-- arch/arm/dts/imx6dl-hummingboard.dts | 4 ++-- arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts | 4 ++-- arch/arm/dts/imx6dl-wandboard.dts | 6 +++--- arch/arm/dts/imx6q-dmo-edmqmx6.dts | 12 ++++++------ arch/arm/dts/imx6q-embedsky-e9.dts | 8 ++++---- arch/arm/dts/imx6q-guf-santaro.dts | 2 +- arch/arm/dts/imx6q-hummingboard.dts | 4 ++-- arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi | 4 ++-- arch/arm/dts/imx6q-phytec-phycore-som-nand.dts | 4 ++-- arch/arm/dts/imx6q-wandboard.dts | 6 +++--- arch/arm/dts/imx6qdl-nitrogen6x.dtsi | 4 ++-- arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 4 ++-- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 4 ++-- arch/arm/dts/imx6qdl-sabrelite.dtsi | 4 ++-- arch/arm/dts/imx6qdl-sabresd.dtsi | 4 ++-- arch/arm/dts/imx6s-riotboard.dts | 2 +- arch/arm/dts/imx6sx-sdb.dts | 2 +- 27 files changed, 56 insertions(+), 56 deletions(-)
arch/arm/dts/imx25-karo-tx25.dts +2 -2
@@ -123,12 +123,12 @@ partition@0 { label = "boot"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts +2 -2
@@ -18,12 +18,12 @@ &nfc { partition@0 { label = "boot"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx51-babbage.dts +1 -1
@@ -29,7 +29,7 @@ environment_esdhc1: partition@0 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx51-genesi-efika-sb.dts +2 -2
@@ -417,7 +417,7 @@ partition@0 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; };
@@ -535,7 +535,7 @@ partition@0 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; };
arch/arm/dts/imx53-ccxmx53.dtsi +2 -2
@@ -232,12 +232,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx53-guf-vincell-lt.dts +2 -2
@@ -361,12 +361,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; bareboxenv: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx53-mba53.dts +1 -1
@@ -30,7 +30,7 @@ partition@0 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx53-qsb-common.dtsi +1 -1
@@ -45,7 +45,7 @@ bareboxenv: partition@0 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx53-voipac-dmm-668.dtsi +2 -2
@@ -15,12 +15,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx6dl-eltec-hipercam.dts +2 -2
@@ -37,12 +37,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; environment_nor0: partition@1 { label = "bareboxenv"; - reg = <0xc0000 0x8000>; + reg = <0xe0000 0x20000>; }; partition@2 {
arch/arm/dts/imx6dl-hummingboard.dts +2 -2
@@ -29,11 +29,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts +2 -2
@@ -53,11 +53,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6dl-wandboard.dts +3 -3
@@ -27,11 +27,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@c0000 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-dmo-edmqmx6.dts +6 -6
@@ -53,12 +53,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; }; };
@@ -97,11 +97,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
@@ -111,10 +111,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-embedsky-e9.dts +4 -4
@@ -41,11 +41,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; environment_mmc1: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
@@ -55,10 +55,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; environment_mmc3: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-guf-santaro.dts +1 -1
@@ -589,7 +589,7 @@ partition@0 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-hummingboard.dts +2 -2
@@ -29,11 +29,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi +2 -2
@@ -181,10 +181,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; environment_usdhc3: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-phytec-phycore-som-nand.dts +2 -2
@@ -62,11 +62,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6q-wandboard.dts +3 -3
@@ -27,11 +27,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@c0000 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6qdl-nitrogen6x.dtsi +2 -2
@@ -31,12 +31,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +2 -2
@@ -180,11 +180,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +2 -2
@@ -256,11 +256,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6qdl-sabrelite.dtsi +2 -2
@@ -31,12 +31,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6qdl-sabresd.dtsi +2 -2
@@ -31,11 +31,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; environment_usdhc3: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6s-riotboard.dts +1 -1
@@ -235,7 +235,7 @@ environment_usdhc4: partition@1 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; };
arch/arm/dts/imx6sx-sdb.dts +1 -1
@@ -54,7 +54,7 @@ partition@0 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; };
Signature · 12 lines
2.8.0.rc3 -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Fabio Estevam
reviewerHi Sascha,
arch/arm/dts/imx25-karo-tx25.dts line 129
Quoted 13 lines · Sascha Hauer
arch/arm/dts/imx25-karo-tx25.dts +1
-1@@ -123,12 +123,12 @@ partition@0 { label = "boot"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; partition@1 {
This should be "partition@0xe0000 {" to match the 'reg' property below.
arch/arm/dts/imx25-karo-tx25.dts line 131
Quoted 3 lines
arch/arm/dts/imx25-karo-tx25.dts +1
-1label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>;
Same applies to other files.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 16 lines · Fabio Estevam
Hi Sascha,
Quoted 12 lines · Sascha Hauer
arch/arm/dts/imx25-karo-tx25.dts +1
-1@@ -123,12 +123,12 @@ partition@0 { label = "boot"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; };
Quoted 3 lines
arch/arm/dts/imx25-karo-tx25.dts line 129
Quoted 1 line
arch/arm/dts/imx25-karo-tx25.dts +0
-0partition@1 {This should be "partition@0xe0000 {" to match the 'reg' property below.
Indeed, that's something I wanted to fix for longer now. I finally did this ;)
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox