diff options
Diffstat (limited to 'recipes-kernel/quark-init')
-rw-r--r-- | recipes-kernel/quark-init/files/galileo.conf | 15 | ||||
-rw-r--r-- | recipes-kernel/quark-init/files/galileo_gen2.conf | 9 | ||||
-rw-r--r-- | recipes-kernel/quark-init/files/quark-init.service | 10 | ||||
-rwxr-xr-x | recipes-kernel/quark-init/files/quark-init.sh | 10 | ||||
-rw-r--r-- | recipes-kernel/quark-init/quark-init_0.1.bb | 16 |
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" |