summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-01-14 12:09:48 -0600
committerJohn Klug <john.klug@multitech.com>2019-01-14 12:09:48 -0600
commit2779c3bf0acee52ed9709aa09eb5788df27b9739 (patch)
treefb71018946985f5e39ecabffb6cec3e560e9e309 /recipes-bsp/multitech
parent155f3e2dafebca39377540e27763c3c2190cc96d (diff)
downloadmeta-multitech-atmel-2779c3bf0acee52ed9709aa09eb5788df27b9739.tar.gz
meta-multitech-atmel-2779c3bf0acee52ed9709aa09eb5788df27b9739.tar.bz2
meta-multitech-atmel-2779c3bf0acee52ed9709aa09eb5788df27b9739.zip
Fix for kernel rebuild issue with mtac header files.
Diffstat (limited to 'recipes-bsp/multitech')
-rw-r--r--recipes-bsp/multitech/mtac-eth_1.1.0.bb1
-rw-r--r--recipes-bsp/multitech/mtac-gpiob_1.1.1.bb1
-rw-r--r--recipes-bsp/multitech/mtac-lora_1.1.2.bb1
-rw-r--r--recipes-bsp/multitech/mtac-mfser_1.1.0.bb1
-rw-r--r--recipes-bsp/multitech/mtac-pulse_1.1.0.bb1
-rw-r--r--recipes-bsp/multitech/mtac-xdot_1.1.0.bb1
-rw-r--r--recipes-bsp/multitech/mtac_4.0.0.bb31
-rw-r--r--recipes-bsp/multitech/mts-io.inc55
8 files changed, 23 insertions, 69 deletions
diff --git a/recipes-bsp/multitech/mtac-eth_1.1.0.bb b/recipes-bsp/multitech/mtac-eth_1.1.0.bb
index 77a36f9..af4d9fb 100644
--- a/recipes-bsp/multitech/mtac-eth_1.1.0.bb
+++ b/recipes-bsp/multitech/mtac-eth_1.1.0.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac-gpiob_1.1.1.bb b/recipes-bsp/multitech/mtac-gpiob_1.1.1.bb
index 68075c9..34f0fd3 100644
--- a/recipes-bsp/multitech/mtac-gpiob_1.1.1.bb
+++ b/recipes-bsp/multitech/mtac-gpiob_1.1.1.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac-lora_1.1.2.bb b/recipes-bsp/multitech/mtac-lora_1.1.2.bb
index c068b58..603db92 100644
--- a/recipes-bsp/multitech/mtac-lora_1.1.2.bb
+++ b/recipes-bsp/multitech/mtac-lora_1.1.2.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac-mfser_1.1.0.bb b/recipes-bsp/multitech/mtac-mfser_1.1.0.bb
index fe09af2..1637b86 100644
--- a/recipes-bsp/multitech/mtac-mfser_1.1.0.bb
+++ b/recipes-bsp/multitech/mtac-mfser_1.1.0.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac-pulse_1.1.0.bb b/recipes-bsp/multitech/mtac-pulse_1.1.0.bb
index 98f13ab..dfe2ce0 100644
--- a/recipes-bsp/multitech/mtac-pulse_1.1.0.bb
+++ b/recipes-bsp/multitech/mtac-pulse_1.1.0.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac-xdot_1.1.0.bb b/recipes-bsp/multitech/mtac-xdot_1.1.0.bb
index 78bb7bd..1fb5c87 100644
--- a/recipes-bsp/multitech/mtac-xdot_1.1.0.bb
+++ b/recipes-bsp/multitech/mtac-xdot_1.1.0.bb
@@ -21,6 +21,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
diff --git a/recipes-bsp/multitech/mtac_4.0.0.bb b/recipes-bsp/multitech/mtac_4.0.0.bb
index 33001c2..86385c1 100644
--- a/recipes-bsp/multitech/mtac_4.0.0.bb
+++ b/recipes-bsp/multitech/mtac_4.0.0.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ EXTRA_CFLAGS='-I${STAGING_INCDIR}/mts-kernel-headers' \
KBUILD_VERBOSE=1 \
M=${S} \
modules \
@@ -32,43 +33,17 @@ do_compile () {
oe_runmake
}
-L1 = "${STAGING_KERNEL_DIR}/include/linux/"
-
-# Bitbake/Yocto automatically installs in to L2.
-L2 = "${STAGING_INCDIR}/linux/"
-
-L3 = "${D}/usr/include/linux/"
-
PACKAGES = "kernel-module-${PN} ${PN}-dev"
FILES_kernel-module-${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mtac.ko"
-FILES_${PN}-dev += "/usr/include/linux/mtac.h"
-
PARALLEL_MAKE = ""
fakeroot do_install () {
install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
- install -d ${D}/usr/include/linux/
# use cp instead of install so the driver doesn't get stripped
cp ${S}/mtac.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
- install -m 0644 ${S}/mtac.h ${L1}
- install -m 0644 ${S}/mtac.h ${L3}
-}
-
-# Yocto seems to insist on Python for this function
-# This function is to make debugging easier, so the package
-# can be built a 2nd time.
-fakeroot do_cleansstate_prepend() {
- L1 = d.getVar("L1",True)
- L2 = d.getVar("L2",True)
- bb.note("L1 is " + L1)
- bb.note("L2 is " + L2)
- F1 = L1 + "/mtac.h"
- F2 = L2 + "/mtac.h"
- if os.path.exists(F1):
- os.remove(F1)
- if os.path.exists(F2):
- os.remove(F2)
+ install -d ${D}${includedir}/mts-kernel-headers/linux
+ install -m 0644 ${S}/mtac.h ${D}${includedir}/mts-kernel-headers/linux
}
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index c59a72e..1ffdb5b 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -60,41 +60,33 @@ FILES_${PN}-noarch += "${sbindir}/mts-io-sysfs"
FILES_${PN}-noarch_append_mtcap += "${sbindir}/lora-led-updater"
FILES_${PN}-util += "${sbindir}/mts-util-lora2-reset"
FILES_${PN}-util-dbg += "/usr/src /usr/sbin/.debug"
-FILES_${PN}-dev += "/usr/include/linux/mts_eeprom.h /usr/include/linux/mts_io.h"
+FILES_${PN}-dev += "${includedir}/linux ${includedir}/mts-kernel-headers"
INITSCRIPT_NAME = "mts-io"
INITSCRIPT_PARAMS = "start 39 S ."
PARALLEL_MAKE = ""
-L1 = "${STAGING_KERNEL_DIR}/include/linux/"
-
-# Bitbake/Yocto automatically installs in to L2.
-L2 = "${STAGING_INCDIR}/linux/"
-
-L3 = "${D}/usr/include/linux/"
fakeroot do_install () {
make DESTDIR=${D} install
install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
# use cp instead of install so the driver doesn't get stripped
cp ${S}/io-module/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
- install -d ${L3}
-
- echo "STAGING_KERNEL_DIR is ${STAGING_KERNEL_DIR}"
- echo "STAGING_INCDIR is ${STAGING_INCDIR}"
- echo "D/usr/include/linux/ is ${D}/usr/include/linux/"
-
- install -m 0644 ${S}/io-module/mts_io.h ${L1}
- # install -m 0644 ${S}/io-module/mts_io.h ${L2}
- install -m 0644 ${S}/io-module/mts_io.h ${L3}
- install -m 0644 ${S}/io-module/mts_eeprom.h ${L1}
- # install -m 0644 ${S}/io-module/mts_eeprom.h ${L2}
- install -m 0644 ${S}/io-module/mts_eeprom.h ${L3}
+ # install headers for kernel modules
+ install -d ${D}${includedir}/mts-kernel-headers/linux
+ install -m 0644 ${S}/io-module/mts_io.h ${D}${includedir}/mts-kernel-headers/linux
+ install -m 0644 ${S}/io-module/mts_eeprom.h ${D}${includedir}/mts-kernel-headers/linux
+ install -m 0644 ${S}/io-module/at91gpio.h ${D}${includedir}/mts-kernel-headers/linux
- install -m 0644 ${S}/io-module/at91gpio.h ${L1}
- # install -m 0644 ${S}/io-module/mts_eeprom.h ${L2}
- install -m 0644 ${S}/io-module/at91gpio.h ${L3}
+ # install same headers for userspace applications
+ # Note this dupication can be avoided by adding the following into the recipes
+ # CFLAGS += ${STAGING_INCDIR}/mts-kernel-headers
+ #
+ install -d ${D}${includedir}/linux
+ install -m 0644 ${S}/io-module/mts_io.h ${D}${includedir}/linux
+ install -m 0644 ${S}/io-module/mts_eeprom.h ${D}${includedir}/linux
+ install -m 0644 ${S}/io-module/at91gpio.h ${D}${includedir}/linux
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io
@@ -117,22 +109,3 @@ fakeroot do_install_append_mtcap() {
install -m 0755 ${WORKDIR}/mts-io.mtcap.init ${D}${sysconfdir}/init.d/mts-io
install -m 0755 ${WORKDIR}/lora-led-updater ${D}${sbindir}/lora-led-updater
}
-
-# Yocto seems to insist on Python for this function
-# This function is to make debugging easier, so the package
-# can be built a 2nd time.
-fakeroot do_cleansstate_prepend() {
- L1 = d.getVar("L1",True)
- L2 = d.getVar("L2",True)
- bb.note("L1 is " + L1)
- bb.note("L2 is " + L2)
-
- F1 = L1 + "/mts_io.h"
- F2 = L2 + "/mts_io.h"
- F3 = L1 + "/mts_eeprom.h"
- F4 = L2 + "/mts_eeprom.h"
-
- for f in [F1, F2, F3, F4]:
- if os.path.exists(f):
- os.remove(f)
-}