diff options
author | John Klug <john.klug@multitech.com> | 2018-10-19 14:41:38 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-10-19 14:41:38 -0500 |
commit | fa5f51eb877c392c834e399cc6e358e499f9a9f2 (patch) | |
tree | a0fdb13b5925760fa18d816870a1d6612e9bd919 /recipes-bsp/multitech/mtac_1.0.0.bb | |
parent | db4f5c789349ddfa830ab86964181333f876246e (diff) | |
parent | f5e8bc4c61fde5701f162cf62b2bd676b0377802 (diff) | |
download | meta-multitech-atmel-fa5f51eb877c392c834e399cc6e358e499f9a9f2.tar.gz meta-multitech-atmel-fa5f51eb877c392c834e399cc6e358e499f9a9f2.tar.bz2 meta-multitech-atmel-fa5f51eb877c392c834e399cc6e358e499f9a9f2.zip |
Bring Linux4 branch up to date with latest MTS-IO changes.
Diffstat (limited to 'recipes-bsp/multitech/mtac_1.0.0.bb')
-rw-r--r-- | recipes-bsp/multitech/mtac_1.0.0.bb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-bsp/multitech/mtac_1.0.0.bb b/recipes-bsp/multitech/mtac_1.0.0.bb new file mode 100644 index 0000000..e6038a9 --- /dev/null +++ b/recipes-bsp/multitech/mtac_1.0.0.bb @@ -0,0 +1,73 @@ +DESCRIPTION = "mtac drivers" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "base" +PRIORITY = "optional" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +DEPENDS = "virtual/kernel mts-io" +INC_PR = "r0" + +SRCREV = "${PV}" + +PR = "${INC_PR}.0-${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}" + +SRC_URI = " \ + git://git.multitech.net/mtac.git;protocol=git \ +" +S = "${WORKDIR}/git" + +inherit module + +EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \ + KBUILD_VERBOSE=1 \ + M=${S} \ + modules \ + " + +do_compile () { + bbnote make "$@" + make "$@" + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + 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) +} |