From patchwork Fri Jul 7 15:11: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: 1804980 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=DnfaNUNo; 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=viDyrHSC; 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 4QyHF14BvPz20Nq for ; Sat, 8 Jul 2023 01:21:57 +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=DnfaNUNoskbId2 UeIxtHHQYULqlxI0trmKMAJJ6bT40QiK6XeCjbwXHCxdw+ZvfI3t5UuGzzkbx7aLP4xllfpjx1JQQ 31gH2ZM9migxzw6atUcrPYl3eYJCZIBgJCrN/JJRNSPmIRiidA+6/tDtJAtMR2q4RP9kiZeQazOYL Aongqk/kTiDcoxlCcSlILLJTZAzZti0GYGwGVgU1SvyulXwntV/FzsAhQp9k24Y7A5QqyMsz+4Vjk +dzMkXE04KFsnb10hU9rG1kUeev7JDneuQXIWPOrRMerKMYkxHQlZ9RUerBDmAhLUbb2+sfX8aEKV NwhjR78XtJxYNGYc/PPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHnFk-0050m4-2R; Fri, 07 Jul 2023 15:20:12 +0000 Received: from terefe.re ([5.255.96.200]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHnFe-0050iw-0n for openwrt-devel@lists.openwrt.org; Fri, 07 Jul 2023 15:20:09 +0000 Received: from localhost.localdomain (unknown [212.106.161.94]) by terefe.re (Postfix) with ESMTPSA id 41FDD200F7; Fri, 7 Jul 2023 17:20:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1688743202; bh=5LMUXR1YlkjEnt8GhwggETm31iADUiLQqwSxEVLGPRw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=viDyrHSCDLNeD5fILAB8WM/C4RnCwRazp1wf/k5P4c5TuW3waf0O4NLBYAU4IP+HJ 6b3BB3Pbmw72uvfF9KURCL4m+GNYvU5HPUgQgoz7yEURi39qSHziVZjjXvyAjY8WTF d08ESSYaYQgfLRrrJIlGeW8RROiCKuWpdw5XYHaooobqASV3bKOhtVteIeBbNX5TCy pvAR/TjWe8uHLCTFvifRsYKgWxkv6KS3PslRb1QJBDJ1nLlnyuzdfS7TUBtmZOjgQ6 Ii4IVZCguE9BaooFJRGMAH4RE1lSXq3DomIMgh93zw6kEDxZSAH/59KaGJHmhCjjkZ QXdLQcW4XHWow== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH v2 2/3] ipq40xx: dts: allow writing to U-Boot environment Date: Fri, 7 Jul 2023 17:11:42 +0200 Message-ID: <20230707151950.25859-3-tmn505@terefe.re> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230707151950.25859-1-tmn505@terefe.re> References: <20230707151950.25859-1-tmn505@terefe.re> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_082006_437682_62A2E2AB X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: (-0.2 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 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 {