arm64: dts: use size of reserved partition for bl2
Subsystems (2)
RFC 1/1 arm64: dts: use size of reserved partition for bl2
From: Frank Wunderlich <[email protected]>
To store uncompressed bl2 more space is required than partition is actually defined.
---
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:
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(-)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso +1 -6
@@ -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>;
Signature · 1 line
2.34.1
AngeloGioacchino Del Regno
maintainerIl 03/04/23 12:58, Frank Wunderlich ha scritto:
Quoted 6 lines
From: Frank Wunderlich <[email protected]>
To store uncompressed bl2 more space is required than partition is actually defined.
Signed-off-by Frank Wunderlich <[email protected]>
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?
Quoted 10 lines
---
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:
so imho it should be same in mainline to not require complex bl2 compression.
Regards,
Angelo
Quoted 5 lines
Gesendet: Montag, 03. April 2023 um 14:43 Uhr
Von: "AngeloGioacchino Del Regno" <[email protected]> Il 03/04/23 12:58, Frank Wunderlich ha scritto:Quoted 2 lines
From: Frank Wunderlich <[email protected]>
Quoted 7 lines
Quoted 4 lines
To store uncompressed bl2 more space is required than partition is actually defined.
Signed-off-by Frank Wunderlich <[email protected]>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
Quoted 15 lines
Quoted 10 lines
---
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:
so imho it should be same in mainline to not require complex bl2 compression.
Regards,
Angelo
AngeloGioacchino Del Regno
maintainerIl 03/04/23 15:56, Frank Wunderlich ha scritto:
Quoted 17 lines
Quoted 5 lines
Gesendet: Montag, 03. April 2023 um 14:43 Uhr
Von: "AngeloGioacchino Del Regno" <[email protected]> Il 03/04/23 12:58, Frank Wunderlich ha scritto:Quoted 2 lines
From: Frank Wunderlich <[email protected]>
Quoted 7 lines
Quoted 4 lines
To store uncompressed bl2 more space is required than partition is actually defined.
Signed-off-by Frank Wunderlich <[email protected]>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.dtsthis file in upstream uboot has no partitions defined
Quoted 8 lines
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
Quoted 30 lines
Gesendet: Montag, 03. April 2023 um 16:04 Uhr
Von: "AngeloGioacchino Del Regno" <[email protected]>
An: "Frank Wunderlich" <[email protected]>
Cc: "Frank Wunderlich" <[email protected]>, [email protected], "Rob Herring" <[email protected]>, "Krzysztof Kozlowski" <[email protected]>, "Matthias Brugger" <[email protected]>, [email protected], [email protected], [email protected]
Betreff: Re: Aw: Re: [RFC] arm64: dts: use size of reserved partition for bl2Il 03/04/23 15:56, Frank Wunderlich ha scritto:
Quoted 23 lines
Quoted 5 lines
Gesendet: Montag, 03. April 2023 um 14:43 Uhr
Von: "AngeloGioacchino Del Regno" <[email protected]> Il 03/04/23 12:58, Frank Wunderlich ha scritto:Quoted 2 lines
From: Frank Wunderlich <[email protected]>
Quoted 7 lines
Quoted 4 lines
To store uncompressed bl2 more space is required than partition is actually defined.
Signed-off-by Frank Wunderlich <[email protected]>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.dtsthis 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
Quoted 7 lines
Quoted 2 lines
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.
Quoted 4 lines
...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.
Quoted 1 line
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.
Quoted 1 line
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