aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/quark-init/files/quark-init.sh
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2014-05-01 11:57:24 -0700
committerPaul Eggleton <paul.eggleton@linux.intel.com>2014-05-09 18:19:36 +0100
commit3250f7092fa63027dd2b2a9f6443accea16fa6c1 (patch)
tree48d60ed43330137a2be7eb6324338ef0febf795b /recipes-kernel/quark-init/files/quark-init.sh
parent60b176f615fc178b9cc186333f0c05aaae2c7d85 (diff)
downloadmeta-intel-quark-3250f7092fa63027dd2b2a9f6443accea16fa6c1.tar.gz
meta-intel-quark-3250f7092fa63027dd2b2a9f6443accea16fa6c1.tar.bz2
meta-intel-quark-3250f7092fa63027dd2b2a9f6443accea16fa6c1.zip
quark-init: Add from v1.0.0
(meta-clanton rev: 45df415361ae60f5113e97533584ef17e1f5a1c1) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-kernel/quark-init/files/quark-init.sh')
-rwxr-xr-xrecipes-kernel/quark-init/files/quark-init.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-kernel/quark-init/files/quark-init.sh b/recipes-kernel/quark-init/files/quark-init.sh
new file mode 100755
index 0000000..e03f454
--- /dev/null
+++ b/recipes-kernel/quark-init/files/quark-init.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+load_drivers()
+{
+ while IFS= read -r line; do
+ modprobe $line
+ done < "/etc/modules-load.quark/$1.conf"
+}
+
+do_board()
+{
+ type dmidecode > /dev/null 2>&1 || die "dmidecode not installed"
+ board=$(dmidecode -s baseboard-product-name)
+ case "$board" in *"Galileo" ) load_drivers "galileo" ;; esac
+}
+
+die()
+{
+ exit 1
+}
+
+do_board
+exit 0
+