From 6c6260c857f58b817d24ed662b58bfb9930c9070 Mon Sep 17 00:00:00 2001 From: Dominik Wild Date: Thu, 17 Sep 2020 15:19:04 +0200 Subject: image_types_ostree: fix chmod Signed-off-by: Dominik Wild --- classes/image_types_ostree.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 392a42a..4fe37a3 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -88,7 +88,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} + echo "mkdir -p /var/rootdirs/${dir}; chmod 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} fi ln -sf var/rootdirs/${dir} ${dir} done @@ -101,7 +101,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/roothome 0700 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/roothome; chown 700 /var/roothome" >>${tmpfiles_conf} + echo "mkdir -p /var/roothome; chmod 700 /var/roothome" >>${tmpfiles_conf} fi rm -rf root @@ -118,7 +118,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/usrlocal 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/usrlocal; chown 755 /var/usrlocal" >>${tmpfiles_conf} + echo "mkdir -p /var/usrlocal; chmod 755 /var/usrlocal" >>${tmpfiles_conf} fi dirs="bin etc games include lib man sbin share src" @@ -127,7 +127,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/usrlocal/${dir} 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/usrlocal/${dir}; chown 755 /var/usrlocal/${dir}" >>${tmpfiles_conf} + echo "mkdir -p /var/usrlocal/${dir}; chmod 755 /var/usrlocal/${dir}" >>${tmpfiles_conf} fi done -- cgit v1.2.3-54-g00ecf 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 --- classes/sota.bbclass | 3 +-- .../ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/sota.bbclass b/classes/sota.bbclass index fbd92b5..9241952 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -6,8 +6,7 @@ SOTA_HARDWARE_ID ??= "${MACHINE}" IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \ - ostree os-release ostree-kernel \ - ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \ + ostree os-release ostree-kernel ostree-initramfs \ ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}" 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() { 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