systemd has ukify, a native tool, which will combine the kernel/initrd/stub
components to build the UKI (unified kernel images). systemd-boot recipe
isn't providing this tool.

In order to use ukify, one need systemd-boot native recipe that can be
added as a dependency to get the tool under recipe-sysroot-native.

Signed-off-by: Viswanath Kraleti <[email protected]>
---
 .../systemd/systemd-boot_254.4.bb             | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd-boot_254.4.bb 
b/meta/recipes-core/systemd/systemd-boot_254.4.bb
index 4ee25ee72f..aa8b53e4dd 100644
--- a/meta/recipes-core/systemd/systemd-boot_254.4.bb
+++ b/meta/recipes-core/systemd/systemd-boot_254.4.bb
@@ -4,6 +4,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
 require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gperf-native 
python3-jinja2-native python3-pyelftools-native"
+DEPENDS:class-native = ""
 
 inherit meson pkgconfig gettext
 inherit deploy
@@ -46,18 +47,33 @@ python __anonymous () {
 FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
 
 RDEPENDS:${PN} += "virtual-systemd-bootconf"
+RDEPENDS:${PN}:class-native = "python3-pefile-native"
 
 CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t"
 
 COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux"
 COMPATIBLE_HOST:x86-x32 = "null"
 
-do_install() {
+do_configure:class-native () {
+       mkdir -p ${B}/meson-logs/
+       touch ${B}/meson-logs/meson-log.txt
+}
+
+do_compile:class-native () {
+}
+
+do_install:class-native () {
+       install -d ${D}${bindir}
+       install -m 0755 ${S}/src/ukify/ukify.py ${D}${bindir}/ukify
+}
+do_install:class-target () {
        install -d ${D}${EFI_FILES_PATH}
        install ${B}/src/boot/efi/systemd-boot*.efi 
${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}
 }
 
 do_deploy () {
+}
+do_deploy:class-target () {
        install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
        install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR}
        install ${B}/src/boot/efi/addon*.efi.stub ${DEPLOYDIR}
@@ -65,3 +81,4 @@ do_deploy () {
 
 addtask deploy before do_build after do_compile
 
+BBCLASSEXTEND = "native"
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191307): 
https://lists.openembedded.org/g/openembedded-core/message/191307
Mute This Topic: https://lists.openembedded.org/mt/102830176/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to