diff options
author | John Klug <john.klug@multitech.com> | 2018-10-25 18:15:07 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-10-25 18:15:07 -0500 |
commit | e81526169d59e57fa0490e0433d693595308f81a (patch) | |
tree | 9c7ff4763979bda2868e4ba0d5116472b0740b9b /recipes-bsp/multitech/mtac_1.1.0.bb | |
parent | f5e8bc4c61fde5701f162cf62b2bd676b0377802 (diff) | |
download | meta-multitech-e81526169d59e57fa0490e0433d693595308f81a.tar.gz meta-multitech-e81526169d59e57fa0490e0433d693595308f81a.tar.bz2 meta-multitech-e81526169d59e57fa0490e0433d693595308f81a.zip |
Fix up module unload with new mtac_free function in the mtac module4.0.4
Diffstat (limited to 'recipes-bsp/multitech/mtac_1.1.0.bb')
-rw-r--r-- | recipes-bsp/multitech/mtac_1.1.0.bb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-bsp/multitech/mtac_1.1.0.bb b/recipes-bsp/multitech/mtac_1.1.0.bb new file mode 100644 index 0000000..e6038a9 --- /dev/null +++ b/recipes-bsp/multitech/mtac_1.1.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) +} |