mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] ARM: i.MX: increase barebox partition sizes
@ 2016-04-26  6:44 Sascha Hauer
  2016-04-26 11:47 ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2016-04-26  6:44 UTC (permalink / raw)
  To: Barebox List

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

Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---

Changes since v1: rebase on top of "ARM: dts: Fix partition names"

 arch/arm/dts/imx25-karo-tx25.dts                |  6 +++---
 arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts  |  6 +++---
 arch/arm/dts/imx51-babbage.dts                  |  4 ++--
 arch/arm/dts/imx51-genesi-efika-sb.dts          |  8 ++++----
 arch/arm/dts/imx53-ccxmx53.dtsi                 |  6 +++---
 arch/arm/dts/imx53-guf-vincell-lt.dts           |  6 +++---
 arch/arm/dts/imx53-mba53.dts                    |  4 ++--
 arch/arm/dts/imx53-qsb-common.dtsi              |  4 ++--
 arch/arm/dts/imx53-voipac-dmm-668.dtsi          |  6 +++---
 arch/arm/dts/imx6dl-eltec-hipercam.dts          |  6 +++---
 arch/arm/dts/imx6dl-hummingboard.dts            |  6 +++---
 arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts |  6 +++---
 arch/arm/dts/imx6dl-wandboard.dts               |  6 +++---
 arch/arm/dts/imx6q-dmo-edmqmx6.dts              | 18 +++++++++---------
 arch/arm/dts/imx6q-embedsky-e9.dts              | 12 ++++++------
 arch/arm/dts/imx6q-guf-santaro.dts              |  4 ++--
 arch/arm/dts/imx6q-hummingboard.dts             |  6 +++---
 arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi          |  6 +++---
 arch/arm/dts/imx6q-phytec-phycore-som-nand.dts  |  6 +++---
 arch/arm/dts/imx6q-wandboard.dts                |  6 +++---
 arch/arm/dts/imx6qdl-nitrogen6x.dtsi            |  6 +++---
 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi         |  6 +++---
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi    |  6 +++---
 arch/arm/dts/imx6qdl-sabrelite.dtsi             |  6 +++---
 arch/arm/dts/imx6qdl-sabresd.dtsi               |  6 +++---
 arch/arm/dts/imx6s-riotboard.dts                |  4 ++--
 arch/arm/dts/imx6sx-sdb.dts                     |  4 ++--
 27 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/arch/arm/dts/imx25-karo-tx25.dts b/arch/arm/dts/imx25-karo-tx25.dts
index 8d79471..76847ff 100644
--- a/arch/arm/dts/imx25-karo-tx25.dts
+++ b/arch/arm/dts/imx25-karo-tx25.dts
@@ -123,12 +123,12 @@
 
 	partition@0 {
 		label = "boot";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 
 	partition@100000 {
diff --git a/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts b/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts
index 3bae76e..cb02a1d 100644
--- a/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts
+++ b/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts
@@ -18,12 +18,12 @@
 &nfc {
 	partition@0 {
 		label = "boot";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 
 	partition@100000 {
diff --git a/arch/arm/dts/imx51-babbage.dts b/arch/arm/dts/imx51-babbage.dts
index f8402ca..bde3031 100644
--- a/arch/arm/dts/imx51-babbage.dts
+++ b/arch/arm/dts/imx51-babbage.dts
@@ -27,9 +27,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	environment_esdhc1: partition@0 {
+	environment_esdhc1: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x20000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx51-genesi-efika-sb.dts b/arch/arm/dts/imx51-genesi-efika-sb.dts
index 78cb1b7..5a2c3a1 100644
--- a/arch/arm/dts/imx51-genesi-efika-sb.dts
+++ b/arch/arm/dts/imx51-genesi-efika-sb.dts
@@ -415,9 +415,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	partition@0 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0xc0000 0x40000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
@@ -533,9 +533,9 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		partition@0 {
+		partition@e0000 {
 			label = "barebox-environment";
-			reg = <0x80000 0x80000>;
+			reg = <0xe0000 0x20000>;
 		};
 	};
 };
diff --git a/arch/arm/dts/imx53-ccxmx53.dtsi b/arch/arm/dts/imx53-ccxmx53.dtsi
index 3f4e78f..cfef1cc 100644
--- a/arch/arm/dts/imx53-ccxmx53.dtsi
+++ b/arch/arm/dts/imx53-ccxmx53.dtsi
@@ -232,12 +232,12 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 
 	partition@100000 {
diff --git a/arch/arm/dts/imx53-guf-vincell-lt.dts b/arch/arm/dts/imx53-guf-vincell-lt.dts
index 9691e22..bcc378d 100644
--- a/arch/arm/dts/imx53-guf-vincell-lt.dts
+++ b/arch/arm/dts/imx53-guf-vincell-lt.dts
@@ -361,12 +361,12 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	bareboxenv: partition@80000 {
+	bareboxenv: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 
 	partition@100000 {
diff --git a/arch/arm/dts/imx53-mba53.dts b/arch/arm/dts/imx53-mba53.dts
index c908c61..28f463c 100644
--- a/arch/arm/dts/imx53-mba53.dts
+++ b/arch/arm/dts/imx53-mba53.dts
@@ -28,9 +28,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	partition@0 {
+	partition@e0000 {
 		label = "environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index 85e1b8b..f363af9 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -43,9 +43,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	bareboxenv: partition@0 {
+	bareboxenv: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x20000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx53-voipac-dmm-668.dtsi b/arch/arm/dts/imx53-voipac-dmm-668.dtsi
index 42aacd2..e91c7d0 100644
--- a/arch/arm/dts/imx53-voipac-dmm-668.dtsi
+++ b/arch/arm/dts/imx53-voipac-dmm-668.dtsi
@@ -15,12 +15,12 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 
 	partition@100000 {
diff --git a/arch/arm/dts/imx6dl-eltec-hipercam.dts b/arch/arm/dts/imx6dl-eltec-hipercam.dts
index 6f1c496..4fe1744 100644
--- a/arch/arm/dts/imx6dl-eltec-hipercam.dts
+++ b/arch/arm/dts/imx6dl-eltec-hipercam.dts
@@ -37,12 +37,12 @@
 
 		partition@0 {
 			label = "barebox";
-			reg = <0x0 0xc0000>;
+			reg = <0x0 0xe0000>;
 		};
 
-		environment_nor0: partition@c0000 {
+		environment_nor0: partition@e0000 {
 			label = "bareboxenv";
-			reg = <0xc0000 0x8000>;
+			reg = <0xe0000 0x20000>;
 		};
 
 		partition@100000 {
diff --git a/arch/arm/dts/imx6dl-hummingboard.dts b/arch/arm/dts/imx6dl-hummingboard.dts
index 61f8363..7f4d2b4 100644
--- a/arch/arm/dts/imx6dl-hummingboard.dts
+++ b/arch/arm/dts/imx6dl-hummingboard.dts
@@ -29,11 +29,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts b/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts
index b77add8..3f2f1c7 100644
--- a/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts
+++ b/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts
@@ -53,11 +53,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6dl-wandboard.dts b/arch/arm/dts/imx6dl-wandboard.dts
index a867400..873e9d6 100644
--- a/arch/arm/dts/imx6dl-wandboard.dts
+++ b/arch/arm/dts/imx6dl-wandboard.dts
@@ -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>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/dts/imx6q-dmo-edmqmx6.dts
index fb8d56f..3576211 100644
--- a/arch/arm/dts/imx6q-dmo-edmqmx6.dts
+++ b/arch/arm/dts/imx6q-dmo-edmqmx6.dts
@@ -53,12 +53,12 @@
 
 		partition@0 {
 			label = "barebox";
-			reg = <0x0 0x80000>;
+			reg = <0x0 0xe0000>;
 		};
 
-		partition@80000 {
+		partition@e0000 {
 			label = "barebox-environment";
-			reg = <0x80000 0x20000>;
+			reg = <0xe0000 0x20000>;
 		};
 	};
 };
@@ -97,11 +97,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
@@ -111,10 +111,10 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-embedsky-e9.dts b/arch/arm/dts/imx6q-embedsky-e9.dts
index 07c01eb..3bbb60b 100644
--- a/arch/arm/dts/imx6q-embedsky-e9.dts
+++ b/arch/arm/dts/imx6q-embedsky-e9.dts
@@ -41,11 +41,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
-	environment_mmc1: partition@80000 {
+	environment_mmc1: partition@e0000 {
 		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@80000 {
+	environment_mmc3: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-guf-santaro.dts b/arch/arm/dts/imx6q-guf-santaro.dts
index 27f538a..2bd1a26 100644
--- a/arch/arm/dts/imx6q-guf-santaro.dts
+++ b/arch/arm/dts/imx6q-guf-santaro.dts
@@ -587,9 +587,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	partition@0 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx6q-hummingboard.dts b/arch/arm/dts/imx6q-hummingboard.dts
index a35f2b2..e707eb9 100644
--- a/arch/arm/dts/imx6q-hummingboard.dts
+++ b/arch/arm/dts/imx6q-hummingboard.dts
@@ -29,11 +29,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi b/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi
index 4eea425..a6ea7b5 100644
--- a/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi
+++ b/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi
@@ -181,10 +181,10 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
-	environment_usdhc3: partition@80000 {
+	environment_usdhc3: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts b/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts
index 26bbed5..aa2c94a 100644
--- a/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts
+++ b/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts
@@ -62,11 +62,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6q-wandboard.dts b/arch/arm/dts/imx6q-wandboard.dts
index 26d8a00..0606727 100644
--- a/arch/arm/dts/imx6q-wandboard.dts
+++ b/arch/arm/dts/imx6q-wandboard.dts
@@ -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>;
 	};
 };
diff --git a/arch/arm/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/dts/imx6qdl-nitrogen6x.dtsi
index d818b6b..9ff7395 100644
--- a/arch/arm/dts/imx6qdl-nitrogen6x.dtsi
+++ b/arch/arm/dts/imx6qdl-nitrogen6x.dtsi
@@ -31,12 +31,12 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
index 81554d2..26f9746 100644
--- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
@@ -180,11 +180,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
index cb1167e..139150e 100644
--- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
@@ -256,11 +256,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6qdl-sabrelite.dtsi b/arch/arm/dts/imx6qdl-sabrelite.dtsi
index abe1d19..10b0002 100644
--- a/arch/arm/dts/imx6qdl-sabrelite.dtsi
+++ b/arch/arm/dts/imx6qdl-sabrelite.dtsi
@@ -31,12 +31,12 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	partition@80000 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 4ebfda3..6b10229 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -31,11 +31,11 @@
 
 	partition@0 {
 		label = "barebox";
-		reg = <0x0 0x80000>;
+		reg = <0x0 0xe0000>;
 	};
 
-	environment_usdhc3: partition@80000 {
+	environment_usdhc3: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
diff --git a/arch/arm/dts/imx6s-riotboard.dts b/arch/arm/dts/imx6s-riotboard.dts
index 2fc5a3f..09ac534 100644
--- a/arch/arm/dts/imx6s-riotboard.dts
+++ b/arch/arm/dts/imx6s-riotboard.dts
@@ -233,9 +233,9 @@
 		reg = <0x0 0x80000>;
 	};
 
-	environment_usdhc4: partition@80000 {
+	environment_usdhc4: partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x80000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
diff --git a/arch/arm/dts/imx6sx-sdb.dts b/arch/arm/dts/imx6sx-sdb.dts
index fbf098b..7b60f93 100644
--- a/arch/arm/dts/imx6sx-sdb.dts
+++ b/arch/arm/dts/imx6sx-sdb.dts
@@ -52,9 +52,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	partition@0 {
+	partition@e0000 {
 		label = "barebox-environment";
-		reg = <0x80000 0x20000>;
+		reg = <0xe0000 0x20000>;
 	};
 };
 
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ARM: i.MX: increase barebox partition sizes
  2016-04-26  6:44 [PATCH v2] ARM: i.MX: increase barebox partition sizes Sascha Hauer
@ 2016-04-26 11:47 ` Fabio Estevam
  2016-04-27  9:25   ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2016-04-26 11:47 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

Hi Sascha,

On Tue, Apr 26, 2016 at 3:44 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> diff --git a/arch/arm/dts/imx25-karo-tx25.dts b/arch/arm/dts/imx25-karo-tx25.dts
> index 8d79471..76847ff 100644
> --- a/arch/arm/dts/imx25-karo-tx25.dts
> +++ b/arch/arm/dts/imx25-karo-tx25.dts
> @@ -123,12 +123,12 @@
>
>         partition@0 {
>                 label = "boot";
> -               reg = <0x0 0x80000>;
> +               reg = <0x0 0xe0000>;
>         };
>
> -       partition@80000 {
> +       partition@e0000 {
>                 label = "environment";
> -               reg = <0x80000 0x80000>;
> +               reg = <0xe0000 0x20000>;

Here the environment partition size is changed from 512kB to 128kB.
Couldn't this cause issues?

Shouldn't this change be done by a separate patch?

Other than that the patch looks good.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ARM: i.MX: increase barebox partition sizes
  2016-04-26 11:47 ` Fabio Estevam
@ 2016-04-27  9:25   ` Sascha Hauer
  2016-04-27 12:43     ` Fabio Estevam
  2016-04-27 12:51     ` Juergen Borleis
  0 siblings, 2 replies; 6+ messages in thread
From: Sascha Hauer @ 2016-04-27  9:25 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Barebox List

On Tue, Apr 26, 2016 at 08:47:28AM -0300, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Tue, Apr 26, 2016 at 3:44 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > diff --git a/arch/arm/dts/imx25-karo-tx25.dts b/arch/arm/dts/imx25-karo-tx25.dts
> > index 8d79471..76847ff 100644
> > --- a/arch/arm/dts/imx25-karo-tx25.dts
> > +++ b/arch/arm/dts/imx25-karo-tx25.dts
> > @@ -123,12 +123,12 @@
> >
> >         partition@0 {
> >                 label = "boot";
> > -               reg = <0x0 0x80000>;
> > +               reg = <0x0 0xe0000>;
> >         };
> >
> > -       partition@80000 {
> > +       partition@e0000 {
> >                 label = "environment";
> > -               reg = <0x80000 0x80000>;
> > +               reg = <0xe0000 0x20000>;
> 
> Here the environment partition size is changed from 512kB to 128kB.
> Couldn't this cause issues?

Normally the environment is much smaller, so I wouldn't expect issues
here. The alternative to making the environment smaller would be to move
other partitions to the back. This would probably hurt more, especially
since a regular fdisk starts the first partition at offset 1MiB.

Another approach would be to use a MBR partition for the environment
instead of using the raw device.

> 
> Shouldn't this change be done by a separate patch?

We can't increase the barebox partition without shrinking the
environment right behind it. Or do you mean that we first shrink
the environment and in a second patch increase the barebox partition?

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ARM: i.MX: increase barebox partition sizes
  2016-04-27  9:25   ` Sascha Hauer
@ 2016-04-27 12:43     ` Fabio Estevam
  2016-04-27 12:51     ` Juergen Borleis
  1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2016-04-27 12:43 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

On Wed, Apr 27, 2016 at 6:25 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Normally the environment is much smaller, so I wouldn't expect issues
> here. The alternative to making the environment smaller would be to move
> other partitions to the back. This would probably hurt more, especially
> since a regular fdisk starts the first partition at offset 1MiB.
>
> Another approach would be to use a MBR partition for the environment
> instead of using the raw device.
>
>>
>> Shouldn't this change be done by a separate patch?
>
> We can't increase the barebox partition without shrinking the
> environment right behind it. Or do you mean that we first shrink

Ok, got it. I wasn't aware of this 1MiB requirement, so all is fine then.

Thanks

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ARM: i.MX: increase barebox partition sizes
  2016-04-27  9:25   ` Sascha Hauer
  2016-04-27 12:43     ` Fabio Estevam
@ 2016-04-27 12:51     ` Juergen Borleis
  2016-04-27 13:36       ` Sascha Hauer
  1 sibling, 1 reply; 6+ messages in thread
From: Juergen Borleis @ 2016-04-27 12:51 UTC (permalink / raw)
  To: barebox

Hi,

On Wednesday 27 April 2016 11:25:01 Sascha Hauer wrote:
> [...]
> > Here the environment partition size is changed from 512kB to 128kB.
> > Couldn't this cause issues?
>
> Normally the environment is much smaller, so I wouldn't expect issues
> here. The alternative to making the environment smaller would be to move
> other partitions to the back. This would probably hurt more, especially
> since a regular fdisk starts the first partition at offset 1MiB.

It hurts if the NAND's erase block size is 128 kiB and the block is marked bad. 
In the 512 kiB case this would shrink the environment to 384 kiB, in the 128 
kiB case to 0. Or do I miss something?

jb

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ARM: i.MX: increase barebox partition sizes
  2016-04-27 12:51     ` Juergen Borleis
@ 2016-04-27 13:36       ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2016-04-27 13:36 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: barebox

On Wed, Apr 27, 2016 at 02:51:17PM +0200, Juergen Borleis wrote:
> Hi,
> 
> On Wednesday 27 April 2016 11:25:01 Sascha Hauer wrote:
> > [...]
> > > Here the environment partition size is changed from 512kB to 128kB.
> > > Couldn't this cause issues?
> >
> > Normally the environment is much smaller, so I wouldn't expect issues
> > here. The alternative to making the environment smaller would be to move
> > other partitions to the back. This would probably hurt more, especially
> > since a regular fdisk starts the first partition at offset 1MiB.
> 
> It hurts if the NAND's erase block size is 128 kiB and the block is marked bad. 
> In the 512 kiB case this would shrink the environment to 384 kiB, in the 128 
> kiB case to 0. Or do I miss something?

D'oh. Indeed it hurts on Nand. I assumed that this is a MMC partition.
There is no 1MiB requirement on Nand and we do not have a partition
table on Nand which may conflict with the device tree partitions.

Since this is i.MX25 and the imx_defconfig doesn't (yet) build so big
images I will drop this hunk for now.

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-27 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26  6:44 [PATCH v2] ARM: i.MX: increase barebox partition sizes Sascha Hauer
2016-04-26 11:47 ` Fabio Estevam
2016-04-27  9:25   ` Sascha Hauer
2016-04-27 12:43     ` Fabio Estevam
2016-04-27 12:51     ` Juergen Borleis
2016-04-27 13:36       ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox