From 1118ab2e1f36a475472d534e0f6665a5508a41be Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Thu, 15 Oct 2020 12:27:10 -0300 Subject: ostree-kernel-initramfs: add back initramfs fit workaround Previous initramfs fit specific workaround was removed as part of commit 6eecf1593d, causing ostree to provide an init argument as part of the kernel command line arguments when it is not really needed. Bring back the workaround by simply generating an empty file in case kernel image type is fit and initramfs is also used by the target. Signed-off-by: Ricardo Salveti --- .../ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb') diff --git a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb index 136bb22..94010f7 100644 --- a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb +++ b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb @@ -36,7 +36,13 @@ do_install() { cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz - if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then + if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then + 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 + else if [ -n "${INITRAMFS_IMAGE}" ]; then cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img fi -- cgit v1.2.3-54-g00ecf