From patchwork Thu Jul 27 16:45:13 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: 1813869 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=C4n7dcTz; 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=CZ1lxTwt; 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 4RBcVb6Ljnz1ydh for ; Fri, 28 Jul 2023 03:01:27 +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=o76i1x7cgg1ZcJ0rg5JZmXUMZQgzHQ04lJelMB1wWgc=; b=C4n7dcTzpkroe8 Ckets4toQTEh06NKJR0kTle4lle5LG5qDkJEpCrlcs8yzQVw/VWIDUmqv77AONVmuJWvRBXy1EyUM zxJuhl2hlCJIIep5EB4+5qW4NC85YMAP77FSugyZcokvpWeKygJjT0v2+hX4a8X5QkjePQUAWA8lL NP/ve+HvQAtWgBqj2vwTaVNyibtO7XxhBnqlIUQ+2fxYoPq/YSyn4gYYN+qaCQ773cYjkBqtZcVpY p2tW3EC+c3HfRZNYrSsHaWR4ytBgvwlmfE70eXuwRHJ9E0MYl+s8Akiefb8tpc2OShFyVDdII6k12 CnXjx9Dw2y4xiXzTK9MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP4Jr-00GzQ7-2P; Thu, 27 Jul 2023 16:58:33 +0000 Received: from terefe.re ([5.255.96.200]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP4Jl-00GzFW-0y for openwrt-devel@lists.openwrt.org; Thu, 27 Jul 2023 16:58:28 +0000 Received: from localhost.localdomain (unknown [212.106.161.94]) by terefe.re (Postfix) with ESMTPSA id 28CC520087; Thu, 27 Jul 2023 18:58:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1690477099; bh=TB9KgvhG+5yW3fnkcGf7DYoVFyIUxWVlYy+oe740ZIg=; h=From:To:Cc:Subject:Date:From; b=CZ1lxTwtWRYd6DgZjHAi5WVTzPep5gjR7jjgNGaOxVXD4f/Lo/B79MMDMy6uFtZa1 e6SY93m0CNVp3rjPshBKRmUG7hcAX+//9gA99MP3RkvFeexj63QZ/5LpBTj4kCTs2i feLFjXTOZ1LL30XUPfIWRj3tjbDELWg9G/HaY+LVK5135WbMi7PtE1hxnKcXeXrj4W Pq48EPJPzsmigo51/e3ppgr/d64DSgWFUfEHKX2MqhsU8nvmOPoX2RihU6Vwe31ceS p8BYoOyes2fNybt00qdsRg8PAmtndVfaVZypt30+pBYK1/na/Dteatrhkg+s8VmYzi v+qWdAOGrYUlg== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH v4 0/3] ipq40xx: remedy potential of producing soft-bricking images Date: Thu, 27 Jul 2023 18:45:13 +0200 Message-ID: <20230727165809.175714-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-20230727_095825_510259_A4C7B03F X-CRM114-Status: UNSURE ( 9.22 ) 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 v2 -> v3: no changes v3 -> v4: remove Habanero board (does not have a limit), straighten inaccuracy in commit message (zImage is self-extracting which doesn't depend on U-Boot capabilities, while GZIPped uImage does) ipq40xx: dts: allow writing to U-Boot environment v1 -> v2: no changes v2 -> v3: no changes v3 -> v4: straighten inaccuracy in commit message (zImage is self-extracting which doesn't depend on U-Boot capabilities, while GZIPped uImage does) 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 v2 -> v3: shortened description of problem presented to user as users having firmware 23.05.0 or later won't see the message v3 -> v4: no changes Tomasz Maciej Nowak (3): ipq40xx: image: limit kernel size for NOR devices ipq40xx: dts: allow writing to U-Boot environment ipq40xx: pakedge_wr-1: workaround for kernel bigger than 4MiB .../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 - .../files/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 | 12 ++++++++++++ 19 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 target/linux/ipq40xx/base-files/lib/preinit/81_patch_uboot_env.sh