From patchwork Mon Apr 20 13:13:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273356 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=i9g8CFtE; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=cdCx2IrX; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495Rx54bbNz9sSw for ; Mon, 20 Apr 2020 23:14:17 +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=LFfX2Q+OUNdJ6Gk/ZzFIFsqjsxLd6WxtDiQYEmPMVz0=; b=i9g8CFtEIdqHpX 649eSfq7Cb7tvSVMlNIx8UMU5twZ15MEv30UqRWlasbVwkgOT2xHsziCSDWoOvf6/erFF0OHCIndb uIAjVpAvYrVeQbmrvIl5mcQDskumnEWk0S0LFkclxR+iHZdtbW1Q1hbQbvLSHKAYIMQV7zz3XbuTS KwR5fv25bCyXwm/GktW068DxA5ejvk/xueclf6896RymSDaUefeFaBu5XJ45K+0Iq3HtaBRcUmUNM QYPmrqGbEBrP/arJdt/eYi445FUiKH2ESD/4XBtB8qYJ6LZA5nJ1x5kSxkX8cC1j2o07utCXbasLy NMxQqYQPVIoInGOypH8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFZ-0005MM-F2; Mon, 20 Apr 2020 13:14:13 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFL-0004wP-Sz for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:02 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id 8039560335; Mon, 20 Apr 2020 15:13:51 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org 8039560335 Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 8039560335 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388432; bh=JYlB+oWWHvUcu89CsPP8cfu5NhMJ+HOv0YRXYZtejls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cdCx2IrXpDbLeTsdqwBpkPa+JUg6qU5MIhlH17Y38/ZrIFCCX+L1tpAi6KwIFHvO/ mu6fzTBlLacETWv10pqcR4x6ouMdYFVwnDRgFR9e4VjOKivbrf/W+ZXV8KQUh1ZAob lloPRbmeXo+oxWYW80KCsk9w2AFxA/QdIStW/n58= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:13:51 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:31 +0200 Message-Id: <20200420131336.18252-2-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061400_404387_849CF9BE X-CRM114-Status: GOOD ( 29.26 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 1/6] generic: routerbootpart MTD parser for RouterBoot X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This driver provides an OF MTD parser to properly assign the RouterBoot partitions on the flash. This parser builds from the "fixed-partitions" one (see ofpart.c), but it can handle dynamic partitions as found on routerboot devices. The parent node must contain the following: compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; Children routerbootpart DTS nodes are defined as follows: For fixed partitions node-name@unit-address { reg = ; label = ; read-only; lock; }; All properties but reg are optional. For dynamic partitions: node-name { size = ; label = ; read-only; lock; }; size property is mandatory unless the next partition is a fixed one or a "well-known" one (matched from the strings defined below) in which case it can be omitted or set to 0; other properties are optional. By default dynamic partitions are appended after the preceding one, except for "well-known" ones which are automatically located on flash. Well-known partitions (matched via label or node-name): - "hard_config" - "soft_config" - "dtb_config" This parser requires the DTS to list partitions in ascending order as expected on the MTD device. This parser has been successfully tested on BE (ath79) and LE (ipq40xx and ramips) hardware. Tested-by: Baptiste Jonglez Tested-by: Roger Pueyo Centelles Tested-by: Tobias Schramm Tested-by: Christopher Hill Signed-off-by: Thibaut VARÈNE --- .../files/drivers/mtd/parsers/routerbootpart.c | 357 +++++++++++++++++++++ 1 file changed, 357 insertions(+) create mode 100644 target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c diff --git a/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c b/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c new file mode 100644 index 0000000000..8b0784388f --- /dev/null +++ b/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c @@ -0,0 +1,357 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Parser for MikroTik RouterBoot partitions. + * + * Copyright (C) 2020 Thibaut VARÈNE + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + * This parser builds from the "fixed-partitions" one (see ofpart.c), but it can + * handle dynamic partitions as found on routerboot devices. + * + * DTS nodes are defined as follows: + * For fixed partitions: + * node-name@unit-address { + * reg = ; + * label = ; + * read-only; + * lock; + * }; + * + * reg property is mandatory; other properties are optional. + * reg format is
. length can be 0 if the next partition is + * another fixed partition or a "well-known" partition as defined below: in that + * case the partition will extend up to the next one. + * + * For dynamic partitions: + * node-name { + * size = ; + * label = ; + * read-only; + * lock; + * }; + * + * size property is mandatory unless the next partition is a fixed one or + * a "well-known" one (matched from the strings defined below) in which case it + * can be omitted or set to 0; other properties are optional. + * size format is . + * By default dynamic partitions are appended after the preceding one, except + * for "well-known" ones which are automatically located on flash. + * + * Well-known partitions (matched via label or node-name): + * - "hard_config" + * - "soft_config" + * - "dtb_config" + * + * Note: this parser will happily register 0-sized partitions if misused. + * + * This parser requires the DTS to list partitions in ascending order as + * expected on the MTD device. + * + * Since only the "hard_config" and "soft_config" partitions are used in OpenWRT, + * a minimal working DTS could define only these two partitions dynamically (in + * the right order, usually hard_config then soft_config). + * + * Note: some mips RB devices encode the hard_config offset and length in two + * consecutive u32 located at offset 0x14 (for ramips) or 0x24 (for ath79) on + * the SPI NOR flash. Unfortunately this seems inconsistent across machines and + * does not apply to e.g. ipq-based ones, so we ignore that information. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#define RB_MAGIC_HARD (('H') | ('a' << 8) | ('r' << 16) | ('d' << 24)) +#define RB_MAGIC_SOFT (('S') | ('o' << 8) | ('f' << 16) | ('t' << 24)) +#define RB_BLOCK_SIZE 0x1000 + +struct routerboot_dynpart { + const char * const name; + const u32 magic; + int (* const size_fixup)(struct mtd_info *, struct routerboot_dynpart *); + size_t offset; + size_t size; + bool found; +}; + +static int routerboot_dtbsfixup(struct mtd_info *, struct routerboot_dynpart *); + +static struct routerboot_dynpart rb_dynparts[] = { + { + .name = "hard_config", + .magic = RB_MAGIC_HARD, // stored in CPU-endianness on flash + .size_fixup = NULL, + .offset = 0x0, + .size = RB_BLOCK_SIZE, + .found = false, + }, { + .name = "soft_config", + .magic = RB_MAGIC_SOFT, // stored in CPU-endianness on flash + .size_fixup = NULL, + .offset = 0x0, + .size = RB_BLOCK_SIZE, + .found = false, + }, { + .name = "dtb_config", + .magic = fdt32_to_cpu(OF_DT_HEADER), // stored BE on flash + .size_fixup = routerboot_dtbsfixup, + .offset = 0x0, + .size = 0x0, + .found = false, + } +}; + +static int routerboot_dtbsfixup(struct mtd_info *master, struct routerboot_dynpart *rbdpart) +{ + int err; + size_t bytes_read, psize; + struct { + fdt32_t magic; + fdt32_t totalsize; + fdt32_t off_dt_struct; + fdt32_t off_dt_strings; + fdt32_t off_mem_rsvmap; + fdt32_t version; + fdt32_t last_comp_version; + fdt32_t boot_cpuid_phys; + fdt32_t size_dt_strings; + fdt32_t size_dt_struct; + } fdt_header; + + err = mtd_read(master, rbdpart->offset, sizeof(fdt_header), + &bytes_read, (u8 *)&fdt_header); + if (err) + return err; + + if (bytes_read != sizeof(fdt_header)) + return -EIO; + + psize = fdt32_to_cpu(fdt_header.totalsize); + if (!psize) + return -EINVAL; + + rbdpart->size = psize; + return 0; +} + +static void routerboot_find_dynparts(struct mtd_info *master) +{ + size_t bytes_read, offset; + bool allfound; + int err, i; + u32 buf; + + /* + * Dynamic RouterBoot partitions offsets are aligned to RB_BLOCK_SIZE. + * Read the whole partition at RB_BLOCK_SIZE intervals to find sigs. + */ + offset = 0; + while (offset < master->size) { + err = mtd_read(master, offset, sizeof(buf), &bytes_read, (u8 *)&buf); + if (err) { + pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n", + master->name, offset, err); + continue; + } + + allfound = true; + + for (i = 0; i < ARRAY_SIZE(rb_dynparts); i++) { + if (rb_dynparts[i].found) + continue; + + allfound = false; + + if (rb_dynparts[i].magic == buf) { + rb_dynparts[i].offset = offset; + + if (rb_dynparts[i].size_fixup) { + err = rb_dynparts[i].size_fixup(master, &rb_dynparts[i]); + if (err) { + pr_err("%s: size fixup error while parsing \"%s\": %d\n", + master->name, rb_dynparts[i].name, err); + continue; + } + } + + rb_dynparts[i].found = true; + + /* + * move offset to skip the whole partition on + * next iteration if size > RB_BLOCK_SIZE. + */ + if (rb_dynparts[i].size > RB_BLOCK_SIZE) + offset += ALIGN_DOWN((rb_dynparts[i].size - RB_BLOCK_SIZE), RB_BLOCK_SIZE); + + break; + } + } + + offset += RB_BLOCK_SIZE; + + if (allfound) + break; + } +} + +static int routerboot_partitions_parse(struct mtd_info *master, + const struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +{ + struct mtd_partition *parts; + struct device_node *rbpart_node, *pp; + const char *partname; + size_t master_ofs; + int np; + + + /* Pull of_node from the master device node */ + rbpart_node = mtd_get_of_node(master); + if (!rbpart_node) + return 0; + + /* First count the subnodes */ + np = 0; + for_each_child_of_node(rbpart_node, pp) + np++; + + if (!np) + return 0; + + parts = kcalloc(np, sizeof(*parts), GFP_KERNEL); + if (!parts) + return -ENOMEM; + + /* Preemptively look for known parts in flash */ + routerboot_find_dynparts(master); + + np = 0; + master_ofs = 0; + for_each_child_of_node(rbpart_node, pp) { + const __be32 *reg, *sz; + size_t offset, size; + int i, len, a_cells, s_cells; + + partname = of_get_property(pp, "label", &len); + /* Allow deprecated use of "name" instead of "label" */ + if (!partname) + partname = of_get_property(pp, "name", &len); + /* Fallback to node name per spec if all else fails: partname is always set */ + if (!partname) + partname = pp->name; + parts[np].name = partname; + + reg = of_get_property(pp, "reg", &len); + if (reg) { + /* Fixed partition */ + a_cells = of_n_addr_cells(pp); + s_cells = of_n_size_cells(pp); + + if ((len / 4) != (a_cells + s_cells)) { + pr_debug("%s: routerboot partition %pOF (%pOF) error parsing reg property.\n", + master->name, pp, rbpart_node); + goto rbpart_fail; + } + + offset = of_read_number(reg, a_cells); + size = of_read_number(reg + a_cells, s_cells); + } else { + /* Dynamic partition */ + /* Default: part starts at current offset, 0 size */ + offset = master_ofs; + size = 0; + + /* Check if well-known partition */ + for (i = 0; i < ARRAY_SIZE(rb_dynparts); i++) { + if (!strcmp(partname, rb_dynparts[i].name) && rb_dynparts[i].found) { + offset = rb_dynparts[i].offset; + size = rb_dynparts[i].size; + break; + } + } + + /* Standalone 'size' property? Override size */ + sz = of_get_property(pp, "size", &len); + if (sz) { + s_cells = of_n_size_cells(pp); + if ((len / 4) != s_cells) { + pr_debug("%s: routerboot partition %pOF (%pOF) error parsing size property.\n", + master->name, pp, rbpart_node); + goto rbpart_fail; + } + + size = of_read_number(sz, s_cells); + } + } + + if (np > 0) { + /* Minor sanity check for overlaps */ + if (offset < (parts[np-1].offset + parts[np-1].size)) { + pr_err("%s: routerboot partition %pOF (%pOF) \"%s\" overlaps with previous partition \"%s\".\n", + master->name, pp, rbpart_node, + partname, parts[np-1].name); + goto rbpart_fail; + } + + /* Fixup end of previous partition if necessary */ + if (!parts[np-1].size) + parts[np-1].size = (offset - parts[np-1].offset); + } + + if ((offset + size) > master->size) { + pr_err("%s: routerboot partition %pOF (%pOF) \"%s\" extends past end of segment.\n", + master->name, pp, rbpart_node, partname); + goto rbpart_fail; + } + + parts[np].offset = offset; + parts[np].size = size; + parts[np].of_node = pp; + + if (of_get_property(pp, "read-only", &len)) + parts[np].mask_flags |= MTD_WRITEABLE; + + if (of_get_property(pp, "lock", &len)) + parts[np].mask_flags |= MTD_POWERUP_LOCK; + + /* Keep master offset aligned to RB_BLOCK_SIZE */ + master_ofs = ALIGN(offset + size, RB_BLOCK_SIZE); + np++; + } + + *pparts = parts; + return np; + +rbpart_fail: + pr_err("%s: error parsing routerboot partition %pOF (%pOF)\n", + master->name, pp, rbpart_node); + of_node_put(pp); + kfree(parts); + return -EINVAL; +} + +static const struct of_device_id parse_routerbootpart_match_table[] = { + { .compatible = "mikrotik,routerboot-partitions" }, + {}, +}; +MODULE_DEVICE_TABLE(of, parse_routerbootpart_match_table); + +static struct mtd_part_parser routerbootpart_parser = { + .parse_fn = routerboot_partitions_parse, + .name = "routerbootpart", + .of_match_table = parse_routerbootpart_match_table, +}; +module_mtd_part_parser(routerbootpart_parser); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MTD partitioning for RouterBoot"); +MODULE_AUTHOR("Thibaut VARENE"); From patchwork Mon Apr 20 13:13:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273358 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=K4H7F9dA; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=rO+HUmP/; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495RxS4d2tz9sSm for ; Mon, 20 Apr 2020 23:14:36 +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=PZGdHZyCmzWB+U7yaFqazDqrrYF2CquBGfclqF5m15w=; b=K4H7F9dAOWfHZG gi96dE0XGFZavB4DeZyuom0rPR5GCKsf2EU+d6sxc8xLnvMqwmAYJ+PzT/TOGrhw+2UqifrR6WHKp EvPw3RCArPRXgVCkWIlxbi4cIVCWR4Py6QpsRMWC6PHE3934GGL1/Ew2vLfG4DEb/9Y9R8HdDvnHy gbWGTnfHAI2+RsZRuSPr1tUUuXEXgwLuALMUmoAI0Boin7Gq5E+htPVIloWVpxEhAc2yNfueIaJzq pLNXuVW2+nqNqf1MlBnco/anAITkaSEqPlvhHNiezXA0IIgidmunHf5ChIHOHteoYYQiY3/hbNmM6 2ARO+17FP9F2HV38C6OQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFr-0005ge-6w; Mon, 20 Apr 2020 13:14:31 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFM-0004xO-A4 for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:03 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id B48906055A; Mon, 20 Apr 2020 15:13:55 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org B48906055A Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org B48906055A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388436; bh=gSINYW1CZzoeLOg/P0Hhdj4ttH1S2pLTKnpqpipVbP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rO+HUmP/avvyESa2VZnugAGXye7HeQg+owXaiIGbz3Qz3f4sdns5d/+rmGqAZE24g qU2r1CfoKYs1/X5YA+8UDHR8OSVKqDfX4Hwug/n7vqfn7ef2XmW3R7OzvhfheMtbcJ gxFEcT8wrQMF8YB+Db6mywy5ZgBvv94GXRgE9G5o= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:13:55 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:32 +0200 Message-Id: <20200420131336.18252-3-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061400_674866_FC576189 X-CRM114-Status: GOOD ( 17.62 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 2/6] generic: routerboot partition build bits X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Thibaut VARÈNE --- target/linux/generic/config-4.14 | 1 + target/linux/generic/config-4.19 | 1 + target/linux/generic/config-5.4 | 1 + .../435-mtd-add-routerbootpart-parser-config.patch | 43 ++++++++++++++++++++++ .../435-mtd-add-routerbootpart-parser-config.patch | 41 +++++++++++++++++++++ .../435-mtd-add-routerbootpart-parser-config.patch | 38 +++++++++++++++++++ 6 files changed, 125 insertions(+) create mode 100644 target/linux/generic/pending-4.14/435-mtd-add-routerbootpart-parser-config.patch create mode 100644 target/linux/generic/pending-4.19/435-mtd-add-routerbootpart-parser-config.patch create mode 100644 target/linux/generic/pending-5.4/435-mtd-add-routerbootpart-parser-config.patch diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index cd087227ae..c8b3c602dd 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -2877,6 +2877,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_ROM is not set CONFIG_MTD_ROOTFS_ROOT_DEV=y +# CONFIG_MTD_ROUTERBOOT_PARTS is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_SM_COMMON is not set # CONFIG_MTD_SPINAND_MT29F is not set diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index 4ce3de57ad..9e3e35f793 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -3024,6 +3024,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_ROM is not set CONFIG_MTD_ROOTFS_ROOT_DEV=y +# CONFIG_MTD_ROUTERBOOT_PARTS is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_SM_COMMON is not set # CONFIG_MTD_SPINAND_MT29F is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 21dd447cdf..7a7f27c1fc 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -3220,6 +3220,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_ROM is not set CONFIG_MTD_ROOTFS_ROOT_DEV=y +# CONFIG_MTD_ROUTERBOOT_PARTS is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_SM_COMMON is not set # CONFIG_MTD_SPINAND_MT29F is not set diff --git a/target/linux/generic/pending-4.14/435-mtd-add-routerbootpart-parser-config.patch b/target/linux/generic/pending-4.14/435-mtd-add-routerbootpart-parser-config.patch new file mode 100644 index 0000000000..192886b102 --- /dev/null +++ b/target/linux/generic/pending-4.14/435-mtd-add-routerbootpart-parser-config.patch @@ -0,0 +1,43 @@ +From 4437e01fb6bca63fccdba5d6c44888b0935885c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= +Date: Tue, 24 Mar 2020 11:45:07 +0100 +Subject: [PATCH] generic: routerboot partition build bits (4.14) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch adds routerbootpart kernel build bits + +Signed-off-by: Thibaut VARÈNE +--- + drivers/mtd/parsers/Kconfig | 9 +++++++++ + drivers/mtd/parsers/Makefile | 1 + + 2 files changed, 10 insertions(+) + +diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig +index d206b3c..58cbdd6 100644 +--- a/drivers/mtd/parsers/Kconfig ++++ b/drivers/mtd/parsers/Kconfig +@@ -6,3 +6,12 @@ config MTD_PARSER_TRX + may contain up to 3/4 partitions (depending on the version). + This driver will parse TRX header and report at least two partitions: + kernel and rootfs. ++ ++config MTD_ROUTERBOOT_PARTS ++ tristate "RouterBoot flash partition parser" ++ depends on MTD && OF ++ help ++ MikroTik RouterBoot is implemented as a multi segment system on the ++ flash, some of which are fixed and some of which are located at ++ variable offsets. This parser handles both cases via properly ++ formatted DTS. +diff --git a/drivers/mtd/parsers/Makefile b/drivers/mtd/parsers/Makefile +index 4d9024e..41d363a 100644 +--- a/drivers/mtd/parsers/Makefile ++++ b/drivers/mtd/parsers/Makefile +@@ -1 +1,2 @@ + obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o ++obj-$(CONFIG_MTD_ROUTERBOOT_PARTS) += routerbootpart.o +-- +2.11.0 + diff --git a/target/linux/generic/pending-4.19/435-mtd-add-routerbootpart-parser-config.patch b/target/linux/generic/pending-4.19/435-mtd-add-routerbootpart-parser-config.patch new file mode 100644 index 0000000000..678eaed4ce --- /dev/null +++ b/target/linux/generic/pending-4.19/435-mtd-add-routerbootpart-parser-config.patch @@ -0,0 +1,41 @@ +From 4437e01fb6bca63fccdba5d6c44888b0935885c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= +Date: Tue, 24 Mar 2020 11:45:07 +0100 +Subject: [PATCH] generic: routerboot partition build bits (4.19) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch adds routerbootpart kernel build bits + +Signed-off-by: Thibaut VARÈNE +--- + drivers/mtd/parsers/Kconfig | 9 +++++++++ + drivers/mtd/parsers/Makefile | 1 + + 2 files changed, 10 insertions(+) + +diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig +index de6f5f8..0afa89c 100644 +--- a/drivers/mtd/parsers/Kconfig ++++ b/drivers/mtd/parsers/Kconfig +@@ -22,3 +22,12 @@ config MTD_SHARPSL_PARTS + This provides the read-only FTL logic necessary to read the partition + table from the NAND flash of Sharp SL Series (Zaurus) and the MTD + partition parser using this code. ++ ++config MTD_ROUTERBOOT_PARTS ++ tristate "RouterBoot flash partition parser" ++ depends on MTD && OF ++ help ++ MikroTik RouterBoot is implemented as a multi segment system on the ++ flash, some of which are fixed and some of which are located at ++ variable offsets. This parser handles both cases via properly ++ formatted DTS. +diff --git a/drivers/mtd/parsers/Makefile b/drivers/mtd/parsers/Makefile +index 44ff342..0543362 100644 +--- a/drivers/mtd/parsers/Makefile ++++ b/drivers/mtd/parsers/Makefile +@@ -1,2 +1,3 @@ + obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o + obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o ++obj-$(CONFIG_MTD_ROUTERBOOT_PARTS) += routerbootpart.o diff --git a/target/linux/generic/pending-5.4/435-mtd-add-routerbootpart-parser-config.patch b/target/linux/generic/pending-5.4/435-mtd-add-routerbootpart-parser-config.patch new file mode 100644 index 0000000000..3ab78838b0 --- /dev/null +++ b/target/linux/generic/pending-5.4/435-mtd-add-routerbootpart-parser-config.patch @@ -0,0 +1,38 @@ +From 4437e01fb6bca63fccdba5d6c44888b0935885c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= +Date: Tue, 24 Mar 2020 11:45:07 +0100 +Subject: [PATCH] generic: routerboot partition build bits (5.4) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch adds routerbootpart kernel build bits + +Signed-off-by: Thibaut VARÈNE +--- + drivers/mtd/parsers/Kconfig | 9 +++++++++ + drivers/mtd/parsers/Makefile | 1 + + 2 files changed, 10 insertions(+) + +--- a/drivers/mtd/parsers/Kconfig ++++ b/drivers/mtd/parsers/Kconfig +@@ -160,3 +160,12 @@ config MTD_REDBOOT_PARTS_READONLY + 'FIS directory' images, enable this option. + + endif # MTD_REDBOOT_PARTS ++ ++config MTD_ROUTERBOOT_PARTS ++ tristate "RouterBoot flash partition parser" ++ depends on MTD && OF ++ help ++ MikroTik RouterBoot is implemented as a multi segment system on the ++ flash, some of which are fixed and some of which are located at ++ variable offsets. This parser handles both cases via properly ++ formatted DTS. +--- a/drivers/mtd/parsers/Makefile ++++ b/drivers/mtd/parsers/Makefile +@@ -10,3 +10,4 @@ + obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o + obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o + obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o ++obj-$(CONFIG_MTD_ROUTERBOOT_PARTS) += routerbootpart.o From patchwork Mon Apr 20 13:13:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273359 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=OL6YqYe7; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=O0oqLQTW; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495Rxl5wMDz9sSm for ; Mon, 20 Apr 2020 23:14:51 +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=xPi093S2Tecblfw+xhE+Bh/SG7FLD7scwNxq8q7wytU=; b=OL6YqYe7FPxFzv wLpSRL2qea3N+MJHmNaACPl+Ckn8Z8A5VBRi9SQgrpjksKeKssxOHlHG1t7R+B+OmCpsy1rEQYp6R 3W9M+SoSeGN3rwBlydK2rjXctECtUvE08nlGDBpZQR2ATlNyz8m68PZaCmAvi6Gf7LmzICbEzpmX3 Ok9lYm1Q6EBGiDah9LbYGir5ICmMjqcUgUTAcbO59ZS6T+n3rg85sWR/CNQ0HWzeO01HNt+to3fBx IF9KHVH43v6NAZZcFpq8/rA/muwp9bXqf7+wEeJtAFBkh9MZKNq7vKC+wB+yUjVTQA+cswwmbuZzO KeLgb8kc31rwPyzHfI4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWG7-0005zV-IO; Mon, 20 Apr 2020 13:14:47 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFP-00052k-PV for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:05 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id 8CBB860F7D; Mon, 20 Apr 2020 15:13:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org 8CBB860F7D Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 8CBB860F7D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388440; bh=iG6XITzC3xRLZlaetdfX1PQ1VyxDgIGD4MFWd4wpwdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0oqLQTWI+yyiWe/Fy66zVoS4087Fc/gdv4ZLwf/6DW17/OP4NBSxtAIhwLnHR5OV 9TrjwGV3u01+EcSjPa1WdMlelQvZuI3xcXBJ58o9O2JxthL76Kjwe8VojY11Dwq0+m AMamVzrf07nJJFlN87NRpUbkC4vBwXxqqRUczdnI= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:13:59 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:33 +0200 Message-Id: <20200420131336.18252-4-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061404_012748_8C6341F2 X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 3/6] ath79/mikrotik: enable CONFIG_MTD_ROUTERBOOT_PARTS X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Thibaut VARÈNE --- target/linux/ath79/mikrotik/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default index c0c61985bc..e1e30dbe8f 100644 --- a/target/linux/ath79/mikrotik/config-default +++ b/target/linux/ath79/mikrotik/config-default @@ -11,6 +11,7 @@ CONFIG_MTD_NAND_AR934X=y CONFIG_MTD_NAND_CORE=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_ROUTERBOOT_PARTS=y CONFIG_MTD_SPI_NAND=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPLIT_MINOR_FW=y From patchwork Mon Apr 20 13:13:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273360 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=HcnwRSVN; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=xR9WHp1s; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495RyN0Hvvz9sSm for ; Mon, 20 Apr 2020 23:15:24 +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=wfPlB6k9C/JJT/yo17cPO3Ta1ebgnD/W3sWYxly/VKg=; b=HcnwRSVN7rfJVW RJFt+jUDzlCs/dQmncd4pu7dKah/UxYPC/EVfXrm/BQL8bC6ovMpzuvCFVndAwtNXHccr02JqPh9Y e20gz2rNioNb+GXPOKzoVVLi3y0YqjAyLyl0DQv3onz+vzFw/5aB8chWQbR1pSMMIEMb+jAbxR03x +plqeSSIltNtiMddeseQnET6n8QLAh/K2c+WrICMuD0F7TpDNghQy3yJkmmrV4YSAmHlwl+kL/Od7 DzNYQ480HUonfNfPdPHFzlFdJO2eow7c02yAwGQ8sFnB9wqlGo0VOGECtrXdHVzzVJXpUdW3f9/AP dcNdzPaOrYNep5hTXN9g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWGc-0000SB-6u; Mon, 20 Apr 2020 13:15:18 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFT-0005De-Aj for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:08 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id 107DB6004B; Mon, 20 Apr 2020 15:14:03 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org 107DB6004B Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 107DB6004B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388444; bh=PWooICgY4UFC67qaHMMDK5BTxybAH67qgYw4qEXHrVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xR9WHp1syj+vO+WG1+ar/OGUsIrEwU8QyNoHSWN+Lj02h/SZqyXcYAyfJpomMEdnr ndYvPaNvrTE58AfgHUisWn9UwXXSxl99Kqd9AEqBF9dvZ1G+TmAefpBjqCuve7wjRu BZfF6NAyTEAv+RZ4EepTG5Ybz7xCnnmNVJpSCsBU= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:14:02 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:34 +0200 Message-Id: <20200420131336.18252-5-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061407_543823_CAA39A86 X-CRM114-Status: GOOD ( 10.71 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 4/6] ath79/mikrotik: use routerbootpart partitions X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Enable routerbootpart partitions on MikroTik devices. Tested-by: Roger Pueyo Centelles Signed-off-by: Thibaut VARÈNE --- .../qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts | 18 +++++++----------- .../qca9558_mikrotik_routerboard-922uags-5hpacd.dts | 17 +++++------------ 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts b/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts index 529ac1cf3b..18b58990b9 100644 --- a/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts +++ b/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts @@ -84,37 +84,33 @@ label = "RouterBoot"; reg = <0x0 0x20000>; read-only; - compatible = "fixed-partitions"; + compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader1"; - reg = <0x0 0xe000>; + reg = <0x0 0x0>; read-only; }; - hard_config: partition@e000 { - label = "hard_config"; - reg = <0xe000 0x1000>; + hard_config: hard_config { read-only; }; - partition@f000 { - label = "bios"; - reg = <0xf000 0x1000>; + bios { + size = <0x1000>; read-only; }; partition@10000 { label = "bootloader2"; - reg = <0x10000 0xf000>; + reg = <0x10000 0x0>; read-only; }; - partition@1f000 { + soft_config { label = "soft_config"; - reg = <0x1f000 0x1000>; }; }; diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts index 3f2a1a51a6..e40909678b 100644 --- a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts +++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts @@ -99,32 +99,25 @@ spi-max-frequency = <25000000>; partitions { - compatible = "fixed-partitions"; + compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "routerboot"; - reg = <0x0000000 0x000c000>; + reg = <0x0 0x0>; read-only; }; - hard_config: partition@c000 { - label = "hard_config"; - reg = <0x000c000 0x0001000>; + hard_config: hard_config { read-only; }; - partition@d000 { - label = "bios"; - reg = <0x000d000 0x0001000>; + bios { read-only; }; - partition@e000 { - label = "soft_config"; - reg = <0x000e000 0x0001000>; - read-only; + soft_config { }; }; }; From patchwork Mon Apr 20 13:13:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273362 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=UvI8dWpT; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=AoKaBKTk; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495RyX1tqVz9sSv for ; Mon, 20 Apr 2020 23:15:32 +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=gBOo092ih4bes1T9+3sJmGt3I7QgfWNtOlb1prz0C9A=; b=UvI8dWpTnAoooA rTz8ajv4eylgj7wYI8GEh8HrDTVqK4DWXclFFdWpXFfIwcvgqMVUFCEr/5EvvMzSBsHRbKwtsBKAG l2//MA/M2qEn+Xdxj8Ts/d6C4mMdiOzUaSfl6QOecrg3Zc6iXO99UQmUZv0Y2vogm0HBIcpulFbcK e/w3G3sXR4kndEsenvmVMsrB3sWAsre1g3l0yD4Nz1f1vk1TjtSr4M5dYJAAwSqTp8y0/RMr830zJ R6hXn522JF3E8L+JGfo8eXx6oXmHiKC+dWvFaM1wUmlUtI9uIhi0XRw19RijJSvCFQy4xTecfXU/B 1Bz5Kjgm2bxvxz/3mI8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWGm-0000i2-4t; Mon, 20 Apr 2020 13:15:28 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFW-0005IO-OP for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:12 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id 7FAA660335; Mon, 20 Apr 2020 15:14:06 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org 7FAA660335 Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 7FAA660335 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388447; bh=iJHpuwqU4B9MYVv9cYeJOkaF/XkmBZplYD39MczBX6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AoKaBKTkWHQg0wjiSGMZC675A59hX8frLptaafRnFqKXBPG39mI4vH8j7Cw59OyNE LQQ5jIQWm01gD/y7bZm9+dCWL6Jd45YFYZsagMy2BZwspTENX9v5VSVUbgADevRsTJ AQrSQad6IMi2AP8+cviJAdVYJ/H41lme3mDhCEhE= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:14:06 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:35 +0200 Message-Id: <20200420131336.18252-6-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061410_980206_7760EFEA X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 5/6] ramips/mt7621: enable CONFIG_MTD_ROUTERBOOT_PARTS X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Thibaut VARÈNE --- target/linux/ramips/mt7621/config-4.14 | 1 + target/linux/ramips/mt7621/config-5.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ramips/mt7621/config-4.14 b/target/linux/ramips/mt7621/config-4.14 index 2ae6afb97f..d8c8c95d30 100644 --- a/target/linux/ramips/mt7621/config-4.14 +++ b/target/linux/ramips/mt7621/config-4.14 @@ -188,6 +188,7 @@ CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_ROUTERBOOT_PARTS=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_MINOR_FW=y CONFIG_MTD_SPLIT_SEAMA_FW=y diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4 index e91003d8d2..65b10b80e4 100644 --- a/target/linux/ramips/mt7621/config-5.4 +++ b/target/linux/ramips/mt7621/config-5.4 @@ -205,6 +205,7 @@ CONFIG_MTD_NAND_ECC_SW_HAMMING=y CONFIG_MTD_NAND_MT7621=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_ROUTERBOOT_PARTS=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_MINOR_FW=y CONFIG_MTD_SPLIT_SEAMA_FW=y From patchwork Mon Apr 20 13:13:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1273365 X-Patchwork-Delegate: koen.vandeputte@ncentric.com 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=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=quarantine 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=KEG+XL9c; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=ZYhg448t; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 495Ryp1YLjz9sT0 for ; Mon, 20 Apr 2020 23:15:46 +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=amyJ2T/lRO6F3n0nwk3jiX+VdU8Yff85HS7itXABcDw=; b=KEG+XL9cneoALe gokBo6CSP2WyzeYkwjdr2zd0ju9Ce2VFX0pbr44SSPszBq1noVyETX3mvACaa6zAX92oS+BS2/LSy B9dN8kpz/US4Y3ScdIjyJck2rC6RgrXZwmCWIxoOuNzf3ZB9Lt514GDCUqYrBa1aRTfHSqFsf8RYP hbYS33E+OKtLFzaZLI58Q0Xh5Y3AhQ8e2Z2KFOzl5HchXJ0yQTY6wdeotWvge+eX+c6Jnqv3qrPwW 9CF7UJKXO/8FATNtCRZXisDNakJdQ7WxPi7bZhAwjL6aXboCpIMPYwLXTnA2z7sIOmJFmfg2UMWEl qk9EOLXpldE8a1mS4kDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWGz-00010W-14; Mon, 20 Apr 2020 13:15:41 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQWFa-0005N8-8C for openwrt-devel@lists.openwrt.org; Mon, 20 Apr 2020 13:14:15 +0000 Received: from supercopter (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPS id E9D1D6004B; Mon, 20 Apr 2020 15:14:09 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 vps.slashdirt.org E9D1D6004B Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org E9D1D6004B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1587388451; bh=q8frmzr3wFolvnA1T75GvPi4hVOjPJePv2+wlEhj64c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZYhg448tpIo73MEZFPNx48DtX7MtCuB3J3DeMq5/nVT0lwf0bBKQPxaLcYckja6J6 4rQyCgyVf1/FzUee4GuIZ319IecQG4lnUl4wI2yDpkADEfqiCuNCHQc9OupbqiKSis ScLFFmiLgRr1vjLLaGlg4zpD6a3cPdX91l0uDWXc= Received: by supercopter (sSMTP sendmail emulation); Mon, 20 Apr 2020 15:14:09 +0200 From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Mon, 20 Apr 2020 15:13:36 +0200 Message-Id: <20200420131336.18252-7-hacks@slashdirt.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200420131336.18252-1-hacks@slashdirt.org> References: <20200420131336.18252-1-hacks@slashdirt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on vps.slashdirt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_061414_498348_7309634B X-CRM114-Status: GOOD ( 10.74 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.2 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 Subject: [OpenWrt-Devel] [PATCH v2 6/6] ramips: mikrotik: use routerbootpart partitions X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , koen.vandeputte@ncentric.com Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Enable routerbootpart partitions on MikroTik devices. Tested-by: Tobias Schramm Signed-off-by: Thibaut VARÈNE --- .../linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts | 12 ++++-------- target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts | 12 ++++-------- target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts | 12 ++++-------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts index 3f37155f24..d7f97ef1d6 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts @@ -86,19 +86,17 @@ label = "RouterBoot"; reg = <0x0 0x40000>; read-only; - compatible = "fixed-partitions"; + compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader1"; - reg = <0x0 0xf000>; + reg = <0x0 0x0>; read-only; }; - hard_config: partition@f000 { - label = "hard_config"; - reg = <0xf000 0x1000>; + hard_config: hard_config { read-only; }; @@ -108,9 +106,7 @@ read-only; }; - partition@20000 { - label = "soft_config"; - reg = <0x20000 0x1000>; + soft_config { }; partition@30000 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts index bd58aea951..128b8a2816 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts @@ -95,19 +95,17 @@ label = "RouterBoot"; reg = <0x0 0x40000>; read-only; - compatible = "fixed-partitions"; + compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader1"; - reg = <0x0 0xf000>; + reg = <0x0 0x0>; read-only; }; - hard_config: partition@f000 { - label = "hard_config"; - reg = <0xf000 0x1000>; + hard_config: hard_config { read-only; }; @@ -117,9 +115,7 @@ read-only; }; - partition@20000 { - label = "soft_config"; - reg = <0x20000 0x1000>; + soft_config { }; partition@30000 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts index 19e1a71e99..aff2d0e64f 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts @@ -104,19 +104,17 @@ label = "RouterBoot"; reg = <0x0 0x40000>; read-only; - compatible = "fixed-partitions"; + compatible = "mikrotik,routerboot-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader1"; - reg = <0x0 0xf000>; + reg = <0x0 0x0>; read-only; }; - hard_config: partition@f000 { - label = "hard_config"; - reg = <0xf000 0x1000>; + hard_config: hard_config { read-only; }; @@ -126,9 +124,7 @@ read-only; }; - partition@20000 { - label = "soft_config"; - reg = <0x20000 0x1000>; + soft_config { }; partition@30000 {