From patchwork Fri Jul 7 15:11:40 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: 1804979 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=OVfXBgci; 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=dDJwdvJF; 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 4QyHDq1msjz20Nq for ; Sat, 8 Jul 2023 01:21:47 +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: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:In-Reply-To:References: List-Owner; bh=Tiv0ERocS2/UkEWM4I/Fl7efZ2TeYJiDoADJyJVfqW0=; b=OVfXBgciW1uqEL XLDGTV99kfBoci2u6bg+DoFDHKE/4P71Ik4ZYrXL7c1VkuiGTOwaeUs1TF4A/VKLhbkvKX8RxpQUG tFdPRdu2SzDvS2EeQ/cCDIcvqb2wzocdpGGFMdqMBuKZZh26dxCEO/nhZi3mPeL9gnB46G44CyHFQ z74u4mtFTCo3Q9wNQhCjVdW+axuMN554wJGYnT0YtEiRqBb50DcsI9v4taAn51sxfrAhnSZyR/IVv lKoasifRkXSoICXMMn0WOPKw3ynatHPX6ME+aeHXA/WNpIkuwGiBrcFOsyX0sstKOtFeMrxJQmlMa 3Qt9/39sK4GD9qH6vAkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHnFj-0050lZ-1D; Fri, 07 Jul 2023 15:20:11 +0000 Received: from terefe.re ([5.255.96.200]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHnFe-0050iu-0n for openwrt-devel@lists.openwrt.org; Fri, 07 Jul 2023 15:20:08 +0000 Received: from localhost.localdomain (unknown [212.106.161.94]) by terefe.re (Postfix) with ESMTPSA id 7F38D20014; Fri, 7 Jul 2023 17:20:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1688743201; bh=+UmNFGIJMSg4ZEJn6nJfJXlbpcMds64r4Ypzh2ufxIQ=; h=From:To:Cc:Subject:Date:From; b=dDJwdvJFlgY1luWRKcLNjrL7oSvO2pz1sp0diNqRVwq+1MAZb7xmDaivFv0IJ30RI Q5aKJ6+UKCv70KpSh6UzSyajDClyogcF6o1eOISHaiyVCJX46vV4JKe2LBJ7qy/1KL ztcL43yggAj73BTyfQ26p/bXSUrhBcZEEHgDompQiO5TE5Md18Y70Ki9jxppo2iGfA J+HwHMssb+IV4BOWVA65eCpy/vzaTPmFp3aRSmNokpDfgQIrLL7C/vUi1NL3wLYm5h xIO52Sz7xblQs9xqr8D/FciaEpdKZRs23cvB4hjwkCkzCBMukQVFe9EMaMKfSAc/si DWEIaY5QEfhaw== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH v2 0/3] ipq40xx: remedy potential of producing soft-bricking images Date: Fri, 7 Jul 2023 17:11:40 +0200 Message-ID: <20230707151950.25859-1-tmn505@terefe.re> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_082006_440070_98B474F6 X-CRM114-Status: UNSURE ( 8.21 ) 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 Some of devices having kernel on NOR flash could reach limit of kernel partition size at 4MiB and soft-brick them. Unfortunately we don't know if all of them are affected, thus kernel size limit is ad [...] 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 Some of devices having kernel on NOR flash could reach limit of kernel partition size at 4MiB and soft-brick them. Unfortunately we don't know if all of them are affected, thus kernel size limit is added to all of remaining ones. Later commit allows for some devices to prepare painless transition, while the last one shows how it can be done for device i introduced. I tried to make transition for the device as generic as possible so it coulld be used on others, but unfortunately I own only one device, which means the owners of the rest device need to verify if it works for them and add their devices. Tomasz Maciej Nowak (3): ipq40xx: image: limit kernel size for NOR devices v1 -> v2: no changes ipq40xx: dts: allow writing to U-Boot environment v1 -> v2: no changes ipq40xx: pakedge_wr-1: workaround for kernel bigger than 4MiB v1 -> v2: remove printing command from sed invocation which prints double output and breaks future 'bootcmd' modifications .../etc/uci-defaults/05_fix-compat-version | 3 ++- .../base-files/lib/preinit/81_patch_uboot_env.sh | 14 ++++++++++++++ .../boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-eap1300.dts | 1 - .../files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-emr3500.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi | 1 - .../files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4018-wre6606.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts | 1 - .../arm/boot/dts/qcom-ipq4019-habanero-dvk.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4019-x1pro.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4028-wpj428.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts | 1 - .../arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts | 1 - target/linux/ipq40xx/image/generic.mk | 15 +++++++++++++++ 19 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 target/linux/ipq40xx/base-files/lib/preinit/81_patch_uboot_env.sh