diff options
-rw-r--r-- | classes/sota.bbclass | 3 | ||||
-rw-r--r-- | recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index fde00cd..04215ba 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -6,8 +6,7 @@ SOTA_HARDWARE_ID ??= "${MACHINE}" | |||
6 | 6 | ||
7 | IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" | 7 | IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" |
8 | IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \ | 8 | IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \ |
9 | ostree os-release ostree-kernel \ | 9 | ostree os-release ostree-kernel ostree-initramfs \ |
10 | ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \ | ||
11 | ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}" | 10 | ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}" |
12 | 11 | ||
13 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" | 12 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" |
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() { | |||
36 | 36 | ||
37 | cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz | 37 | cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz |
38 | 38 | ||
39 | if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then | 39 | if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then |
40 | if [ -n "${INITRAMFS_IMAGE}" ]; then | ||
41 | # this is a hack for ostree not to override init= in kernel cmdline - | ||
42 | # make it think that the initramfs is present (while it is in FIT image) | ||
43 | touch $kerneldir/initramfs.img | ||
44 | fi | ||
45 | else | ||
40 | if [ -n "${INITRAMFS_IMAGE}" ]; then | 46 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
41 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img | 47 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img |
42 | fi | 48 | fi |