From 22715646980f87f5ab5f70e2522525efa2f5f817 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Fri, 9 Sep 2016 14:47:07 -0500 Subject: picocell:feat: add recipe for semtech lora-gateway 4.0.1 --- recipes-connectivity/lora/lora-gateway.inc | 56 -------------------- .../lora/lora-gateway/library_4.0.cfg | 16 ++++++ recipes-connectivity/lora/lora-gateway_1.7.0mts.bb | 60 ++++++++++++++++++++-- recipes-connectivity/lora/lora-gateway_4.0.1.bb | 59 +++++++++++++++++++++ recipes-core/images/mlinux-picocell-image.bb | 4 ++ 5 files changed, 135 insertions(+), 60 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-gateway.inc create mode 100644 recipes-connectivity/lora/lora-gateway/library_4.0.cfg create mode 100644 recipes-connectivity/lora/lora-gateway_4.0.1.bb diff --git a/recipes-connectivity/lora/lora-gateway.inc b/recipes-connectivity/lora/lora-gateway.inc deleted file mode 100644 index b2dea9a..0000000 --- a/recipes-connectivity/lora/lora-gateway.inc +++ /dev/null @@ -1,56 +0,0 @@ -DESCRIPTION = "LoRa Gateway library" -HOMEPAGE = "https://www.semtech.com/" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "SEMTECH" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" -DEPENDS = "libftdi libmpsse libusb1" -INC_PR = "r9" -BRANCH ?= "master" - -SRC_URI = "git://git.multitech.net/lora_gateway;protocol=git;branch=${BRANCH} \ - file://lora-gateway-debug.patch \ - file://lora-gateway-sync-word.patch \ - file://library.cfg \ - " - -S = "${WORKDIR}/git" - -CFLAGS += "-Iinc -I. -DLIBFTDI1=1" - -do_configure_append() { - # copy over custom library.cfg - cp ${WORKDIR}/library.cfg ${S}/libloragw/ -} - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${includedir}/lora - install -d ${D}${libdir}/lora - install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora - install -m 0644 libloragw/library.cfg ${D}${libdir}/lora - install -m 0644 libloragw/inc/* ${D}${includedir}/lora - - install -d ${D}/opt/lora - install -m 0755 libloragw/test_* ${D}/opt/lora/ - install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/ - install -m 0755 util_band_survey/util_band_survey ${D}/opt/lora/ - install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/ - install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/ -} - -PACKAGES += "${PN}-utils ${PN}-utils-dbg" - -FILES_${PN}-utils = "/opt/lora/*" -FILES_${PN}-utils-dbg = "/opt/lora/.debug" -FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" -FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-gateway/library_4.0.cfg b/recipes-connectivity/lora/lora-gateway/library_4.0.cfg new file mode 100644 index 0000000..d9d3055 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway/library_4.0.cfg @@ -0,0 +1,16 @@ +# That file will be included in the Makefile files that have hardware dependencies + +### Debug options ### +# Set the DEBUG_* to 1 to activate debug mode in individual modules. +# Warning: that makes the module *very verbose*, do not use for production + +DEBUG_AUX= 0 +DEBUG_SPI= 0 +DEBUG_REG= 0 +# jjg - turning this on is useful to get HAL-related error messages that +# don't print out otherwise. It doesn't seem to add that much printing +# under normal operation. +DEBUG_HAL= 1 +DEBUG_LBT= 0 +DEBUG_GPS= 0 + diff --git a/recipes-connectivity/lora/lora-gateway_1.7.0mts.bb b/recipes-connectivity/lora/lora-gateway_1.7.0mts.bb index d032f62..13cffd8 100644 --- a/recipes-connectivity/lora/lora-gateway_1.7.0mts.bb +++ b/recipes-connectivity/lora/lora-gateway_1.7.0mts.bb @@ -1,7 +1,59 @@ -require lora-gateway.inc - +DESCRIPTION = "LoRa Gateway library" +HOMEPAGE = "https://www.semtech.com/" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "SEMTECH" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" +DEPENDS = "libftdi libmpsse libusb1" +INC_PR = "r9" PR = "${INC_PR}.1" - -SRCREV = "631dfedf1b535b6c3861d3c3868e02f48a84fb06" BRANCH = "1.7.0-mts" +SRCREV = "631dfedf1b535b6c3861d3c3868e02f48a84fb06" + +SRC_URI = "git://git.multitech.net/lora_gateway;protocol=git;branch=${BRANCH} \ + file://lora-gateway-debug.patch \ + file://lora-gateway-sync-word.patch \ + file://library.cfg \ + " + +S = "${WORKDIR}/git" + +CFLAGS += "-Iinc -I. -DLIBFTDI1=1" + +do_configure_append() { + # copy over custom library.cfg + cp ${WORKDIR}/library.cfg ${S}/libloragw/ +} + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${includedir}/lora + install -d ${D}${libdir}/lora + install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora + install -m 0644 libloragw/library.cfg ${D}${libdir}/lora + install -m 0644 libloragw/inc/* ${D}${includedir}/lora + + install -d ${D}/opt/lora + install -m 0755 libloragw/test_* ${D}/opt/lora/ + install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/ + install -m 0755 util_band_survey/util_band_survey ${D}/opt/lora/ + install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/ + install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/ +} + +PACKAGES += "${PN}-utils ${PN}-utils-dbg" + +FILES_${PN}-utils = "/opt/lora/*" +FILES_${PN}-utils-dbg = "/opt/lora/.debug" +FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" +FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb new file mode 100644 index 0000000..098aa30 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway_4.0.1.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "LoRa Gateway library" +HOMEPAGE = "https://github.com/Lora-net/lora_gateway" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "SEMTECH" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" +DEPENDS = "libftdi libmpsse libusb1" +PR = "r0" +SRCREV = "v${PV}" + +SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ + file://library_4.0.cfg \ + " + +SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf" +SRC_URI[sha256sum] = "28fbfe098013908794b32e51d1fed4427f20dd6c8adbbca78df2e1800f5c84dc" + +S = "${WORKDIR}/git" + +CFLAGS += "-Iinc -I. -DLIBFTDI1=1" + +do_configure_append() { + # copy over custom library_4.0.cfg + cp ${WORKDIR}/library_4.0.cfg ${S}/libloragw/library.cfg +} + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${includedir}/lora + install -d ${D}${libdir}/lora + install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora + install -m 0644 libloragw/library.cfg ${D}${libdir}/lora + install -m 0644 libloragw/inc/* ${D}${includedir}/lora + install -m 0644 libloragw/readme.md ${D}${libdir}/lora + + install -d ${D}/opt/lora + install -m 0755 libloragw/test_* ${D}/opt/lora/ + install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/ + install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/ + install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/ + install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/ +} + +PACKAGES += "${PN}-utils ${PN}-utils-dbg" + +FILES_${PN}-utils = "/opt/lora/*" +FILES_${PN}-utils-dbg = "/opt/lora/.debug" +FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" +FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} + diff --git a/recipes-core/images/mlinux-picocell-image.bb b/recipes-core/images/mlinux-picocell-image.bb index 09e0fd6..85855c0 100644 --- a/recipes-core/images/mlinux-picocell-image.bb +++ b/recipes-core/images/mlinux-picocell-image.bb @@ -3,5 +3,9 @@ require mlinux-base-image.bb # Multi-Tech SMS Utility (see http://git.multitech.net) IMAGE_INSTALL += "sms-utils" +# LoRa +IMAGE_INSTALL += "lora-gateway-utils \ + lora-gateway-utils-dbg" + # MQTT server IMAGE_INSTALL += "mosquitto mosquitto-clients" -- cgit v1.2.3