From a663265a9b653c158ddc516981ecf42f8fc4f3ba Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 26 Aug 2021 15:39:57 +0200 Subject: [PATCH] ostree-kernel-initramfs: Simplify bbappends To reduce redundancy of the main code and explain why we need this bbappend. BugzID: 74466 --- .../ostree-kernel-initramfs_%.bbappend | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/bbappends/sota/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_%.bbappend b/bbappends/sota/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_%.bbappend index 83b78f0..38e64e5 100644 --- a/bbappends/sota/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_%.bbappend +++ b/bbappends/sota/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_%.bbappend @@ -1,14 +1,6 @@ +# The main recipe is expecting the fitimage to be built direclty +# by virtual/kernel. But in our case virtual/kernel is building a +# zImage/Image and we pack the fitimage in netmodule-fitimage + do_install[depends] += " netmodule-fitimage:do_deploy" - -do_install() { - kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} - install -d $kerneldir - - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz - - if [ -n "${INITRAMFS_IMAGE}" ]; then - # this is a hack for ostree not to override init= in kernel cmdline - - # make it think that the initramfs is present (while it is in FIT image) - touch $kerneldir/initramfs.img - fi -} +KERNEL_IMAGETYPE = "fitImage"