From c05d94f5eee4df5ee4fba0f278646f25d2078c96 Mon Sep 17 00:00:00 2001 From: Cezary Sobczak Date: Fri, 14 May 2021 14:39:54 +0200 Subject: [PATCH 1/5] linux-readonly-rootfs-overlay.inc: provide overlays.cfg directly Signed-off-by: Cezary Sobczak --- .../linux/linux-readonly-rootfs-overlay.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc b/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc index cc2bfe6..af30d93 100644 --- a/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc +++ b/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc @@ -1 +1,10 @@ -KERNEL_FEATURES_append = " features/overlayfs/overlayfs.scc" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append = " \ + file://overlays.cfg \ +" + +# This option is turned off due to problems with integration with other +# meta-layer which use "defconfig" instead "kernel metadata" from +# yocto-kernel-cache. +#KERNEL_FEATURES_append = " features/overlayfs/overlayfs.scc" + From b32d14291e449cb9c44b9730395584123ece04c4 Mon Sep 17 00:00:00 2001 From: Cezary Sobczak Date: Fri, 14 May 2021 14:41:01 +0200 Subject: [PATCH 2/5] overlays.cfg: add file This config file is from 'yocto-kernel-cache' repository: https://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/tree/features/overlayfs/overlayfs.cfg Signed-off-by: Cezary Sobczak --- recipes-kernel/linux/files/overlays.cfg | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 recipes-kernel/linux/files/overlays.cfg diff --git a/recipes-kernel/linux/files/overlays.cfg b/recipes-kernel/linux/files/overlays.cfg new file mode 100644 index 0000000..084ac6f --- /dev/null +++ b/recipes-kernel/linux/files/overlays.cfg @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: MIT +CONFIG_OVERLAY_FS=y From fa7a32936e51901faf77cc2c6b123df2133fcd51 Mon Sep 17 00:00:00 2001 From: Cezary Sobczak Date: Tue, 25 May 2021 12:39:31 +0200 Subject: [PATCH 3/5] recipes-kernel/linux/files/overlayfs.cfg: rename file Signed-off-by: Cezary Sobczak --- recipes-kernel/linux/files/{overlays.cfg => overlayfs.cfg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipes-kernel/linux/files/{overlays.cfg => overlayfs.cfg} (100%) diff --git a/recipes-kernel/linux/files/overlays.cfg b/recipes-kernel/linux/files/overlayfs.cfg similarity index 100% rename from recipes-kernel/linux/files/overlays.cfg rename to recipes-kernel/linux/files/overlayfs.cfg From 9c422d8d2ee433d5ecdad42d26b3212b63da8c4b Mon Sep 17 00:00:00 2001 From: Cezary Sobczak Date: Tue, 25 May 2021 12:39:55 +0200 Subject: [PATCH 4/5] linux-readonly-rootfs-overlay.inc: change file name to overlayfs.cfg Signed-off-by: Cezary Sobczak --- recipes-kernel/linux/linux-readonly-rootfs-overlay.inc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc b/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc index af30d93..73bf5c3 100644 --- a/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc +++ b/recipes-kernel/linux/linux-readonly-rootfs-overlay.inc @@ -1,10 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI_append = " \ - file://overlays.cfg \ + file://overlayfs.cfg \ " -# This option is turned off due to problems with integration with other -# meta-layer which use "defconfig" instead "kernel metadata" from -# yocto-kernel-cache. -#KERNEL_FEATURES_append = " features/overlayfs/overlayfs.scc" - From 44940d397549d98f434582d9d7dd258484cad208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BByjewski?= Date: Wed, 9 Jun 2021 13:09:26 +0200 Subject: [PATCH 5/5] core: rorootfs-overlay: fix bootparam for 2nd level overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomasz Żyjewski --- .../initrdscripts/initramfs-framework/rorootfs-overlay | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes-core/initrdscripts/initramfs-framework/rorootfs-overlay b/recipes-core/initrdscripts/initramfs-framework/rorootfs-overlay index 9c91ade..10e13f7 100644 --- a/recipes-core/initrdscripts/initramfs-framework/rorootfs-overlay +++ b/recipes-core/initrdscripts/initramfs-framework/rorootfs-overlay @@ -107,12 +107,12 @@ rorootfs_run() { [ -n "$bootparam_init" ] && INIT="$bootparam_init" [ -n "$bootparam_rootinit" ] && ROOT_ROINIT="$bootparam_rootinit" [ -n "$bootparam_rootrwreset" ] && ROOT_RWRESET="$bootparam_rootrwreset" - [ -n "$bootparam_rootrwreset" ] && ROOT_RWRESET2="$bootparam_rootrwreset2" - [ -n "$bootparam_rootrwreset" ] && FACTORY_RESET="$bootparam_factoryreset" + [ -n "$bootparam_rootrwreset2" ] && ROOT_RWRESET2="$bootparam_rootrwreset2" + [ -n "$bootparam_factoryreset" ] && FACTORY_RESET="$bootparam_factoryreset" [ -n "$bootparam_root" ] && ROOT_RODEVICE="$(rorootfs_find_device "$bootparam_root")" [ -n "$bootparam_rootrw" ] && ROOT_RWDEVICE="$(rorootfs_find_device "$bootparam_rootrw")" - [ -n "$bootparam_rootrw" ] && ROOT_RWDEVICE2="$(rorootfs_find_device "$bootparam_rootrw2")" + [ -n "$bootparam_rootrw2" ] && ROOT_RWDEVICE2="$(rorootfs_find_device "$bootparam_rootrw2")" [ -n "$bootparam_rootfstype" ] && ROOT_ROFSTYPE="$bootparam_rootfstype" [ -n "$bootparam_rootoptions" ] && ROOT_ROMOUNTOPTIONS="$bootparam_rootoptions" @@ -120,8 +120,8 @@ rorootfs_run() { [ -n "$bootparam_rootrwfstype" ] && ROOT_RWFSTYPE="$bootparam_rootrwfstype" [ -n "$bootparam_rootrwoptions" ] && ROOT_RWMOUNTOPTIONS="$bootparam_rootrwoptions" - [ -n "$bootparam_rootrwfstype" ] && ROOT_RWFSTYPE2="$bootparam_rootrwfstype2" - [ -n "$bootparam_rootrwoptions" ] && ROOT_RWMOUNTOPTIONS2="$bootparam_rootrwoptions2" + [ -n "$bootparam_rootrwfstype2" ] && ROOT_RWFSTYPE2="$bootparam_rootrwfstype2" + [ -n "$bootparam_rootrwoptions2" ] && ROOT_RWMOUNTOPTIONS2="$bootparam_rootrwoptions2" # We use 2nd level of overlay if rootrw2 was given in the kernel cmdline # AND rwoverlaylvl was set to 2