From patchwork Wed Jan 20 14:35:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1429220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=NXdTCyue; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=QBIb55vE; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DLSmk1HX2z9sVX for ; Thu, 21 Jan 2021 01:37:58 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=m772oqw3slkwZkigBPWjEZZrPDryI7/+2guQm8aZS5c=; b=NXdTCyueJKkvctPewa03Mf4Mm8 3Q/A3oZAGSEuidtzNbksD0fSTz4OkVWIwBMIp7Cn62GI3GkAi7lfMajdiV6/lfnOe/BIRjTheDiVw tkpZE86iTANNkq/qD8IZn5avA7/CO4rIQ2Zyg6qqu9+eeS18mO1bGmZpQULyvflBR/MU6al1Gcpvv mhq+T3MUvion41BwtYYkQGbJMBzFF67rg/vEWcvQTO5EhP2uxfxk6sSD1vBY6ajO1lPyp46Kqxy8X 5HFs3HmWrZVq5SprCuxgnWKHfyK5vHxxDqNIbx+gwA23sJDh1JnAVqIfzpkbLKity5aXQASJ7kRSF wXIMecdw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2EaH-0005og-HJ; Wed, 20 Jan 2021 14:35:45 +0000 Received: from canardo.mork.no ([2001:4641::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2EaB-0005kh-VZ for openwrt-devel@lists.openwrt.org; Wed, 20 Jan 2021 14:35:41 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 10KEZWCh014481 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Wed, 20 Jan 2021 15:35:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1611153332; bh=lrCNVQEwOOt5wwN8L8WPxxfWypKL0MQMt59SAHviJqc=; h=From:To:Cc:Subject:Date:Message-Id:From; b=QBIb55vEt2SkBhLtBuWceh0vyWXZFd4F5ZHpLUy/+5it6cD/JC7a6u5z/1O2SQv7A 2C7g/6k8Gce4LdCWdiV5BbPs3F8L2enVVGoLaegK6Q2TNBAevjwoXI3Ois5gPuE9C2 w/1LdjwNINVzY4keuX/Ozub9veP6SZ7lplyrGKsA= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 10KEZWQh014480; Wed, 20 Jan 2021 15:35:32 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH v3 00/10] kernel: mtdsplit_uimage: use device tree properties for non-standard uimage parsing Date: Wed, 20 Jan 2021 15:35:17 +0100 Message-Id: <20210120143527.14434-1-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_093540_637681_985AEFD4 X-CRM114-Status: GOOD ( 13.49 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This series replace a number of device specific variants of the "denx,uimage" partition splitter with a unified parser, using optional device-tree properties to describe deviations from the standard U-Boot Image. This is now tested on a number of devices. Although tests only cover a fraction of the affected hardware, I believe it's a good sign that all tests have been successful. At least I didn't screw up completely :-) There is still no test coverage of devices previously using the "fonfxc", "sge", "allnet,uimage" or "edimax,uimage" compatibles. Bjørn --- Changes in v3: - rebased onto current master - included a number of new and/or forgotton devices: ar7242_engenius_eap350-v1 ar7242_engenius_ecb350-v1 ar9341_engenius_eap300-v2 ar9344_engenius_eap600 ar9344_engenius_ecb600 qca9557_engenius_enstationac-v1 qca9558_belkin_f9j1108-v2 qca9558_belkin_f9k1115-v2 mt7620a_edimax_ew-7476rpc mt7620a_edimax_ew-7478ac - added Tested-by tags for some of the okli and netgear devices Changes in v2 - added documentation of the properties, almost upstreamable - added a device tree header shared with the driver - changed property names to openwrt,foo and tied these to an openwrt,uimage compatible string - split out the definition of the properties from the deletion of the "edimax,uimage" parser Bjørn Mork (10): dt-bindings: mtd: partitions: add OpenWrt defined U-Boot Image kernel: mtdsplit_uimage: read extralen from device tree kernel: mtdsplit_uimage: replace "fonfxc" and "sge" parsers kernel: mtdsplit_uimage: add "openwrt, ih-magic" device-tree property kernel: mtdsplit_uimage: replace "openwrt, okli" parser kernel: mtdsplit_uimage: replace "allnet, uimage" parser kernel: mtdsplit_uimage: add "openwrt, ih-type" device-tree property kernel: mtdsplit_uimage: replace "netgear, uimage" parser kernel: mtdsplit_uimage: add "openwrt, offset" and "openwrt, partition-magic" kernel: mtdsplit_uimage: replace "edimax, uimage" parser .../linux/ath79/dts/ar7161_netgear_wndr.dtsi | 1 + .../ath79/dts/ar7161_netgear_wndr3700-v2.dts | 4 +- .../ath79/dts/ar7161_netgear_wndr3700.dts | 4 +- .../ath79/dts/ar7161_netgear_wndr3800.dts | 4 +- .../ath79/dts/ar7161_netgear_wndr3800ch.dts | 4 +- .../ath79/dts/ar7161_netgear_wndrmac-v1.dts | 4 +- .../ath79/dts/ar7161_netgear_wndrmac-v2.dts | 4 +- .../ath79/dts/ar7240_engenius_enh202-v1.dts | 3 +- .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 5 +- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 5 +- .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 5 +- .../ath79/dts/ar7241_netgear_wnr2200-16m.dts | 4 +- .../ath79/dts/ar7241_netgear_wnr2200-8m.dts | 4 +- .../ath79/dts/ar7241_netgear_wnr2200.dtsi | 1 + .../ath79/dts/ar7242_engenius_eap350-v1.dts | 3 +- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 3 +- .../ath79/dts/ar9341_engenius_eap300-v2.dts | 3 +- .../dts/ar9341_engenius_ens202ext-v1.dts | 3 +- .../linux/ath79/dts/ar9341_pisen_wmb001n.dts | 3 +- .../ath79/dts/ar9344_engenius_exx600.dtsi | 3 +- .../linux/ath79/dts/ar9344_netgear_wndr.dtsi | 5 +- .../dts/qca9557_engenius_enstationac-v1.dts | 3 +- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 3 +- .../mtd/partitions/openwrt,uimage.yaml | 91 ++++ .../drivers/mtd/mtdsplit/mtdsplit_uimage.c | 426 +++--------------- .../dt-bindings/mtd/partitions/uimage.h | 191 ++++++++ .../dts/mt7620a_edimax_br-6478ac-v2.dts | 4 +- .../ramips/dts/mt7620a_edimax_ew-7478apc.dts | 4 +- .../ramips/dts/mt7620a_edimax_ew-747x.dtsi | 4 +- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 3 +- .../ramips/dts/mt7620n_sunvalley_filehub.dtsi | 3 +- .../ramips/dts/mt7621_dlink_dir-8xx-a1.dtsi | 3 +- .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 6 +- .../linux/ramips/dts/mt7621_edimax_re23s.dts | 4 +- .../ramips/dts/rt3050_edimax_3g-6200n.dts | 4 +- .../ramips/dts/rt3050_edimax_3g-6200nl.dts | 4 +- .../ramips/dts/rt3662_edimax_br-6475nd.dts | 4 +- .../dts/rtl8380_netgear_gs110tpp-v1.dts | 3 +- .../dts/rtl8382_allnet_all-sg8208m.dts | 3 +- 39 files changed, 447 insertions(+), 391 deletions(-) create mode 100644 target/linux/generic/files/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml create mode 100644 target/linux/generic/files/include/dt-bindings/mtd/partitions/uimage.h