aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrendan Le Foll <brendan.le.foll@intel.com>2014-06-20 16:14:31 +0100
committerBrendan Le Foll <brendan.le.foll@intel.com>2014-11-10 15:07:23 +0000
commit3cbb99e357b1fe4376f5c07a14efe9ef029aa2cf (patch)
tree620f0a4f7c9ee1591e4f9305de3f137cde2bcf56
parent9863febd1165c9f5fcdaa05c938f18f957b1c7e8 (diff)
downloadmeta-intel-quark-3cbb99e357b1fe4376f5c07a14efe9ef029aa2cf.tar.gz
meta-intel-quark-3cbb99e357b1fe4376f5c07a14efe9ef029aa2cf.tar.bz2
meta-intel-quark-3cbb99e357b1fe4376f5c07a14efe9ef029aa2cf.zip
quark-init: update quark-init with systemd script and gen2 galileo support
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
-rw-r--r--recipes-kernel/quark-init/files/galileo.conf15
-rw-r--r--recipes-kernel/quark-init/files/galileo_gen2.conf9
-rw-r--r--recipes-kernel/quark-init/files/quark-init.service10
-rwxr-xr-xrecipes-kernel/quark-init/files/quark-init.sh10
-rw-r--r--recipes-kernel/quark-init/quark-init_0.1.bb16
5 files changed, 39 insertions, 21 deletions
diff --git a/recipes-kernel/quark-init/files/galileo.conf b/recipes-kernel/quark-init/files/galileo.conf
index 2a7dba9..daed921 100644
--- a/recipes-kernel/quark-init/files/galileo.conf
+++ b/recipes-kernel/quark-init/files/galileo.conf
@@ -1,23 +1,8 @@
-pch-udc
-g-serial vendor=0x8086 product=0xBABE
-stmmac
-ehci_hcd
-ohci_hcd
-ehci-pci
-usb_storage
-gpio_sch
intel_qrk_gip
cy8c9540a
-at24
i2c_dev
spidev
spi-pxa2xx-pci
spi-pxa2xx
industrialio
ad7298
-iwlwifi
-btusb
-usbhid
-evdev
-sdhci-pci
-mmc-block
diff --git a/recipes-kernel/quark-init/files/galileo_gen2.conf b/recipes-kernel/quark-init/files/galileo_gen2.conf
new file mode 100644
index 0000000..45b9f8f
--- /dev/null
+++ b/recipes-kernel/quark-init/files/galileo_gen2.conf
@@ -0,0 +1,9 @@
+intel_qrk_gip
+gpio-pca953x
+pca9685
+i2c_dev
+spidev
+spi-pxa2xx-pci
+spi-pxa2xx
+industrialio
+adc1x8s102
diff --git a/recipes-kernel/quark-init/files/quark-init.service b/recipes-kernel/quark-init/files/quark-init.service
new file mode 100644
index 0000000..da24c9a
--- /dev/null
+++ b/recipes-kernel/quark-init/files/quark-init.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Load modules for galileo/quark
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh /usr/sbin/quark-init.sh
+
+[Install]
+WantedBy=local-fs.target
diff --git a/recipes-kernel/quark-init/files/quark-init.sh b/recipes-kernel/quark-init/files/quark-init.sh
index e03f454..f7c92eb 100755
--- a/recipes-kernel/quark-init/files/quark-init.sh
+++ b/recipes-kernel/quark-init/files/quark-init.sh
@@ -9,9 +9,13 @@ load_drivers()
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
+ board=$(cat /sys/devices/virtual/dmi/id/board_name)
+ case "$board" in
+ *"GalileoGen2" )
+ load_drivers "galileo_gen2" ;;
+ *"Galileo" )
+ load_drivers "galileo" ;;
+ esac
}
die()
diff --git a/recipes-kernel/quark-init/quark-init_0.1.bb b/recipes-kernel/quark-init/quark-init_0.1.bb
index 65fa039..026efa5 100644
--- a/recipes-kernel/quark-init/quark-init_0.1.bb
+++ b/recipes-kernel/quark-init/quark-init_0.1.bb
@@ -3,21 +3,31 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://quark-init.sh \
- file://galileo.conf"
+ file://galileo.conf \
+ file://galileo_gen2.conf \
+ file://quark-init.service"
INSTALLDIR = "/etc/modules-load.quark"
-FILES_${PN} += "${INSTALLDIR}"
+FILES_${PN} += "${INSTALLDIR} \
+ ${sbindir}/quark-init.sh"
FILES_${PN}-dbg += "${INSTALLDIR}/.debug"
do_install() {
install -d ${D}${INSTALLDIR}
install -m 0755 ${WORKDIR}/galileo.conf ${D}${INSTALLDIR}/
+ install -m 0755 ${WORKDIR}/galileo_gen2.conf ${D}${INSTALLDIR}/
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/quark-init.sh ${D}${sysconfdir}/init.d
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/quark-init.service ${D}${systemd_unitdir}/system/
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/quark-init.sh ${D}${sbindir}
}
-inherit update-rc.d
+inherit update-rc.d systemd
INITSCRIPT_NAME = "quark-init.sh"
INITSCRIPT_PARAMS = "start 75 5 ."
+SYSTEMD_SERVICE_${PN} = "quark-init.service"