Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile native

2023-11-30 Thread Viswanath Kraleti



On 11/28/2023 4:38 AM, Peter Kjellerstedt wrote:

-Original Message-
From: openembedded-core@lists.openembedded.org  On Behalf Of Dmitry Baryshkov
Sent: den 27 november 2023 22:05
To: Ross Burton 
Cc: quic_vkral...@quicinc.com; OE Core mailing list 
Subject: Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile
native

On Mon, 27 Nov 2023 at 18:49, Ross Burton  wrote:


On 27 Nov 2023, at 14:56, Viswanath Kraleti via 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.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191558): 
https://lists.openembedded.org/g/openembedded-core/message/191558
Mute This Topic: https://lists.openembedded.org/mt/102830176/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile native

2023-11-27 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core@lists.openembedded.org  c...@lists.openembedded.org> On Behalf Of Dmitry Baryshkov
> Sent: den 27 november 2023 22:05
> To: Ross Burton 
> Cc: quic_vkral...@quicinc.com; OE Core mailing list  c...@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  wrote:
> >
> > On 27 Nov 2023, at 14:56, Viswanath Kraleti via 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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191329): 
https://lists.openembedded.org/g/openembedded-core/message/191329
Mute This Topic: https://lists.openembedded.org/mt/102830176/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile native

2023-11-27 Thread Dmitry Baryshkov
On Mon, 27 Nov 2023 at 18:49, Ross Burton  wrote:
>
> On 27 Nov 2023, at 14:56, Viswanath Kraleti via 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191327): 
https://lists.openembedded.org/g/openembedded-core/message/191327
Mute This Topic: https://lists.openembedded.org/mt/102830176/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] systemd-boot: Extend recipe to compile native

2023-11-27 Thread Ross Burton
On 27 Nov 2023, at 14:56, Viswanath Kraleti via 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191309): 
https://lists.openembedded.org/g/openembedded-core/message/191309
Mute This Topic: https://lists.openembedded.org/mt/102830176/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] systemd-boot: Extend recipe to compile native

2023-11-27 Thread Viswanath Kraleti
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 
---
 .../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: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-