-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Genimage for declarative image layout #3388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole PR looks very good 🤩
There are probably simplification opportunities, especially in the SPL/boot part of things.
But transitioning what we have to genimage first is a good approach. We can then still start to optimize/change things in future steps 👍
buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg
Outdated
Show resolved
Hide resolved
buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg
Outdated
Show resolved
Hide resolved
buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, I guess we need to make sure that we check and test boot all boards.
With changes from pengutronix/genimage#248, we should be able to achieve the same MBR layout as we used previously. |
This is what it really is, so just make sure only one "fix" function is called.
There is no reason to have separate efi and boot sys, since all boards that use efi also use grub as the loader.
Current implementation is mostly working, the only current problem seems to be the MBR layout which is not possible to be achieved with current Genimage capabilities. So far there are three places where this can cause problems: 1. The partition resizing service/script can't resize the data partition, because the extended partition needs to be resized first. 2. Partition numbers in mbr.rules do not match. 3. U-Boot scripts use partition numbers instead of labels.
Okay, I think this is ready for the final review. I ran a test build with modified job definition to compare partition tables and layout of the generated image when an SPL is present. There are couple of differences but IMO none of them should break anything, or they even straighten some things. In summary:
tl;dr - we don't have binary-identical images but functionally there shouldn't be differences. We still should test all the boards (or at least those that have some specifics) - but I have tried on those I have available and things are looking good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks 👍
…sues Genimage sets the first usable LBA to the offset of the first partition. While it shouldn't be an issue in theory, Windows may do some nasty things with the GPT header afterwards which breaks the Raspberry Pi bootloader, manifesting as Before purpose of this behavior is clarified in [1], add a downstream patch that sets the first usable LBA back to 34, which was the value that was used before migrating to Genimage in #3388. Since changing this value (hopefully) doesn't have any other consequences, and the images now should be closer to pre-genimage builds, no more side-effects are expected from this change. [1] https://www.github.com/pengutronix/genimage/issues/262 Fixes #3437
…sues (#3497) Genimage sets the first usable LBA to the offset of the first partition. While it shouldn't be an issue in theory, Windows may do some nasty things with the GPT header afterwards which breaks the Raspberry Pi bootloader, manifesting as Before purpose of this behavior is clarified in [1], add a downstream patch that sets the first usable LBA back to 34, which was the value that was used before migrating to Genimage in #3388. Since changing this value (hopefully) doesn't have any other consequences, and the images now should be closer to pre-genimage builds, no more side-effects are expected from this change. [1] https://www.github.com/pengutronix/genimage/issues/262 Fixes #3437
No description provided.