summaryrefslogtreecommitdiffstats
path: root/meta-blsched
diff options
context:
space:
mode:
authorFrode Isaksen <fisaksen@baylibre.com>2017-12-05 17:21:44 +0000
committerFrode Isaksen <fisaksen@baylibre.com>2017-12-14 17:50:07 +0000
commited8c0a7cf8ad14ca6a6c1dcab4d9f936fcd59bdf (patch)
treefee4df9bc266fbe9721f26276c9ad56a9487fa4b /meta-blsched
parentabe6250af91c4b3193511f4dd5fbfb7ee40d76d5 (diff)
Optimizes task placement on big.LITTLE platforms. Currently enabled for renesas r-car gen3 boards with the machine feature 'biglittle' defined. Change-Id: Idee5e759f13b3942496a831c444799b880caac89 Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Diffstat (limited to 'meta-blsched')
-rw-r--r--meta-blsched/COPYING.MIT17
-rw-r--r--meta-blsched/README.md42
-rw-r--r--meta-blsched/conf/layer.conf10
-rw-r--r--meta-blsched/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend1
-rw-r--r--meta-blsched/recipes-core/blsched/blsched_git.bb36
-rw-r--r--meta-blsched/recipes-core/blsched/files/blsched.service9
-rw-r--r--meta-blsched/recipes-kernel/linux/linux-renesas_%.bbappend4
7 files changed, 119 insertions, 0 deletions
diff --git a/meta-blsched/COPYING.MIT b/meta-blsched/COPYING.MIT
new file mode 100644
index 0000000..89de354
--- /dev/null
+++ b/meta-blsched/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/meta-blsched/README.md b/meta-blsched/README.md
new file mode 100644
index 0000000..e3a9475
--- /dev/null
+++ b/meta-blsched/README.md
@@ -0,0 +1,42 @@
+# Baylibre's AGL blsched layer
+
+This README file contains information on the contents of the
+meta-blsched layer.
+
+Please see the corresponding sections below for details.
+
+### Dependencies
+-------------------------
+
+The linux kernel must have the following config options enabled:
+CONFIG_CONNECTOR
+CONFIG_PROC_EVENTS
+CONFIG_SCHED_DEBUG
+
+### Patches
+-----------
+
+Please submit any patches against the meta-blsched layer to the
+the maintainers:
+
+* Michael Turquette <mturquette@baylibre.com>
+* Frode Isaksen <fisaksen@baylibre.com>
+* Jerome Brunet <jbrunet@baylibre.com>
+
+## I. Description and provided packages:
+
+The layer provides blsched utility. This package is a utility to improve scheduling efficiency on big.LITTLE architecture.
+
++ Provided packages :
+ - blsched : see https://github.com/BayLibre/bLsched/blob/master/README.md
+ - blsched-daemon : systemd service tailored for r8a7795 and r8a7796 SoCs
+
+## II. Adding the meta-blsched layer to your AGL build
+
+1. Download meta-agl-extra at `$AGL_TOP`
+2. Add `blsched` to the feature of your AGL build<br>
+```shell
+source meta-agl/scripts/aglsetup.sh -m $MACHINE -b <your-other-features> blsched
+```
+
+With this `meta-blsched` will be added to your `conf/bblayers.conf`. `blsched` and `blsched-daemon` will be appended to your image.
diff --git a/meta-blsched/conf/layer.conf b/meta-blsched/conf/layer.conf
new file mode 100644
index 0000000..68a179a
--- /dev/null
+++ b/meta-blsched/conf/layer.conf
@@ -0,0 +1,10 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "blsched"
+BBFILE_PATTERN_blsched = "^${LAYERDIR}/"
+BBFILE_PRIORITY_blsched = "6"
diff --git a/meta-blsched/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-blsched/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend
new file mode 100644
index 0000000..b5a7aaa
--- /dev/null
+++ b/meta-blsched/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend
@@ -0,0 +1 @@
+export PSCI_DISABLE_BIGLITTLE_IN_CA57BOOT="${@bb.utils.contains('MACHINE_FEATURES','biglittle','0','1',d)}"
diff --git a/meta-blsched/recipes-core/blsched/blsched_git.bb b/meta-blsched/recipes-core/blsched/blsched_git.bb
new file mode 100644
index 0000000..af7db3a
--- /dev/null
+++ b/meta-blsched/recipes-core/blsched/blsched_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "big.LITTLE scheduler"
+HOMEPAGE = "https://github.com/BayLibre/bLsched"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b0df75b2edb80ee98b732ee0514a265c"
+
+SRC_URI = "git://github.com/baylibre/blsched.git \
+ file://blsched.service \
+ "
+
+SRCREV = "b6bf199bc2def486857fb7003a6cb07708ed685e"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+COMPATIBLE_MACHINE ="((h|m)3ulcb|salvator-x)"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+DAEMONARGS_r8a7795 = "-b 0 -b 1 -b 2 -b 3"
+DAEMONARGS_r8a7796 = "-b 0 -b 1"
+
+RDEPENDS_${PN} += " blsched"
+
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "blsched.service"
+
+do_install_append () {
+ # Install the systemd init file
+ install -d ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/blsched.service ${D}${systemd_unitdir}/system
+
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@ARGS@,${DAEMONARGS},g' \
+ ${D}${systemd_unitdir}/system/*.service
+}
diff --git a/meta-blsched/recipes-core/blsched/files/blsched.service b/meta-blsched/recipes-core/blsched/files/blsched.service
new file mode 100644
index 0000000..b26b1fa
--- /dev/null
+++ b/meta-blsched/recipes-core/blsched/files/blsched.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=blsched big.LITTLE cpu manager service
+After=local-fs.target
+
+[Service]
+ExecStart=@SBINDIR@/blsched @ARGS@
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-blsched/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-blsched/recipes-kernel/linux/linux-renesas_%.bbappend
new file mode 100644
index 0000000..354734e
--- /dev/null
+++ b/meta-blsched/recipes-kernel/linux/linux-renesas_%.bbappend
@@ -0,0 +1,4 @@
+SRC_URI_append = " \
+ ${@bb.utils.contains('MACHINE_FEATURES','biglittle','file://procevent.cfg','',d)} \
+ ${@bb.utils.contains('MACHINE_FEATURES','biglittle','file://scheddebug.cfg','',d)} \
+ "