diff mbox series

[RFC,v2,1/4] linux-bootconfig-native: add recipe

Message ID 20260327-bootconfig-v2-1-891975014056@valla.it
State New
Headers show
Series Add support for bootconfig on initramfs and FIT images | expand

Commit Message

Francesco Valla March 27, 2026, 4:49 p.m. UTC
Add a new recipe for the bootconfig tool, with source coming directly
from the Linux kernel shared workdir.

Signed-off-by: Francesco Valla <francesco@valla.it>
---
 .../linux-bootconfig/linux-bootconfig-native.bb    | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux-bootconfig/linux-bootconfig-native.bb b/meta/recipes-kernel/linux-bootconfig/linux-bootconfig-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f4aeb0ce413def5eed8b7ce98075e1f32061de02
--- /dev/null
+++ b/meta/recipes-kernel/linux-bootconfig/linux-bootconfig-native.bb
@@ -0,0 +1,31 @@ 
+SUMMARY = "Apply, delete or show boot config"
+DESCRIPTION = "bootconfig is a tool that can be used to add a boot config block \
+at the end of a kernel initramfs, as well as remove it or show its content."
+LICENSE = "GPL-2.0-only"
+
+inherit kernelsrc kernel-arch native
+
+do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
+EXTRA_OEMAKE = "\
+    -C ${S}/tools/bootconfig O=${B} \
+    CC="${KERNEL_CC}" LD="${KERNEL_LD}" STRIP="${KERNEL_STRIP}" \
+    HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" \
+    'DESTDIR=${D}' 'prefix=${prefix}' 'bindir=${bindir}' \
+"
+
+do_compile() {
+	oe_runmake ${B}/bootconfig V=1
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	oe_runmake install
+}
+
+python do_package:prepend() {
+    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
+}
+
+B = "${WORKDIR}/${BPN}-${PV}"