From dffa0933b1d320382eea620a1a3180e1d55bbcf6 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Mon, 3 Jun 2024 11:50:38 -0400 Subject: [PATCH] Force use of cgroup v2 Added a bootconfig file to the kernel which adds: 'cgroup_no_v1 = all' to kernel cmdline. --- .../recipes-citadel/bbappends/systemd_%.bbappend | 2 +- .../citadel-kernel/citadel-kernel_6.9.1.bb | 1 + .../recipes-kernel/citadel-kernel/files/bootconfig | 3 +++ .../recipes-kernel/citadel-kernel/files/defconfig | 9 ++++++--- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 meta-citadel/recipes-kernel/citadel-kernel/files/bootconfig diff --git a/meta-citadel/recipes-citadel/bbappends/systemd_%.bbappend b/meta-citadel/recipes-citadel/bbappends/systemd_%.bbappend index 5f8565e..453ad8e 100644 --- a/meta-citadel/recipes-citadel/bbappends/systemd_%.bbappend +++ b/meta-citadel/recipes-citadel/bbappends/systemd_%.bbappend @@ -9,7 +9,7 @@ ALTERNATIVE:${PN}:remove = "resolv-conf" GROUPADD_PARAM:${PN} += "-r wheel; -r kvm; -r render" PACKAGECONFIG = "\ efi acl ldconfig pam usrmerge rfkill backlight binfmt hostnamed localed logind machined myhostname \ - nss polkit randomseed seccomp timedated utmp timesyncd kmod sysusers gshadow cryptsetup \ + nss polkit randomseed seccomp timedated utmp timesyncd kmod sysusers gshadow cryptsetup cgroupv2 \ " do_install:append() { diff --git a/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_6.9.1.bb b/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_6.9.1.bb index 993f4bd..a5ba256 100644 --- a/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_6.9.1.bb +++ b/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_6.9.1.bb @@ -7,6 +7,7 @@ inherit kernel SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${PV}.tar.xz\ file://defconfig \ + file://bootconfig \ " SRC_URI[sha256sum] = "01b414ba98fd189ecd544435caf3860ae2a790e3ec48f5aa70fdf42dc4c5c04a" diff --git a/meta-citadel/recipes-kernel/citadel-kernel/files/bootconfig b/meta-citadel/recipes-kernel/citadel-kernel/files/bootconfig new file mode 100644 index 0000000..85a1933 --- /dev/null +++ b/meta-citadel/recipes-kernel/citadel-kernel/files/bootconfig @@ -0,0 +1,3 @@ +kernel { + cgroup_no_v1 = all +} diff --git a/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig b/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig index aaceef3..643c9da 100644 --- a/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig +++ b/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig @@ -2,7 +2,7 @@ # Automatically generated file; DO NOT EDIT. # Linux/x86 6.9.1 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="gcc (Debian 13.2.0-24) 13.2.0" +CONFIG_CC_VERSION_TEXT="gcc (Debian 13.2.0-25) 13.2.0" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=130200 CONFIG_CLANG_VERSION=0 @@ -208,7 +208,7 @@ CONFIG_CGROUP_WRITEBACK=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y -CONFIG_RT_GROUP_SCHED=y +# CONFIG_RT_GROUP_SCHED is not set CONFIG_SCHED_MM_CID=y CONFIG_CGROUP_PIDS=y # CONFIG_CGROUP_RDMA is not set @@ -242,7 +242,10 @@ CONFIG_INITRAMFS_SOURCE="" # CONFIG_RD_LZO is not set CONFIG_RD_LZ4=y # CONFIG_RD_ZSTD is not set -# CONFIG_BOOT_CONFIG is not set +CONFIG_BOOT_CONFIG=y +CONFIG_BOOT_CONFIG_FORCE=y +CONFIG_BOOT_CONFIG_EMBED=y +CONFIG_BOOT_CONFIG_EMBED_FILE="../bootconfig" CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set