[PATCH 2/3] ipq40xx: dts: allow writing to U-Boot environment

Tomasz Maciej Nowak tmn505 at terefe.re
Fri Jul 7 07:23:29 PDT 2023


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

Devices allowing to boot LZMA compressed kernel or zImage kernel didn't
hit yet the 4MiB boundary for kernel size, thus allowing to prepare
workaround for the issue, without need for serial console attachment.
The workaround is modifying 'bootcmd' variable in U-Boot environment
which will replace 'bootipq' command with equivalent not limited by
imposed partition table.
This commit also touches devices which boot uncompressed kernel, so
even if those are already soft-bricked, it will still allow to alter
U-Boot environment from initramfs booted device.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 .../files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts   | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts    | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts     | 1 -
 .../linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts  | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts     | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts   | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi   | 1 -
 .../linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts  | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts     | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts  | 1 -
 .../files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts        | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts   | 1 -
 .../linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts      | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts    | 1 -
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts    | 1 -
 16 files changed, 16 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
index 22a48c12c44e..0772c5ac464a 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
@@ -185,7 +185,6 @@
 			partition5 at E0000 {
 				label = "APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 
 			partition6 at F0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
index 493905d56d8f..dea90b13e209 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
@@ -117,7 +117,6 @@
 			partition at e0000 {
 				label = "APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
index a8f24aa00e60..2e9cb8ecdb68 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
@@ -165,7 +165,6 @@
 			partition5 at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition6 at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
index 396595ba5185..615c6aaf678f 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
@@ -163,7 +163,6 @@
 			partition5 at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition6 at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
index 361614945145..8c038917b668 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
@@ -164,7 +164,6 @@
 			partition at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
index 69275e24b8cd..bba1dd89b7a8 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
@@ -184,7 +184,6 @@
 			partition at e0000 {
 				label = "APPSBLENV"; /* uboot env*/
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "APPSBL"; /* uboot */
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
index dc5c25c84ab7..b4d9d195c7f4 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
@@ -228,7 +228,6 @@
 			partition5 at E0000 {
 				label = "APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 
 			partition6 at F0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
index 16951da47fc0..4c707e73d862 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
@@ -140,7 +140,6 @@
 			partition at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0x00e0000 0x0010000>;
-				read-only;
 			};
 
 			partition at f0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
index efb267ae3692..decd7d5fdcc0 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
@@ -195,7 +195,6 @@
 			partition5 at E0000 {
 				label = "APPSBLENV";
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 
 			partition6 at F0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
index 70e05c7eef3a..eac11b02d144 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
@@ -57,7 +57,6 @@
 			partition at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
index 23a654dcff5a..690db0143891 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
@@ -262,7 +262,6 @@
 			partition at e0000 {
 				label = "APPSBLENV"; /* uboot env */
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "APPSBL"; /* uboot */
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
index 4efcdaf39418..5304870a43fa 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
@@ -54,7 +54,6 @@
 			partition at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
index 681300c502bf..aa401892fef3 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
@@ -56,7 +56,6 @@
 			partition at e0000 {
 				label = "0:APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 			partition at f0000 {
 				label = "0:APPSBL";
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
index 48b5cd53d80b..a1ede1dcbdb1 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
@@ -205,7 +205,6 @@
 			partition5 at e0000 {
 				label = "0:APPSBLENV"; /* uboot env*/
 				reg = <0x000e0000 0x00010000>;
-				read-only;
 			};
 			partition5 at f0000 {
 				label = "0:APPSBL"; /* uboot */
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
index 7e4519a74661..78d044b67893 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
@@ -182,7 +182,6 @@
 			APPSBLENV at e0000 {
 				label = "APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 
 			APPSBL at f0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
index 0e7f4c970f47..752397a1752d 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
@@ -180,7 +180,6 @@
 			APPSBLENV at e0000 {
 				label = "APPSBLENV";
 				reg = <0xe0000 0x10000>;
-				read-only;
 			};
 
 			APPSBL at f0000 {
-- 
2.41.0




More information about the openwrt-devel mailing list