From cdfe641ca1ac5a6a144c9b70d5b3238a12a9d6cd Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 18 Jun 2010 12:02:03 +0200 Subject: [PATCH] linux.inc: add config mangler to enable cgroups support, disabled by default * set KERNEL_ENABLE_CGROUPS = "1" in your distro/local.conf to enable this * CGROUPS were added in 2.6.24 --- recipes/linux/linux.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/recipes/linux/linux.inc b/recipes/linux/linux.inc index e0205890cd..8d430e27d9 100644 --- a/recipes/linux/linux.inc +++ b/recipes/linux/linux.inc @@ -164,6 +164,23 @@ do_configure_prepend() { echo 'CONFIG_DEVTMPFS_MOUNT=y' >> ${S}/.config fi + # Newer inits like systemd need cgroup support + if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then + sed -e /CONFIG_CGROUP_SCHED/d \ + -e /CONFIG_CGROUPS/d \ + -i '${S}/.config' + + echo 'CONFIG_CGROUP_SCHED=y' >> ${S}/.config + echo 'CONFIG_CGROUPS=y' >> ${S}/.config + echo 'CONFIG_CGROUP_NS=y' >> ${S}/.config + echo 'CONFIG_CGROUP_FREEZER=y' >> ${S}/.config + echo 'CONFIG_CGROUP_DEVICE=y' >> ${S}/.config + echo 'CONFIG_CPUSETS=y' >> ${S}/.config + echo 'CONFIG_PROC_PID_CPUSET=y' >> ${S}/.config + echo 'CONFIG_CGROUP_CPUACCT=y' >> ${S}/.config + echo 'CONFIG_RESOURCE_COUNTERS=y' >> ${S}/.config + fi + # # root-over-nfs-over-usb-eth support. Limited, but should cover some cases. # Enable this by setting a proper CMDLINE_NFSROOT_USB. -- 2.39.5