* [Buildroot] [Buildroot PATCH v3 1/1] cgroupsfs: new package
@ 2016-02-15 14:40 Niranjan Reddy
2016-03-20 22:55 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Niranjan Reddy @ 2016-02-15 14:40 UTC (permalink / raw)
To: buildroot
This package consists of scripts that setup cgroups at boot
without doing any cgroup management or classification of
tasks into cgroups
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
---
Changes v2 -> v3:
- placed start(),stop() and restart() in seperate functions.
- Changed LICENSE to GPLv3+ and added $(CGROUPFS_PKGDIR)
instead of package/cgroupfs/ .
- Added .hash file.
- Removed test condition for mount and umount (suggested by Thomas).
Changes v1 -> v2:
- Changed navigation options in Config.in ( suggested by Arnout).
- Removed CGROUPFS_INSTALL_TARGET and cgroupfs-mount.upstart from cgroupfs.mk file as it was
not required.
- Added S30cgroupfs startup script which gets installed to /etc/init.d
- Added details of version,copyright and licence file.
---
package/Config.in | 1 +
package/cgroupfs/Config.in | 19 +++++++++++++++++++
package/cgroupfs/S30cgroupfs | 36 ++++++++++++++++++++++++++++++++++++
package/cgroupfs/cgroupfs.hash | 2 ++
package/cgroupfs/cgroupfs.mk | 23 +++++++++++++++++++++++
5 files changed, 81 insertions(+)
create mode 100644 package/cgroupfs/Config.in
create mode 100644 package/cgroupfs/S30cgroupfs
create mode 100644 package/cgroupfs/cgroupfs.hash
create mode 100644 package/cgroupfs/cgroupfs.mk
diff --git a/package/Config.in b/package/Config.in
index a5b31aa..452fd0b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1571,6 +1571,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/dcron/Config.in"
source "package/debianutils/Config.in"
endif
+ source "package/cgroupfs/Config.in"
source "package/dsp-tools/Config.in"
source "package/emlog/Config.in"
source "package/ftop/Config.in"
diff --git a/package/cgroupfs/Config.in b/package/cgroupfs/Config.in
new file mode 100644
index 0000000..e0b685c
--- /dev/null
+++ b/package/cgroupfs/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_CGROUPFS
+ bool "cgroupfs"
+ depends on !BR2_INIT_SYSTEMD
+ help
+ cgroupfs mount and umount scripts.
+
+ requires a Linux kernel >= 3.0 with the following options
+ enabled:
+
+ - CONFIG_BLK_CGROUP
+ - CONFIG_CGROUPS
+ - CONFIG_CGROUP_CPUACCT
+ - CONFIG_CGROUP_DEVICE
+ - CONFIG_CGROUP_FREEZER
+ - CONFIG_CGROUP_WRITEBACK
+ - CONFIG_CGROUP_SCHED
+ - CONFIG_CGROUP_PIDS
+
+ https://github.com/tianon/cgroupfs-mount
diff --git a/package/cgroupfs/S30cgroupfs b/package/cgroupfs/S30cgroupfs
new file mode 100644
index 0000000..627da2c
--- /dev/null
+++ b/package/cgroupfs/S30cgroupfs
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Set up cgroupfs mounts.
+#
+
+start() {
+ printf "Mounting cgroupfs hierarchy"
+ /usr/bin/cgroupfs-mount
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+stop() {
+ printf "Unmounting cgroupfs hierarchy"
+ /usr/bin/cgroupfs-umount
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
diff --git a/package/cgroupfs/cgroupfs.hash b/package/cgroupfs/cgroupfs.hash
new file mode 100644
index 0000000..e127e1b
--- /dev/null
+++ b/package/cgroupfs/cgroupfs.hash
@@ -0,0 +1,2 @@
+# No hash for 7285bf44402029394808339f69f4f293730fc2c6
+none xxx cgroupfs-7285bf44402029394808339f69f4f293730fc2c6.tar.gz
diff --git a/package/cgroupfs/cgroupfs.mk b/package/cgroupfs/cgroupfs.mk
new file mode 100644
index 0000000..c7ea616
--- /dev/null
+++ b/package/cgroupfs/cgroupfs.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# cgroupfs
+#
+################################################################################
+
+CGROUPFS_VERSION = 7285bf44402029394808339f69f4f293730fc2c6
+CGROUPFS_SITE = $(call github,tianon,cgroupfs-mount,$(CGROUPFS_VERSION))
+CGROUPFS_LICENSE = GPLv3+
+CGROUPFS_LICENSE_FILES = COPYRIGHT
+
+define CGROUPFS_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/cgroupfs-mount $(TARGET_DIR)/usr/bin/cgroupfs-mount
+ $(INSTALL) -D -m 0755 $(@D)/cgroupfs-umount $(TARGET_DIR)/usr/bin/cgroupfs-umount
+endef
+
+define CGROUPFS_INSTALL_INIT_SYSV
+ $(INSTALL) -m 0755 -D $(CGROUPFS_PKGDIR)S30cgroupfs \
+ $(TARGET_DIR)/etc/init.d/S30cgroupfs
+
+endef
+
+$(eval $(generic-package))
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [Buildroot PATCH v3 1/1] cgroupsfs: new package
2016-02-15 14:40 [Buildroot] [Buildroot PATCH v3 1/1] cgroupsfs: new package Niranjan Reddy
@ 2016-03-20 22:55 ` Thomas Petazzoni
2016-03-21 6:39 ` Niranjan Reddy
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2016-03-20 22:55 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 15 Feb 2016 20:10:03 +0530, Niranjan Reddy wrote:
> This package consists of scripts that setup cgroups at boot
> without doing any cgroup management or classification of
> tasks into cgroups
>
> Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
> ---
> Changes v2 -> v3:
> - placed start(),stop() and restart() in seperate functions.
> - Changed LICENSE to GPLv3+ and added $(CGROUPFS_PKGDIR)
> instead of package/cgroupfs/ .
> - Added .hash file.
> - Removed test condition for mount and umount (suggested by Thomas).
I've done a number of changes:
[Thomas:
- rename to cgroupfs-mount to match upstream
- add proper hash, since hashes should be added for github sourced
packages
- fix minor typos in the init script
- fix the license file information.]
And then applied. Note that hashes must be added for github sourced
packages, and that you should verify with make legal-info that the
license files pointed in the <pkg>_LICENSE_FILES variable actually
exist (it wasn't the case in your submission).
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [Buildroot PATCH v3 1/1] cgroupsfs: new package
2016-03-20 22:55 ` Thomas Petazzoni
@ 2016-03-21 6:39 ` Niranjan Reddy
0 siblings, 0 replies; 3+ messages in thread
From: Niranjan Reddy @ 2016-03-21 6:39 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Thanks for the changes and the feedback.
Best Regards,
Niranjan
On Mon, Mar 21, 2016 at 4:25 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 15 Feb 2016 20:10:03 +0530, Niranjan Reddy wrote:
> > This package consists of scripts that setup cgroups at boot
> > without doing any cgroup management or classification of
> > tasks into cgroups
> >
> > Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
> > ---
> > Changes v2 -> v3:
> > - placed start(),stop() and restart() in seperate functions.
> > - Changed LICENSE to GPLv3+ and added $(CGROUPFS_PKGDIR)
> > instead of package/cgroupfs/ .
> > - Added .hash file.
> > - Removed test condition for mount and umount (suggested by Thomas).
>
> I've done a number of changes:
>
> [Thomas:
> - rename to cgroupfs-mount to match upstream
> - add proper hash, since hashes should be added for github sourced
> packages
> - fix minor typos in the init script
> - fix the license file information.]
>
> And then applied. Note that hashes must be added for github sourced
> packages, and that you should verify with make legal-info that the
> license files pointed in the <pkg>_LICENSE_FILES variable actually
> exist (it wasn't the case in your submission).
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160321/b0fec92e/attachment.html>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-21 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 14:40 [Buildroot] [Buildroot PATCH v3 1/1] cgroupsfs: new package Niranjan Reddy
2016-03-20 22:55 ` Thomas Petazzoni
2016-03-21 6:39 ` Niranjan Reddy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.