Skip to contentSkip to conversation

dts: aspeed: merge initrd into kernel in flash layout

PATCH In review Rick Altherr 6 participants 8 messages Jan 31, 2017 – Feb 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dts: aspeed: merge initrd into kernel in flash layout

openbmc/openbmc commit 1ed6fe335cda50cf60b7afddbe530077a1b25d27 includes the initrd in the kernel image. Update the flash layout used by OpenBMC dts accordingly. This is required for OpenBMC's kernel update mechanism to work as the kernel image now exceeds the size of the original kernel partition.

---
 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -5
index 65095a40a203..4bcfd1bf8dc5 100644
@@ -12,13 +12,9 @@
 					label = "u-boot-env";
 				};
 				kernel@80000 {
-					reg = < 0x80000 0x280000 >;
+					reg = < 0x80000 0x440000 >;
 					label = "kernel";
 				};
-				initramfs@300000 {
-					reg = < 0x300000 0x1c0000 >;
-					label = "initramfs";
-				};
 				rofs@0c0000 {
 					reg = < 0x4c0000 0x1740000 >;
 					label = "rofs";
Signature · 1 line
2.11.0.483.g087da7b7c-goog
maintainer
#1 lore raw
Quoted 5 lines · Rick Altherr via openbmc

openbmc/openbmc commit 1ed6fe335cda50cf60b7afddbe530077a1b25d27 includes the initrd in the kernel image. Update the flash layout used by OpenBMC dts accordingly. This is required for OpenBMC's kernel update mechanism to work as the kernel image now exceeds the size of the original kernel partition.

Brad, Patrick: This change will mean new kernels can't boot on old flash layouts, and vice versa.

All users will need to do a full-flash update to move to this version, and a full flash update to downgrade.

Are we ok to proceed?

Cheers,

Joel

Quoted 32 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -6
index 65095a40a203..4bcfd1bf8dc5 100644
@@ -12,13 +12,9 @@
                                        label = "u-boot-env";
                                };
                                kernel@80000 {
-                                       reg = < 0x80000 0x280000 >;
+                                       reg = < 0x80000 0x440000 >;
                                        label = "kernel";
                                };
-                               initramfs@300000 {
-                                       reg = < 0x300000 0x1c0000 >;
-                                       label = "initramfs";
-                               };
                                rofs@0c0000 {
                                        reg = < 0x4c0000 0x1740000 >;
                                        label = "rofs";
--

2.11.0.483.g087da7b7c-goog

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

#2 lore raw
Quoted 8 lines · Joel Stanley
Quoted 5 lines · Rick Altherr via openbmc

openbmc/openbmc commit 1ed6fe335cda50cf60b7afddbe530077a1b25d27 includes the initrd in the kernel image. Update the flash layout used by OpenBMC dts accordingly. This is required for OpenBMC's kernel update mechanism to work as the kernel image now exceeds the size of the original kernel partition.

Quoted 7 lines

Brad, Patrick: This change will mean new kernels can't boot on old flash layouts, and vice versa.

All users will need to do a full-flash update to move to this version, and a full flash update to downgrade.

Are we ok to proceed?

Ack, we just went through this with the last update and all hit
https://github.com/openbmc/openbmc/issues/1030. It was pretty disruptive for all of us in the lab needing to pull the chips and manually flash each. This is would be fine if we can just flash the <system>.all.tar and all works ok, but that was not what we found in
https://github.com/openbmc/openbmc/issues/1030.

Quoted 40 lines

Cheers,

Joel

Quoted 28 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -6
index 65095a40a203..4bcfd1bf8dc5 100644
@@ -12,13 +12,9 @@
                                        label = "u-boot-env";
                                };
                                kernel@80000 {
-                                       reg = < 0x80000 0x280000 >;
+                                       reg = < 0x80000 0x440000 >;
                                        label = "kernel";
                                };
-                               initramfs@300000 {
-                                       reg = < 0x300000 0x1c0000 >;
-                                       label = "initramfs";
-                               };
                                rofs@0c0000 {
                                        reg = < 0x4c0000 0x1740000 >;
                                        label = "rofs";
--

2.11.0.483.g087da7b7c-goog

Quoted 4 lines

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

#3 lore raw

I’m not suggesting one way or the other as far as how to proceed but I don’t think pulling chips is ever necessary. You can always netboot and flash the entire image image that way.

Quoted 70 lines · Andrew Geissler
Quoted 8 lines · Joel Stanley
Quoted 5 lines · Rick Altherr via openbmc

openbmc/openbmc commit 1ed6fe335cda50cf60b7afddbe530077a1b25d27 includes the initrd in the kernel image. Update the flash layout used by OpenBMC dts accordingly. This is required for OpenBMC's kernel update mechanism to work as the kernel image now exceeds the size of the original kernel partition.

Quoted 7 lines

Brad, Patrick: This change will mean new kernels can't boot on old flash layouts, and vice versa.

All users will need to do a full-flash update to move to this version, and a full flash update to downgrade.

Are we ok to proceed?

Ack, we just went through this with the last update and all hit
https://github.com/openbmc/openbmc/issues/1030. It was pretty disruptive for all of us in the lab needing to pull the chips and manually flash each. This is would be fine if we can just flash the <system>.all.tar and all works ok, but that was not what we found in
https://github.com/openbmc/openbmc/issues/1030.

Quoted 32 lines

Cheers,

Joel

Quoted 28 lines

---
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi | 6 +-----

1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -6
index 65095a40a203..4bcfd1bf8dc5 100644
@@ -12,13 +12,9 @@
                                       label = "u-boot-env";
                               };
                               kernel@80000 {
-                                       reg = < 0x80000 0x280000 >;
+                                       reg = < 0x80000 0x440000 >;
                                       label = "kernel";
                               };
-                               initramfs@300000 {
-                                       reg = < 0x300000 0x1c0000 >;
-                                       label = "initramfs";
-                               };
                               rofs@0c0000 {
                                       reg = < 0x4c0000 0x1740000 >;
                                       label = "rofs";
--

2.11.0.483.g087da7b7c-goog

Quoted 8 lines
Quoted 4 lines

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc

#4 lore raw
Quoted 4 lines · Brad Bishop

I’m not suggesting one way or the other as far as how to proceed but I don’t think pulling chips is ever necessary. You can always netboot and flash the entire image image that way.

The hack we've been using for whole-image updates here on non-netboot BMCs is to use flashcp/dd of=mtdblock0/pflash to erase and program the BMC flash, then assert the hotswap reset GPIO.

It saves a bit of time rebooting and is reliable, but feels dirty every time.

xo

maintainer
#5 lore raw
Quoted 11 lines · Xo Wang via openbmc
Quoted 4 lines · Brad Bishop

I’m not suggesting one way or the other as far as how to proceed but I don’t think pulling chips is ever necessary. You can always netboot and flash the entire image image that way.

The hack we've been using for whole-image updates here on non-netboot BMCs is to use flashcp/dd of=mtdblock0/pflash to erase and program the BMC flash, then assert the hotswap reset GPIO.

It saves a bit of time rebooting and is reliable, but feels dirty every time.

I was waiting for some more acks but it's been a week now so time is up.

I will merge this change today.

Cheers,

Joel

#6 lore raw
Quoted 7 lines · Joel Stanley

I was waiting for some more acks but it's been a week now so time is up.

I will merge this change today.

Cheers,

Joel

I've been out on vacation for a week so just seeing this. We have to make this change anyhow, but we should probably discuss what the upgrade options are before we bump the kernel pointer in openbmc/openbmc.

Signature · 1 line
Patrick Williams
#7 lore raw
In reply to Andrew Geissler
Quoted 6 lines · Andrew Geissler

Ack, we just went through this with the last update and all hit
https://github.com/openbmc/openbmc/issues/1030. It was pretty disruptive for all of us in the lab needing to pull the chips and manually flash each. This is would be fine if we can just flash the <system>.all.tar and all works ok, but that was not what we found in
https://github.com/openbmc/openbmc/issues/1030.

In the issue you referenced, Milton mentioned rewriting the whole flash. The <system>.all.tar should be that. Is this simply a problem with the REST API or manually putting the <system>.all.tar into /run/initramfs also not work? [1]

[1]: https://github.com/openbmc/docs/blob/master/code-update.md#update-from-the-openbmc-shell

Signature · 1 line
Patrick Williams