Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2683210imj; Mon, 11 Feb 2019 07:00:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IYn6GCmCP1/JSM81J5b8lcz4pqbB9I/Spy+gmvm1KF9eZhRE8gJgamuRLZaU36SQ9/hzIZ4 X-Received: by 2002:a63:8bc8:: with SMTP id j191mr1288800pge.234.1549897208345; Mon, 11 Feb 2019 07:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897208; cv=none; d=google.com; s=arc-20160816; b=hH3XU9Ao3/xeo4kVxXQhnKRQ3BEFHBQqorhcsotQ9BYAfw6MWnppO2z8P0elEyaZWk sjuQdesxQ2G+8gaoWbZLNnuwoOxJlH7JJKwDhLd4IN+5fMk2TQCSSsO4uVFDYJOtheai XHvIISjOJGbqMUTUXdNHnPSiDF3Iy445W4BBhQuFTpZwAlPEQx6elo1FUqK9iZOddVfI 5dvCURbwBusXwP8bul8/zB1jfBskC4AWaQpST9DThwPjRtU7bs9b6hH5z6h6tS7XzFDm iFdUsdUPRI7ehJ8uacMJn4axK8/ya2gQI3pDtPJe4ankTPCW/i1Z+nuybunudTbdlmx5 f6YA== 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=Teiy/WAcvncw/Ydn8K13rYPinfx5LwKxC680nljyBTE=; b=hBv1vrNrIyxm1Ohl/Zod8xHpvMA/y6M4AblBwoxy1mCbyVrP/U5193NwSWamkjL484 v4WhkXNoSeNAbwA32qZ1GNpX6zu5rShWyQoVg+77nC2sD1Do0LNcnxJEa4x10eSLbJBL A6UqNHi84JnvyVYAmTCkMOYnpUwJeLxgTAST47/VNR7LgABc0ZKZird0xUhQWBqLTSx5 7gATu7/yGccEktOoW1ewLjPlNEAEs92qj2WlbgoNdmMqr8t7+GUxIyJseDlEELkJ+kmx PRsx5ZAHR4+gPjiaOptFb57HdONlFc8WsuY1s7475k74qMs+1lry7LRecCovZgF2wnaR W4kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ou8cdjhG; 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 y11si7357975pfm.16.2019.02.11.06.59.52; Mon, 11 Feb 2019 07:00:08 -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=Ou8cdjhG; 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 S2389400AbfBKO5k (ORCPT + 99 others); Mon, 11 Feb 2019 09:57:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:45086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389388AbfBKO5h (ORCPT ); Mon, 11 Feb 2019 09:57:37 -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 255C620700; Mon, 11 Feb 2019 14:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897056; bh=FG3095bnqdiVETj46N+LBKOQTzFZXUU6FtaQrbcj46o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ou8cdjhGjYPQorgueT8bL3H5DPVhKRbZ/E2Fl0gTJxTwUC+eXPWHmcX1+psi1+xG0 qAJCrTkNBpDrdyfQc3thKTR35FLWBqEC2zzwgZKihHoxVLyOxf7u5jETeaNYMCfOX/ veXEh5p2yebu/sSpXhOm6oUI4jvXV8u9sM/X5iRE= 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.14 076/205] ARM: dts: Fix up the D-Link DIR-685 MTD partition info Date: Mon, 11 Feb 2019 15:17:54 +0100 Message-Id: <20190211141833.683512387@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@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.14-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 e75e2d44371c..d6f752ab07bb 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -128,20 +128,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