Message ID | 20230403105818.29624-1-linux@fw-web.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2223779vqo; Mon, 3 Apr 2023 04:22:22 -0700 (PDT) X-Google-Smtp-Source: AKy350ZTnfClBU3YKAlRs1K42cNiDALvyDcvur/EZ+1jD0STpuirh6DhMTWN9QNjnNM75zYZXxGp X-Received: by 2002:a17:90a:10d7:b0:234:f77:d6d2 with SMTP id b23-20020a17090a10d700b002340f77d6d2mr40031055pje.45.1680520942006; Mon, 03 Apr 2023 04:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680520941; cv=none; d=google.com; s=arc-20160816; b=0oGMynYDSWLzBdRqSFXNZgJZSH8oAzA5UUAmmaXVLsmPCOQ3DZ23bFHTKSS5vneQPE nVkqdmhPoftUlFZoYRh70sB1fy4XHY73pgKhS+lWrxYtg2lCs4s/GCdf8+wElrBjuUaq hljytHrEGr1CIJwiRWfW2c25MNyNxa3h1lkHjv9Hlpoh2RxVJ7ISqq0YeVl7vfQCvm9H JjzqVwb0ytVNuR/zZwIu7j4fCSXlBRmyf1d2gxsNOIHqGyyCZ9mhhsgendcqKi2b7p2x bJdZlUNRRBRgp1lpqN701LY3s433N8amN90vcHivgQgFHfMBWWru9Lb81DOpWf35Eej6 465A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=BZ9tPE6ls/muuZObj8Q8K01GmUnkjtbnL+JF6Rq/x1c=; b=GK+rMuCc/Wix8CYR4WZp4LJ2Gluu1lwd5Y2n5EHssmAaAZJsgLOsA710BkoSxRr5Qg bNoN4fVoXgIAK64RLWW9mheWP6PCZyhmdzmqutPVOrcbtTy3G1PFy+aaVkph3sNeOPnS BDqHt/3S9aybKqZChiyVeVO15BxUarQBhhaceSI3K63E/sfmMSX/jjkC5FjKFmaLOox9 hYYD3jWg9yW4gDVTiSsZGF3SFjLS3dJPqEouMDnBi0sBeX97euUpwqmJl40gC9hnNBBI M0jDvXIyQ9GMsE3mK/Hyx7L8oTBegBPsgw+Cja0imDbHLrbR9yL9gV5C+pCXp+LsZqZb QFkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a17090a488f00b0023cfd288a09si7440668pjh.157.2023.04.03.04.22.10; Mon, 03 Apr 2023 04:22:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232013AbjDCLGp (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Mon, 3 Apr 2023 07:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbjDCLGk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Apr 2023 07:06:40 -0400 X-Greylist: delayed 490 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 03 Apr 2023 04:06:38 PDT Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C984C17; Mon, 3 Apr 2023 04:06:38 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout2.routing.net (Postfix) with ESMTP id 8AB655FB9D; Mon, 3 Apr 2023 10:58:26 +0000 (UTC) Received: from frank-G5.. (fttx-pool-217.61.152.94.bambit.de [217.61.152.94]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id C0B2E3608ED; Mon, 3 Apr 2023 10:58:25 +0000 (UTC) From: Frank Wunderlich <linux@fw-web.de> To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich <frank-w@public-files.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC] arm64: dts: use size of reserved partition for bl2 Date: Mon, 3 Apr 2023 12:58:18 +0200 Message-Id: <20230403105818.29624-1-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: ff39b839-2afa-4e8f-82c9-0ea90158acdd X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762153926947406376?= X-GMAIL-MSGID: =?utf-8?q?1762153926947406376?= |
Series |
[RFC] arm64: dts: use size of reserved partition for bl2
|
|
Commit Message
Frank Wunderlich
April 3, 2023, 10:58 a.m. UTC
From: Frank Wunderlich <frank-w@public-files.de> To store uncompressed bl2 more space is required than partition is actually defined. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> --- I used the definition i got from mtk used in their SDK uboot. Openwrt uses also the first reserved partition to give bl2 more space: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-nor.dts;h=f597b869abc80d1a73f44ebb85ad4da17376bb52;hb=HEAD#l22 so imho it should be same in mainline to not require complex bl2 compression. --- .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Comments
Il 03/04/23 12:58, Frank Wunderlich ha scritto: > From: Frank Wunderlich <frank-w@public-files.de> > > To store uncompressed bl2 more space is required than partition is > actually defined. > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> If this doesn't get changed anymore, I'm fine with it... but a question arises: did you send patches to add your BPI-r3 board(s) to upstream u-boot? > --- > I used the definition i got from mtk used in their SDK uboot. > > Openwrt uses also the first reserved partition to give bl2 more > space: > > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-nor.dts;h=f597b869abc80d1a73f44ebb85ad4da17376bb52;hb=HEAD#l22 > > so imho it should be same in mainline to not require complex bl2 > compression. Regards, Angelo
> Gesendet: Montag, 03. April 2023 um 14:43 Uhr > Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com> > Il 03/04/23 12:58, Frank Wunderlich ha scritto: > > From: Frank Wunderlich <frank-w@public-files.de> > > > > To store uncompressed bl2 more space is required than partition is > > actually defined. > > > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > > If this doesn't get changed anymore, I'm fine with it... but a question arises: > did you send patches to add your BPI-r3 board(s) to upstream u-boot? currently i use the rfb dts for r3 in uboot: arch/arm/dts/mt7986a-sd-rfb.dts this file in upstream uboot has no partitions defined https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/mt7986a-sd-rfb.dts#L144 but i added them there too and i wrote content by offsets to main device (not to partitions). https://github.com/frank-w/u-boot/blob/2023-04-bpi/arch/arm/dts/mt7986a-sd-rfb.dts#L154 so yes basicly it needs to be send there too, maybe as additional dts. regards Frank > > --- > > I used the definition i got from mtk used in their SDK uboot. > > > > Openwrt uses also the first reserved partition to give bl2 more > > space: > > > > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-nor.dts;h=f597b869abc80d1a73f44ebb85ad4da17376bb52;hb=HEAD#l22 > > > > so imho it should be same in mainline to not require complex bl2 > > compression. > > Regards, > Angelo > >
Il 03/04/23 15:56, Frank Wunderlich ha scritto: >> Gesendet: Montag, 03. April 2023 um 14:43 Uhr >> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com> >> Il 03/04/23 12:58, Frank Wunderlich ha scritto: >>> From: Frank Wunderlich <frank-w@public-files.de> >>> >>> To store uncompressed bl2 more space is required than partition is >>> actually defined. >>> >>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> >> >> If this doesn't get changed anymore, I'm fine with it... but a question arises: >> did you send patches to add your BPI-r3 board(s) to upstream u-boot? > > currently i use the rfb dts for r3 in uboot: arch/arm/dts/mt7986a-sd-rfb.dts > > this file in upstream uboot has no partitions defined > > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/mt7986a-sd-rfb.dts#L144 > > but i added them there too and i wrote content by offsets to main device (not to partitions). > > https://github.com/frank-w/u-boot/blob/2023-04-bpi/arch/arm/dts/mt7986a-sd-rfb.dts#L154 > > so yes basicly it needs to be send there too, maybe as additional dts. > I strongly encourage you to send this change to u-boot as well as changing the kernel devicetree... and when you do, you can add a reference to the list and/or commit @ u-boot on the commit that you'll send here for the kernel... but there's another question... ...what happens if you run the kernel on a device with an older partition layout? Does anything break? I don't think that anything does, since this is read-only anyway, but just to be sure... :-) Besides, you have to fix the commit description, but you knew that already. P.S.: When you post a RFC, giving it the right commit title helps sometimes! :-P Regards, Angelo
> Gesendet: Montag, 03. April 2023 um 16:04 Uhr > Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com> > An: "Frank Wunderlich" <frank-w@public-files.de> > Cc: "Frank Wunderlich" <linux@fw-web.de>, linux-mediatek@lists.infradead.org, "Rob Herring" <robh+dt@kernel.org>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, "Matthias Brugger" <matthias.bgg@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org > Betreff: Re: Aw: Re: [RFC] arm64: dts: use size of reserved partition for bl2 > > Il 03/04/23 15:56, Frank Wunderlich ha scritto: > >> Gesendet: Montag, 03. April 2023 um 14:43 Uhr > >> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com> > >> Il 03/04/23 12:58, Frank Wunderlich ha scritto: > >>> From: Frank Wunderlich <frank-w@public-files.de> > >>> > >>> To store uncompressed bl2 more space is required than partition is > >>> actually defined. > >>> > >>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > >> > >> If this doesn't get changed anymore, I'm fine with it... but a question arises: > >> did you send patches to add your BPI-r3 board(s) to upstream u-boot? > > > > currently i use the rfb dts for r3 in uboot: arch/arm/dts/mt7986a-sd-rfb.dts > > > > this file in upstream uboot has no partitions defined > > > > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/mt7986a-sd-rfb.dts#L144 > > > > but i added them there too and i wrote content by offsets to main device (not to partitions). > > > > https://github.com/frank-w/u-boot/blob/2023-04-bpi/arch/arm/dts/mt7986a-sd-rfb.dts#L154 > > > > so yes basicly it needs to be send there too, maybe as additional dts. > > > > I strongly encourage you to send this change to u-boot as well as changing the > kernel devicetree... and when you do, you can add a reference to the list and/or > commit @ u-boot on the commit that you'll send here for the kernel... but there's > another question... imho uboot needs an own dts for the board (copy from rfb) for this because of another change (tick_dly) and i have no rfb for testing. > ...what happens if you run the kernel on a device with an older partition layout? > Does anything break? > I don't think that anything does, since this is read-only anyway, but just to be > sure... :-) i have no information about the second partition from the old layout...it was only named reserved. as openwrt also uses 0x40000 it should be save to use this value here. if the bl2 does not fit into the bl2-partition (cut off), board simply does not boot, thats why i want to increase it now. my current bl2 is 197K for nor and i had this problem. > Besides, you have to fix the commit description, but you knew that already. sorry missed the mt7986: part in title, or did you mean another part? i put the additional information below --- to not be visible when patch will be applied. > P.S.: When you post a RFC, giving it the right commit title helps sometimes! :-P yes, missed the mt7986-part here, just wanted to hear comments first if thisis the right way
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso index 84aa229e80f3..e48881be4ed6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso @@ -27,15 +27,10 @@ partitions { partition@0 { label = "bl2"; - reg = <0x0 0x20000>; + reg = <0x0 0x40000>; read-only; }; - partition@20000 { - label = "reserved"; - reg = <0x20000 0x20000>; - }; - partition@40000 { label = "u-boot-env"; reg = <0x40000 0x40000>;