From patchwork Thu Feb 25 20:17:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1444598 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=Fsu108JE; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=3e8.eu header.i=@3e8.eu header.a=rsa-sha256 header.s=mail20170724 header.b=B0fQmzKn; 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 4DmkgG5Yd8z9sVS for ; Fri, 26 Feb 2021 07:20:26 +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:References:In-Reply-To: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:List-Owner; bh=exhwDvVZyy0nEVb065hUAIKPohhAS1Yq6YxnSa8TNks=; b=Fsu108JEppEsQ7axUnkJwGOXq J5ra7yd/MAWKjqiQU9o1Nqs7KAtpWzL77m3nrcOBV8T4uuH2JsHjEU/whKZ2XBfwEPFoG3AN9YOhQ pLU/xfh5lpky1GBU1dRcv3TY1lAtoE+Iz9W9SOsYkfYA8lM2nOd5xAUmwll4ZHrj5RDqKJzZwpFUE PayeFUK8IfIuXiKX9NR+CAMCVQ/bj7+hXpHdnYf5iTCgIFL2ryQyAkGztNfydjNsucxfPFEozNtiR U5M+nBL1XlQT7/dGPRtpT6UA+9pQwRAF6FxCQJCpMi39tc97bHNEym0sGxOGSRnboRLk9e/QubPAi KssSG9/FQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFN5g-0007JO-Q5; Thu, 25 Feb 2021 20:18:28 +0000 Received: from srv4.3e8.eu ([193.25.101.238]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFN5c-0007HN-UY for openwrt-devel@lists.openwrt.org; Thu, 25 Feb 2021 20:18:26 +0000 Received: from localhost.localdomain (p200300c6cf27cba0eb00b3f07c02ac8f.dip0.t-ipconnect.de [IPv6:2003:c6:cf27:cba0:eb00:b3f0:7c02:ac8f]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by srv4.3e8.eu (Postfix) with ESMTPSA id 398B860039; Thu, 25 Feb 2021 21:18:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20170724; t=1614284292; bh=J5Z+WGeFTF7rB65JsDPJ7cPz+WEq5ZOjIBzmvxKfL28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B0fQmzKnPjYWuBRdKTi69Nv5yzvjOOhCgR7ShYPLFF44ecr0r+dfhvrs0rU8VnzJD 8AQsWHLzmwOlw8bK7qc9k8+DUxA/2MjNG8KF9CgI9SWxw29A7S8kT70lsLpSKMSUrU fDb6cqlEAxXQcPXFueuHHz+xX4WaR7AaW/WcXRiU/X5iLZWqkLRy6wiOC3+TsP3a9V xfe3Qb0395HRCWkUrPcDW5t/uh/K3CmMVj6eVNHH1maq+Bp8ENnLKpOqQJn+mAIsaR Ods76CIUuKeoYmIozgRwWXw0OuYJxgAfY/QvWDCbqrMBGsBWkyEHu7k8t5ISXFje6T y3tPEQHQJneWg== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 0/2] ramips: use partition table on Netgear NAND devices Date: Thu, 25 Feb 2021 21:17:58 +0100 Message-Id: <20210225201800.2478284-1-jan@3e8.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20200628232747.1367531-1-jan@3e8.eu> References: <20200628232747.1367531-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_151825_220037_032865BD X-CRM114-Status: GOOD ( 11.90 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 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: drvlabo@gmail.com, jan@3e8.eu, jost@1.node1.de Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Netgear devices based on the boards CHJ or BZV currently use a fixed partition table. However, every device actually has an individual partition table on the flash that depends on the bad blocks that exist during manufacturing. The current fixed partition table is only correct for devices without any bad blocks. This series adds a partition table parser and uses it instead of the fixed partitions. v2: - split into separate parts for parser and DTS changes Jan Hoffmann (2): ramips: add Sercomm partition map parser ramips: use partition parser on Netgear CHJ/BZV .../dts/mt7621_netgear_sercomm_bzv.dtsi | 169 +++++++++++- .../dts/mt7621_netgear_sercomm_chj.dtsi | 169 +++++++++++- .../ramips/files/drivers/mtd/parsers/scpart.c | 257 ++++++++++++++++++ target/linux/ramips/mt7621/config-5.4 | 1 + .../patches-5.4/303-mtd-scpart-parser.patch | 19 ++ 5 files changed, 607 insertions(+), 8 deletions(-) create mode 100644 target/linux/ramips/files/drivers/mtd/parsers/scpart.c create mode 100644 target/linux/ramips/patches-5.4/303-mtd-scpart-parser.patch