From patchwork Wed Jan 20 17:36:43 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: 1429350 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=vWwDauku; 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=I95O2OEa; 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 4DLXqf1xB9z9sRR for ; Thu, 21 Jan 2021 04:40:46 +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=SgEkE19+w5p/vPvW98vKwaqqH9yfHx3g5VOvNy+MIFA=; b=vWwDaukuZfBzXeKV+1ifaNqI5w bT4tXbc24DPx7HcKT/nAk4EtL56QHPNQp8r3tembowJHH5KoV6aPP3vWeNaqWq1Thjwj9ZBkuNytD 5xrocHzcOLs/D0yFnHj3qU+nGbs7u7i+H+mvsS2FkHUFHxkrp45H+Q/Zg7OHT/JNRyKU8dXVVuWxv 3QcYCjXqPAswH5pOOM8Eo7aIOACVQBq6XyL54HUefTumJCB42smvDCzUjKokaDivSekqennO8h2Vv OsCErDCjQIgAaO7e4wVauUdtIDbxPtj5/eYp+VKqqnZt+yfdjqDN1o3Xk+eSUNDuU/HiY4seqch9R bu4noJsw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HQZ-0002bp-VM; Wed, 20 Jan 2021 17:37:55 +0000 Received: from canardo.mork.no ([2001:4641::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HPj-0002E5-LZ for openwrt-devel@lists.openwrt.org; Wed, 20 Jan 2021 17:37:16 +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 10KHb1IA028831 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Wed, 20 Jan 2021 18:37:01 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1611164221; bh=r7k28xvFkp1TDZ2hMPsIQcKFaAUryMu3z0cVFpDwDpA=; h=From:To:Cc:Subject:Date:Message-Id:From; b=I95O2OEaG+ZzPB7uA+oRPgkm+AL7f8TFZX/FFv4R/N4yMSRTap9hWY3EN1FHo54Pk Ld0YaVy+icV6mf0K0eqshx9mPhsZXCHay7lCDZK+bQvL17+VLaOwnyNqmmVRq85Wd7 Nl4oTvpMqSTyT9zotCLER2xkeLsyx/tUlseKy8cI= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 10KHb0hA028830; Wed, 20 Jan 2021 18:37:00 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH v4 00/10] kernel: mtdsplit_uimage: use device tree properties for non-standard uimage parsing Date: Wed, 20 Jan 2021 18:36:43 +0100 Message-Id: <20210120173653.28784-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_123704_099409_271DE632 X-CRM114-Status: GOOD ( 13.65 ) 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 v4: - changed license of dt-bindings docs - added IH_MAGIC_OKLI, FW_EDIMAX_OFFSET and FW_MAGIC_EDIMAX macros and used these instead of the magic values in the DTS files - removed unwanted space after comma in patch subjects 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 | 4 +- .../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 | 4 +- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 4 +- .../ath79/dts/ar9341_engenius_eap300-v2.dts | 4 +- .../dts/ar9341_engenius_ens202ext-v1.dts | 4 +- .../linux/ath79/dts/ar9341_pisen_wmb001n.dts | 4 +- .../ath79/dts/ar9344_engenius_exx600.dtsi | 4 +- .../linux/ath79/dts/ar9344_netgear_wndr.dtsi | 5 +- .../dts/qca9557_engenius_enstationac-v1.dts | 4 +- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 4 +- .../mtd/partitions/openwrt,uimage.yaml | 91 ++++ .../drivers/mtd/mtdsplit/mtdsplit_uimage.c | 426 +++--------------- .../dt-bindings/mtd/partitions/uimage.h | 198 ++++++++ .../dts/mt7620a_edimax_br-6478ac-v2.dts | 5 +- .../ramips/dts/mt7620a_edimax_ew-7478apc.dts | 5 +- .../ramips/dts/mt7620a_edimax_ew-747x.dtsi | 5 +- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 3 +- .../ramips/dts/mt7620n_sunvalley_filehub.dtsi | 4 +- .../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 | 5 +- .../ramips/dts/rt3050_edimax_3g-6200n.dts | 5 +- .../ramips/dts/rt3050_edimax_3g-6200nl.dts | 5 +- .../ramips/dts/rt3662_edimax_br-6475nd.dts | 5 +- .../dts/rtl8380_netgear_gs110tpp-v1.dts | 3 +- .../dts/rtl8382_allnet_all-sg8208m.dts | 3 +- 39 files changed, 471 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