[oe-commits] Koen Kooi : linux.inc: add config mangler to enable cgroups support, disabled by default

git version control git at git.openembedded.org
Fri Jun 18 10:03:50 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: cdfe641ca1ac5a6a144c9b70d5b3238a12a9d6cd
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=cdfe641ca1ac5a6a144c9b70d5b3238a12a9d6cd

Author: Koen Kooi <koen at openembedded.org>
Date:   Fri Jun 18 12:02:03 2010 +0200

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 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/recipes/linux/linux.inc b/recipes/linux/linux.inc
index e020589..8d430e2 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.





More information about the Openembedded-commits mailing list