Closed quic-vkraleti closed 8 months ago
Also, did you consider using the wic's bootimg-efi plugin?
Build error on arm7 is due to a bug in systemd code base. Faced same issue even without any of the above changes. https://github.com/systemd/systemd/commit/cecbb162a3134b43d2ca160e13198c73ff34c3ef fixes it. I'll pull this change a .patch for now to mitigate.
Also see https://lore.kernel.org/all/20230901233231.1109712-1-michelle.linto91@gmail.com/T/.
After internal discussion, I think the uki.bbclass is a way to go.
And by the play, please take a look at resolving the build error reported by the CI (for nodistro builds):
linux-yocto PROVIDES virtual/kernel but was skipped: missing required distro feature 'systemd' (not in DISTRO_FEATURES)
Thank you.
@quic-vkraleti Please send the systemd patches to the oe-core list.
@quic-vkraleti after these refactorings the ESP recipe together with the EFI_* configuration starts to look more and more like a distro feature. Maybe we repurpose it to the distro layer? (Again, maybe later, not now, if you don't have a distro layer yet).
The meson fix was merged to oe-core, please drop it.
I think that changes to qcom-common.inc and the esp-image belong to the distro layer. They describe distro-specific solutions, which might change from distro to distro. Consider e.g. Yoe or poky deciding to use grub. This decision will conflict with the qcom-common changes / setup. Please move these chunks to your distro instead.
With these changes done I will merge this PR.
I haven't seen Poky recommending any bootloader as such. As I understand, bootloader is a choice of MACHINE but not DISTRO. I found "efi" in https://docs.yoctoproject.org/ref-manual/features.html#machine-features list.
We expect device to boot even for "nodistro" configurations. This won't be possible if esp is generated as part of distro layer. To draw parallels with the boot.img, today boot.img is in meta-qcom along with kernel recipe, I think esp.bin should also follow the same.
I'm going to merge this now.
EFI_*
variables look like distro-level decisions. I have asked one of my colleagues for his opinion.I'm going to merge this now.
- Please work with upstream to get systemd-boot-native into the oe-core. I want to get it dropped from this layer before the end of the year. This might require discussions on the mailing list, not the send-and-forget approach.
- Please follow the upstream developments on the UKI support.
- I still have impression that ESP image should be moved into the distro layer. The whole set of
EFI_*
variables look like distro-level decisions. I have asked one of my colleagues for his opinion.
Thanks for the support. I'll continue working with oe-core to upstream systemd-boot-native.
@mikkorapeli-linaro thank you for your comments!
To support systemd-boot as a boot manager, need to create an esp.bin with uki, uefi stub and other essential packaged into it. This is achieved in below patches.