summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/mts-io.inc')
-rw-r--r--recipes-bsp/multitech/mts-io.inc57
1 files changed, 21 insertions, 36 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index fa54024..8e65401 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19
file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
"
DEPENDS = "virtual/kernel"
-INC_PR = "r10"
+INC_PR = "r0"
SRCREV = "${PV}"
@@ -23,8 +23,9 @@ SRC_URI = " \
"
S = "${WORKDIR}/git"
-inherit module-base
+inherit module
inherit update-rc.d
+inherit autotools
# add this since we aren't using module.bbclass
addtask make_scripts after do_patch before do_compile
@@ -38,17 +39,21 @@ EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
"
do_compile () {
+ bbnote make "$@"
+ make "$@"
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake
}
-PACKAGES = "${PN}"
+PACKAGES = "${PN}-noarch kernel-module-${PN} ${PN}-util ${PN}-util-dbg"
-FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko"
-FILES_${PN} += "${sysconfdir}"
-FILES_${PN} += "${libdir}/mts-io-sysfs*"
-FILES_${PN} += "${sbindir}/mts-io-sysfs"
-FILES_${PN}_append_mtcap += "${sbindir}/lora-led-updater"
+FILES_kernel-module-${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko"
+FILES_${PN}-noarch = "${sysconfdir}"
+FILES_${PN}-noarch += "${libdir}/mts-io-sysfs*"
+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"
INITSCRIPT_NAME = "mts-io"
INITSCRIPT_PARAMS = "start 39 S ."
@@ -56,14 +61,15 @@ INITSCRIPT_PARAMS = "start 39 S ."
PARALLEL_MAKE = ""
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 io-module/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
- cp io-module/mts_io.h ${STAGING_KERNEL_DIR}/include/linux/
- cp io-module/mts_io.h ${STAGING_INCDIR}/linux/
+ cp ${S}/io-module/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
+ cp ${S}/io-module/mts_io.h ${STAGING_KERNEL_DIR}/include/linux/
+ cp ${S}/io-module/mts_io.h ${STAGING_INCDIR}/linux/
if [ -f io-module/mts_eeprom.h ]; then
- cp io-module/mts_eeprom.h ${STAGING_KERNEL_DIR}/include/linux/
- cp io-module/mts_eeprom.h ${STAGING_INCDIR}/linux/
+ cp ${S}/io-module/mts_eeprom.h ${STAGING_KERNEL_DIR}/include/linux/
+ cp ${S}/io-module/mts_eeprom.h ${STAGING_INCDIR}/linux/
fi
install -d ${D}${sysconfdir}/init.d
@@ -83,8 +89,8 @@ fakeroot do_install () {
install -m 0755 -d ${D}${sbindir}
install -d ${D}${libdir}/mts-io-sysfs
- install -m 0755 io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs
- install -m 0755 io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs
+ install -m 0755 ${S}/io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs
+ install -m 0755 ${S}/io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/radio-reset.default ${D}${sysconfdir}/default/radio-reset
@@ -98,24 +104,3 @@ fakeroot do_install_append_mtcap() {
# disable radio-reset for the mtcap hardware
sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset
}
-
-# If we called our package kernel-module-mts-io, we would not need to do this.
-# but since kernel-module is not in the package name, the kernel module class
-# cannot find a package to place the post-install and post-remove script.
-pkg_postinst_${PN} () {
- if [ -z "$D" ]; then
- depmod -a ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
- else
- # image.bbclass will call depmodwrapper after everything is installed,
- # no need to do it here as well
- :
- fi
-}
-
-pkg_postrm_${PN} () {
- if [ -z "$D" ]; then
- depmod -a ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
- else
- depmodwrapper -a -b $D ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
- fi
-}