diff options
-rw-r--r-- | recipes-kernel/quark-init/files/galileo.conf | 23 | ||||
-rwxr-xr-x | recipes-kernel/quark-init/files/quark-init.sh | 24 | ||||
-rw-r--r-- | recipes-kernel/quark-init/quark-init_0.1.bb | 23 |
3 files changed, 70 insertions, 0 deletions
diff --git a/recipes-kernel/quark-init/files/galileo.conf b/recipes-kernel/quark-init/files/galileo.conf new file mode 100644 index 0000000..2a7dba9 --- /dev/null +++ b/recipes-kernel/quark-init/files/galileo.conf @@ -0,0 +1,23 @@ +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/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 + diff --git a/recipes-kernel/quark-init/quark-init_0.1.bb b/recipes-kernel/quark-init/quark-init_0.1.bb new file mode 100644 index 0000000..65fa039 --- /dev/null +++ b/recipes-kernel/quark-init/quark-init_0.1.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "List of drivers to be auto-loaded" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://quark-init.sh \ + file://galileo.conf" + +INSTALLDIR = "/etc/modules-load.quark" +FILES_${PN} += "${INSTALLDIR}" +FILES_${PN}-dbg += "${INSTALLDIR}/.debug" + +do_install() { + install -d ${D}${INSTALLDIR} + install -m 0755 ${WORKDIR}/galileo.conf ${D}${INSTALLDIR}/ + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/quark-init.sh ${D}${sysconfdir}/init.d +} + +inherit update-rc.d + +INITSCRIPT_NAME = "quark-init.sh" +INITSCRIPT_PARAMS = "start 75 5 ." + |