Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3394100pxb; Mon, 9 Nov 2020 10:00:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC4wMfyfzVgGgVcXcb74oDG2WaxdIhpho4a+DpMxWR9urTZXfNtxBxJajqwUI+c//b9LR4 X-Received: by 2002:a17:906:3a55:: with SMTP id a21mr15924247ejf.357.1604944824297; Mon, 09 Nov 2020 10:00:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604944824; cv=none; d=google.com; s=arc-20160816; b=qU38AtLdNq2/fySB/daPrjEEXAyPcNHMupS9mUhfh0JsoZno/+DQHGZtOaaKQpXISj GDTXWui6KqTStjSRYTIwAy1lH7hHPkSAdOfsgVx7yxCjSVgvfVpCFOb9n7+Tv63+yJKN Ag6SoMRdk7SC7uQ2DHWlw3o+opUq2Sglw4ITBkZCzrwNb3MTjUtXe0Xxj0l7yCuwoxMG op+Sh36zIkEgo5QC8HVRghZ/A/BFf/EbyhcVzLtvO+bQtpOncyiCj2qtGFR5ggoDLBuO CFartBZB6jfWxK0599oT/zfEeeFk5QJmAt71kEs1FK+SfvEwYr/XZ9FD/z8uv3Fa1CT2 lPCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3UZgyu+3oKM3r5zc4rdsvwvYvFM1/i4w1UNXGNg+hlc=; b=q3M9xG8ieGNz2vE+XEdzutaBCQMbiXHwHKZPd5LF9l0GYrljVgEEgyLrXrR+SROKmS B1Ernpn5DE6TSe4qbC0mv135iook58rtVYn1cIYirNAuD9BOBed9j342G6sQ2OwVjigZ WupVExehkS/0+jd8AnPGWIP8j6PBiUjFdswzPrJ+rU+XEmD5gqGjutteWMUu3A68d8fJ 79ulbopRrll1MxjDHEs11uX8jKp+uIx9QCDAnc7D5xeUQZ2FZpu2a1PUyr0kT43MyZqm U5ITDkZ1/FihFZoEasJhemTLxFmOzn2w4aGdZSIGy/Ms53bbD09Hw1Scvoa1zHD3Fzvr Qg8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QJD9LBVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 92si7875641edg.183.2020.11.09.09.59.59; Mon, 09 Nov 2020 10:00:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QJD9LBVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729869AbgKIR6h (ORCPT + 99 others); Mon, 9 Nov 2020 12:58:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729599AbgKIR6g (ORCPT ); Mon, 9 Nov 2020 12:58:36 -0500 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B25F7C0613CF; Mon, 9 Nov 2020 09:58:36 -0800 (PST) Received: by mail-qv1-xf43.google.com with SMTP id z17so797769qvy.11; Mon, 09 Nov 2020 09:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=3UZgyu+3oKM3r5zc4rdsvwvYvFM1/i4w1UNXGNg+hlc=; b=QJD9LBVQvDa5P61QK2aUMymniL/35kv+JobCg8H4Wbb95vsiIl5UbqGAH5esDuBIms BCkHtYjO2SABMVjq7qqFBfdQW/bGmOf/amhLre1XfbTERkJGtTUhXaPfLWjaXlff76XA Y7weJJGrHWLIYXgAc/hl2Ep8G4S7lL+OhDyusg4ptVUZkO5iSv3Iwdps2edfy1b8QqRM HmFchdn5UQaDjRNhtW3ixoQgk4kMST6N8dXZ+hyMN/cFlKkhXiCm71oG0JnHm/XoBsMY XH1wT1AuiPGlJAUvCnTZtofzOUYH1bPpzDteqQF1PI8b9YxrLThp4N1QHmKX34ukIKvi R2gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=3UZgyu+3oKM3r5zc4rdsvwvYvFM1/i4w1UNXGNg+hlc=; b=Zidl79heivTeYaisyrXH5YR84W0R3vmehwDvk6RXwRuD3K4SlmhvmJRdgTRN7MHXyw Mh673c5YiBTn4+HebTMWpwdzEpf/zBB6xZEBGQmtykKQlqcURUb5IAs7zrtl3H1sBMuw VMfII+ioKvTRA8kF2qY+R+mA8MYRxfBrk1VCWmgBssOAAwKUYn6+Qb92VCMmsiwz4ptW CxHsZTLmaJsoATyP23O1U9SH827fcDzqByi7IZLWMT6sFRA7o99rlKkUs05nYFVZAU9H wjK/LSexykzNQfuuJTbYyX8mQ8fM61RkGNfU3+4HW5WFlgLn/2OMmtoC8OYpWPPeVqgt 4xEA== X-Gm-Message-State: AOAM5325pSZgEdbSfOLXKIcss8XRVt/bQS/tKHpQcfF+tRSd5j07s88O UMz2ibtj4rnFQGHhwKTzpWc= X-Received: by 2002:a0c:9021:: with SMTP id o30mr15759829qvo.1.1604944715946; Mon, 09 Nov 2020 09:58:35 -0800 (PST) Received: from ubuntu (ool-45785633.dyn.optonline.net. [69.120.86.51]) by smtp.gmail.com with ESMTPSA id d188sm6630280qkb.10.2020.11.09.09.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 09:58:35 -0800 (PST) Date: Mon, 9 Nov 2020 12:58:31 -0500 From: Vivek Unune To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: florian.fainelli@broadcom.com, Hauke Mehrtens , bcm-kernel-feedback-list@broadcom.com, Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: dts: BCM5301X: Linksys EA9500 add fixed partitions Message-ID: <20201109175831.GA790352@ubuntu> References: <20201101200804.2460-1-npcomplete13@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 09, 2020 at 06:28:38PM +0100, Rafał Miłecki wrote: > On 01.11.2020 21:08, Vivek Unune wrote: > > This router has dual paritions to store trx firmware image and > > dual partitions for nvram. The second one in each of these cases acts > > as a backup store. > > I'm quite sure CFE is supposed to flash new firmware to the backup > partition and then mark it as main one. The old firmware partition becomes a > new backup then. > > That means you need to check which partition bootloader used to handle > partitioning properly. > > > > + partition@200000 { > > + label = "firmware"; > > + reg = <0x0200000 0x01D00000>; > > + compatible = "brcm,trx"; > > + }; > > + > > + partition@1F00000 { > > + label = "failsafe"; > > + reg = <0x01F00000 0x01D00000>; > > + read-only; > > + }; > > Here you assume CFE always boots from the first firmware partition. > > Unless EA9500 CFE does sth stupid it seems like a 50% - 50% guess. Hi Rafał, Indeed, my assumption is to only boot using first partition. If we ever want to support true dual partitions in future, we need to: 1. Read the boot flag 'bootpartition' and skip the backup partition parsing 2. Updagrading firmware will write to backup partition and flip the bootpartition Thanks, Vivek