From patchwork Mon Jul 24 13:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1811823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jtdTFkvF; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=terefe.re header.i=@terefe.re header.a=rsa-sha256 header.s=default header.b=GqXTS81K; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R8h1w3t9Bz20Cs for ; Mon, 24 Jul 2023 23:33:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9ibEs4+JYgT0efO07fGTrSTPlLiW0oPM3dHL5oq/PrU=; b=jtdTFkvF4+pmy3 SEMWLt5yYksSCp+0mx3wm4DEmSU2gFpGhsMBCHiXLsYtuhXheoYmZMfKgaxEdDAl5Q2Aw38dCFPN7 tnZL0r4XlgUntG/xDnEJPwFy37DzSZvwjotkDzVaKLVMpEpaLOkz/H40swAq7nXaqyK5RJxg7jvCr rVjLvVqS28POng5zLqmFVAk+lUtRH4A9q9r0pxprsjVMQ1bHG9YPeSYN4RjolQ10af6FU4KksoyJX XcbEXq3bfn3bAnIcpK1sTE8W60oFt3BDtGG0PlHYvcFwVPicnTPTyMGrYwkCSaFitN/dvw8EPhBfs y5bmXUnpSBhsGXCHk7WA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qNveB-004Rt7-2e; Mon, 24 Jul 2023 13:30:47 +0000 Received: from [2a04:52c0:101:a4a::1] (helo=terefe.re) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qNve6-004RqD-23 for openwrt-devel@lists.openwrt.org; Mon, 24 Jul 2023 13:30:45 +0000 Received: from localhost.localdomain (unknown [212.106.161.94]) by terefe.re (Postfix) with ESMTPSA id 4794D20177; Mon, 24 Jul 2023 15:30:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1690205435; bh=5LMUXR1YlkjEnt8GhwggETm31iADUiLQqwSxEVLGPRw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GqXTS81KXzDiG6+VkFFJbSa5X1h5ka7lnkWmzPs1kqyMuR5sYrm0ULzMXQQGg/nHF sZxPLVf5IaJTKm0hQ2VzvZtknDxzJSE85B4jcVYsBv3CUk7kwEuIipCrdh5p+DN6aa /X5MDCrKG/Fkov/8iBkiBn9livv1Gx1IbQm05x78ZSXdgUslow4DAUXWyc1Bx9AICh wEY2VCXwoJ74rpMhpMyNHaw2dut4syghWhyPtFW4564MktQ9I4DZMU8ycIF9hNCbSO xrIfxm0z1WOyr2o3ZJAxx571oUpg4KFOMsxcXCInVjfpRZ7CGTJ2/A2MG0DD55HvTz V6OuPQwBpT1aw== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH v3 2/3] ipq40xx: dts: allow writing to U-Boot environment Date: Mon, 24 Jul 2023 15:25:42 +0200 Message-ID: <20230724133027.9821-3-tmn505@terefe.re> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230724133027.9821-1-tmn505@terefe.re> References: <20230724133027.9821-1-tmn505@terefe.re> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230724_063043_141871_FFC53E6D X-CRM114-Status: UNSURE ( 7.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Tomasz Maciej Nowak 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 at [...] Content analysis details: (1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Tomasz Maciej Nowak 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 --- .../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@E0000 { label = "APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition6@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@e0000 { label = "APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; partition@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@e0000 { label = "0:APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition6@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@e0000 { label = "0:APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition6@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@e0000 { label = "0:APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition@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@e0000 { label = "APPSBLENV"; /* uboot env*/ reg = <0x000e0000 0x00010000>; - read-only; }; partition@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@E0000 { label = "APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition6@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@e0000 { label = "0:APPSBLENV"; reg = <0x00e0000 0x0010000>; - read-only; }; partition@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@E0000 { label = "APPSBLENV"; reg = <0x000e0000 0x00010000>; - read-only; }; partition6@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@e0000 { label = "0:APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; partition@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@e0000 { label = "APPSBLENV"; /* uboot env */ reg = <0x000e0000 0x00010000>; - read-only; }; partition@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@e0000 { label = "0:APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; partition@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@e0000 { label = "0:APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; partition@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@e0000 { label = "0:APPSBLENV"; /* uboot env*/ reg = <0x000e0000 0x00010000>; - read-only; }; partition5@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@e0000 { label = "APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; APPSBL@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@e0000 { label = "APPSBLENV"; reg = <0xe0000 0x10000>; - read-only; }; APPSBL@f0000 {