Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2651950imj; Mon, 11 Feb 2019 06:30:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ2Cj+jEXFgUuQSXs/CpU+r2Rk/o2I4j/jlDZNQI9S1BIljJqPmYp9g8UqPaDYq+WoH3yxL X-Received: by 2002:a17:902:834b:: with SMTP id z11mr38828534pln.151.1549895410660; Mon, 11 Feb 2019 06:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895410; cv=none; d=google.com; s=arc-20160816; b=neeilUl5jNEVzLmWHOY0X925ITlIuWMYt2dzooRXjb213M66rAGHibmb8utoL14boO ijnhDjv/4Lgv9wlmZy+zexOQQV6W/sLNQnsnVGiafmbhnzEJQAzrgJ7V1P8cAx1WRDLs zQ2L1ZUB8adfJ2hFLo/1NumjCvSxWW1H83ozKy6CVV2MVcu63fj50igJn16O4StHnxNV hQ6DSTxB44I+aRMJFSPMQFziB9CW4WuI5Gy9WYszx+9jmJfV+JaMnIttoJWG4xNX8qw1 jiCSix8Mtv5PlSGBpn42uVryAL4L0iz5BEMF5lnJWOIqS5gaQ5hujl4GNtznKp0sX+He roEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D7ozwlRKYDWfhqDXeyu4SEbY0xvIsXaiAdOfHtq0JTE=; b=y8kzvJ/dxTKu1utDs6CfGbdlyUWKneF8dj/DpA9zFxOJPnxXKkE/6wWrMz/cMQhvts Mgmkm8Ikjy78OSZxxLAqOyAByiac322Kj+SJyxYX2PJ8Gksw9APKUfBkM/n/qd69z7qk CuToATsZMWf0o8joGH5qr/KnHf1u1YnF8KIS8CbrH1mW6P05VuRvQsnf96LzNuShxSVi e3Sc8pyNeM+S0YjoYnt6BVHegpFPraFhOJmGKCsAoE3lQ2jR4ajlc2LLmWj82hA4FeXn LRvYgN/ONHzKLS6YW7heE1kbcOmT2jyKld+WFmzqgOOOhdGjlw+7foYmqAeS+kob1gtZ SnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MizXMKvJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si1545935plp.257.2019.02.11.06.29.54; Mon, 11 Feb 2019 06:30:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MizXMKvJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729687AbfBKO1P (ORCPT + 99 others); Mon, 11 Feb 2019 09:27:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:32958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729679AbfBKO1N (ORCPT ); Mon, 11 Feb 2019 09:27:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E4482075C; Mon, 11 Feb 2019 14:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895232; bh=cTtMXJXNrnhPjGw89PpXkrSod06WF4AgN8ME0tltaZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MizXMKvJLTlBgd2QE8tn9EknBI2+SBL0E9nvcUJVYQlHdal39pseHo5PLXHq/VnOU sVHcxLKCRysLgO+JwRIOqZRqnP8WB1I0WvhA517JKngwWjJlE+3+hpNw5nW90fPgD7 lcJrq5OOBUXCC+Fz0i04ov1sognJdQYA4mUBjz28= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Sasha Levin Subject: [PATCH 4.20 137/352] ARM: dts: Fix up the D-Link DIR-685 MTD partition info Date: Mon, 11 Feb 2019 15:16:04 +0100 Message-Id: <20190211141855.233524233@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 738a05e673435afb986b53da43befd83ad87ec3b ] The vendor firmware was analyzed to get the right idea about this flash layout. /proc/mtd contains: dev: size erasesize name mtd0: 01e7ff40 00020000 "rootfs" mtd1: 01f40000 00020000 "upgrade" mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd4: 00040000 00020000 "RedBoot" mtd5: 00020000 00020000 "LangPack" mtd6: 02000000 00020000 "flash" Here "flash" is obviously the whole device and we know "rootfs" is a bogus hack to point to a squashfs rootfs inside of the main "upgrade partition". We know "RedBoot" is the first 0x40000 of the flash and the "upgrade" partition follows from 0x40000 to 0x1f8000. So we have mtd0, 1, 4 and 6 covered. Remains: mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd5: 00020000 00020000 "LangPack" Inspecting the flash at 0x1f8000 and 0x1fa000 reveals each of these starting with "RGCFG1" so we assume 0x1f8000-1fbfff is "rgdb" of 0x40000. Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts index 6f258b50eb44..502a361d1fe9 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -274,20 +274,16 @@ read-only; }; /* - * Between the boot loader and the rootfs is the kernel - * in a custom Storlink format flashed from the boot - * menu. The rootfs is in squashfs format. + * This firmware image contains the kernel catenated + * with the squashfs root filesystem. For some reason + * this is called "upgrade" on the vendor system. */ - partition@1800c0 { - label = "rootfs"; - reg = <0x001800c0 0x01dbff40>; - read-only; - }; - partition@1f40000 { + partition@40000 { label = "upgrade"; - reg = <0x01f40000 0x00040000>; + reg = <0x00040000 0x01f40000>; read-only; }; + /* RGDB, Residental Gateway Database? */ partition@1f80000 { label = "rgdb"; reg = <0x01f80000 0x00040000>; -- 2.19.1