Message ID | 20231127145643.986904-1-quic_vkraleti@quicinc.com |
---|---|
State | New |
Headers | show |
Series | systemd-boot: Extend recipe to compile native | expand |
On 27 Nov 2023, at 14:56, Viswanath Kraleti via lists.openembedded.org <quic_vkraleti=quicinc.com@lists.openembedded.org> wrote: > > 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. Feels like it might be neater to just have a new recipe that builds that one binary, instead of a mess of overrides in an other wise simple recipe. Ross
On Mon, 27 Nov 2023 at 18:49, Ross Burton <ross.burton@arm.com> wrote: > > On 27 Nov 2023, at 14:56, Viswanath Kraleti via lists.openembedded.org <quic_vkraleti=quicinc.com@lists.openembedded.org> wrote: > > > > 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. > > Feels like it might be neater to just have a new recipe that builds that one binary, instead of a mess of overrides in an other wise simple recipe. This was one of the concerns during patch development. I suggested patching the existing .bb on the premises of having the same version for native and target recipes.
> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded- > core@lists.openembedded.org> On Behalf Of Dmitry Baryshkov > Sent: den 27 november 2023 22:05 > To: Ross Burton <ross.burton@arm.com> > Cc: quic_vkraleti@quicinc.com; OE Core mailing list <openembedded- > core@lists.openembedded.org> > Subject: Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile > native > > On Mon, 27 Nov 2023 at 18:49, Ross Burton <ross.burton@arm.com> wrote: > > > > On 27 Nov 2023, at 14:56, Viswanath Kraleti via lists.openembedded.org > <quic_vkraleti=quicinc.com@lists.openembedded.org> wrote: > > > > > > 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. > > > > Feels like it might be neater to just have a new recipe that builds that > one binary, instead of a mess of overrides in an other wise simple recipe. > > This was one of the concerns during patch development. I suggested > patching the existing .bb on the premises of having the same version > for native and target recipes. > > -- > With best wishes > Dmitry That should be taken care of by requiring the systemd.inc file. //Peter
On 11/28/2023 4:38 AM, Peter Kjellerstedt wrote: >> -----Original Message----- >> From: openembedded-core@lists.openembedded.org <openembedded- >> core@lists.openembedded.org> On Behalf Of Dmitry Baryshkov >> Sent: den 27 november 2023 22:05 >> To: Ross Burton <ross.burton@arm.com> >> Cc: quic_vkraleti@quicinc.com; OE Core mailing list <openembedded- >> core@lists.openembedded.org> >> Subject: Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile >> native >> >> On Mon, 27 Nov 2023 at 18:49, Ross Burton <ross.burton@arm.com> wrote: >>> >>> On 27 Nov 2023, at 14:56, Viswanath Kraleti via lists.openembedded.org >> <quic_vkraleti=quicinc.com@lists.openembedded.org> wrote: >>>> >>>> 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. >>> >>> Feels like it might be neater to just have a new recipe that builds that >> one binary, instead of a mess of overrides in an other wise simple recipe. >> >> This was one of the concerns during patch development. I suggested >> patching the existing .bb on the premises of having the same version >> for native and target recipes. >> >> -- >> With best wishes >> Dmitry > > That should be taken care of by requiring the systemd.inc file. > > //Peter > Submitted https://lists.openembedded.org/g/openembedded-core/message/191557 to add a native recipe.
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"
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 <quic_vkraleti@quicinc.com> --- .../systemd/systemd-boot_254.4.bb | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)