From patchwork Sat Aug 4 13:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 953451 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S5SfqgIO"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="NUfqLyM2"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41jQBz4f5cz9sXZ for ; Sat, 4 Aug 2018 23:44:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mLX+MAJFhiBm5zPfPnRBlR1NFaMyQMs3mueBiHAzZ9E=; b=S5SfqgIO9sJEzr nfSRYPX85caY40Z/b6cR0Bptzu3IgCC/bAvmIIFAOP0LQbmjT0KlY4WUc8rYBvprjafUfoGtSiJbP vQgrVoqz9lozacp7SeK9mHqJPlh4tUCBjYr5MMRUUxUMtqHWmO2yjGqOKvQD1A5SvLjKzMOBwsIoF ZGgxztSLmWXBkabjfsfo4b85MMD4Jh6AlpWCwlUHFLIzYoLrp7KhR9R+z6jmSQgK5jLYT3bdqhtIz 4lXY9KzwkpZ4BhlGrLTMKlBz/lAnafQZY0KkNCssNrM4KYzu1ZwzBvxCGfok1l4x58e5wZTjtZrjO dSxMoxP+ccrud0HPt66A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flwrV-0004Zl-Rp; Sat, 04 Aug 2018 13:44:53 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flwrL-0004Qv-7a for openwrt-devel@lists.openwrt.org; Sat, 04 Aug 2018 13:44:45 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 6E74512009F; Sat, 4 Aug 2018 15:44:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org 6E74512009F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1533390268; bh=uDwPelsLeIOd/6eh80Q9wEIu/z7jV1V0qJ/QI1W08os=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NUfqLyM2FV1yznAIyjZUJypPydjCZRc4F2nSebEqdYE2ip+sI4PXIR+Jwysp3shWY VoTP+46t2L3KAtO35+KnbtbuNFfWvzaPXxOgxvBy1UzbfjTBx0y/T/dxdwP4sy6MdP TFG2Otx+r8/eDlZgBI9+BrZC0ANTxoi4zWHDsfBQ= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sat, 4 Aug 2018 15:44:26 +0200 Message-Id: <20180804134426.42093-3-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180804134426.42093-1-hacks@slashdirt.org> References: <20180729090724.8436-1-hacks@slashdirt.org> <20180804134426.42093-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180804_064443_431377_7D2F461D X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record -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_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH v3 2/2] ramips: fix RBM11G partitioning X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, tobleminer@gmail.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch improves faf64056ddd46992a75b1e277d94541c7251035c by correcting the partition scheme for the "RouterBoot" section of the flash. The partition scheme initially submitted is incorrect and does not reflect the actual flash structure. The "RouterBoot" section (name matching OEM) is subdivided in several static segments, as they are on ar71xx RB devices albeit with different offsets and sizes. The naming convention from ar71xx has been preserved, except for the bootloaders which are named "bootloader1" and "bootloader2" to avoid confusion with the master "RouterBoot" partition. The preferred 'fixed-partitions' DTS node syntax is used, with nesting support as introduced in 2a598bbaa3. "partition" is used for node names, with associated "label" to match policy set by 6dd94c2781. Leave a note in DTS to explain how the original author selected the SPI speed. Tested-by: Tobias Schramm Signed-off-by: Thibaut VARĂˆNE --- target/linux/ramips/dts/RBM11G.dts | 45 ++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts index 800f230d95..41dabdd1a3 100644 --- a/target/linux/ramips/dts/RBM11G.dts +++ b/target/linux/ramips/dts/RBM11G.dts @@ -86,6 +86,7 @@ w25q128@0 { compatible = "jedec,spi-nor"; reg = <0>; + // XXX empiric value to obtain actual 10MHz SCK at the chip spi-max-frequency = <3125000>; partitions { @@ -94,15 +95,41 @@ #size-cells = <1>; partition@0 { - label = "routerboot"; - reg = <0x000000 0x00F000>; - read-only; - }; - - factory: partition@f000 { - label = "factory"; - reg = <0x00F000 0x031000>; + label = "RouterBoot"; + reg = <0x0 0x40000>; read-only; + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader1"; + reg = <0x0 0xf000>; + read-only; + }; + + hard_config: partition@f000 { + label = "hard_config"; + reg = <0xf000 0x1000>; + read-only; + }; + + partition@10000 { + label = "bootloader2"; + reg = <0x10000 0xf000>; + read-only; + }; + + partition@20000 { + label = "soft_config"; + reg = <0x20000 0x1000>; + }; + + partition@30000 { + label = "bios"; + reg = <0x30000 0x1000>; + read-only; + }; }; partition@40000 { @@ -114,7 +141,7 @@ }; ðernet { - mtd-mac-address = <&factory 0x0010>; + mtd-mac-address = <&hard_config 0x0010>; mtd-mac-address-increment = <1>; };