From bf7fb28eed3e8646d01c3dd1d2a1f50dd05feeab Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 21 Apr 2017 15:08:25 -0500 Subject: lora: update network server, loragw, and packet-forwarder versions --- .../lora-gateway-add-fpga-version-28-31-33.patch | 22 +++++- .../lora-gateway-v28-skip-IQ-invert.patch | 24 +++++++ recipes-connectivity/lora/lora-gateway_4.0.1.bb | 73 -------------------- recipes-connectivity/lora/lora-gateway_4.1.3.bb | 73 ++++++++++++++++++++ .../lora/lora-network-server_1.0.26.bb | 49 -------------- .../lora/lora-network-server_1.0.29.bb | 49 ++++++++++++++ .../lora/lora-packet-forwarder_3.0.0.bb | 79 ---------------------- .../lora/lora-packet-forwarder_3.1.0.bb | 79 ++++++++++++++++++++++ 8 files changed, 245 insertions(+), 203 deletions(-) create mode 100644 recipes-connectivity/lora/lora-gateway/lora-gateway-v28-skip-IQ-invert.patch delete mode 100644 recipes-connectivity/lora/lora-gateway_4.0.1.bb create mode 100644 recipes-connectivity/lora/lora-gateway_4.1.3.bb delete mode 100644 recipes-connectivity/lora/lora-network-server_1.0.26.bb create mode 100644 recipes-connectivity/lora/lora-network-server_1.0.29.bb delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb create mode 100644 recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-add-fpga-version-28-31-33.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-add-fpga-version-28-31-33.patch index 1950573..7e73263 100644 --- a/recipes-connectivity/lora/lora-gateway/lora-gateway-add-fpga-version-28-31-33.patch +++ b/recipes-connectivity/lora/lora-gateway/lora-gateway-add-fpga-version-28-31-33.patch @@ -1,5 +1,5 @@ diff --git a/libloragw/src/loragw_reg.c b/libloragw/src/loragw_reg.c -index 7e396bc..e71e695 100644 +index 7e396bc..478f46a 100644 --- a/libloragw/src/loragw_reg.c +++ b/libloragw/src/loragw_reg.c @@ -48,7 +48,7 @@ Maintainer: Sylvain Miermont @@ -9,4 +9,22 @@ index 7e396bc..e71e695 100644 -const uint8_t FPGA_VERSION[] = { 31, 33 }; /* several versions could be supported */ +const uint8_t FPGA_VERSION[] = { 28, 31, 33 }; /* several versions could be supported */ - /* \ No newline at end of file + /* + auto generated register mapping for C code : 11-Jul-2013 13:20:40 +@@ -415,6 +415,16 @@ bool check_fpga_version(uint8_t version) { + return false; + } + ++uint8_t read_fpga_version() { ++ uint8_t u = 0; ++ uint8_t spi_stat = lgw_spi_r(lgw_spi_target, LGW_SPI_MUX_MODE1, LGW_SPI_MUX_TARGET_FPGA, loregs[LGW_VERSION].addr, &u); ++ if (spi_stat != LGW_SPI_SUCCESS) { ++ DEBUG_MSG("ERROR READING VERSION REGISTER\n"); ++ return LGW_REG_ERROR; ++ } ++ return u; ++} ++ + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + int reg_w_align32(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target, struct lgw_reg_s r, int32_t reg_value) { diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-v28-skip-IQ-invert.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-v28-skip-IQ-invert.patch new file mode 100644 index 0000000..25065df --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway/lora-gateway-v28-skip-IQ-invert.patch @@ -0,0 +1,24 @@ +diff --git a/libloragw/src/loragw_fpga.c b/libloragw/src/loragw_fpga.c +index fa83a2a..7e667e3 100644 +--- a/libloragw/src/loragw_fpga.c ++++ b/libloragw/src/loragw_fpga.c +@@ -144,11 +144,14 @@ int lgw_fpga_configure(uint32_t tx_notch_freq) { + return LGW_REG_ERROR; + } + +- /* Required for Semtech AP2 reference design */ +- x = lgw_fpga_reg_w(LGW_FPGA_CTRL_INVERT_IQ, 1); +- if (x != LGW_REG_SUCCESS) { +- DEBUG_MSG("ERROR: Failed to configure FPGA polarity\n"); +- return LGW_REG_ERROR; ++ ++ if (read_fpga_version() > 28) { ++ /* Required for Semtech AP2 reference design and AP1.5 > v28 */ ++ x = lgw_fpga_reg_w(LGW_FPGA_CTRL_INVERT_IQ, 1); ++ if (x != LGW_REG_SUCCESS) { ++ DEBUG_MSG("ERROR: Failed to configure FPGA polarity\n"); ++ return LGW_REG_ERROR; ++ } + } + + /* Configure TX notch filter */ diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb deleted file mode 100644 index 8f66aa0..0000000 --- a/recipes-connectivity/lora/lora-gateway_4.0.1.bb +++ /dev/null @@ -1,73 +0,0 @@ -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 = "" -PR = "r9" -SRCREV = "v${PV}" - -SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ - file://lora-gateway-add-fpga-version-28.patch \ - file://library_4.0.cfg \ - file://lora-gateway-add-spi-path-function.patch \ - file://ln-lora-spi-dev.sh \ - file://lora-gateway-change-util-tx-continuous-clksrc.patch \ - file://lora-gateway-semtech-sf12.patch \ - " - -SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf" -SRC_URI[sha256sum] = "28fbfe098013908794b32e51d1fed4427f20dd6c8adbbca78df2e1800f5c84dc" - -S = "${WORKDIR}/git" - -CFLAGS += "-Iinc -I." - -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/lora-gw-readme.md - - install -d ${D}/opt/lora/ - - install -d ${D}/opt/lora/gateway-utils - install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ - install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ - install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ -} - -do_install_append_mtcdt() { - install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ -} - -PACKAGES += "${PN}-utils ${PN}-utils-dbg" - -FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" -FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" -FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" -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.1.3.bb b/recipes-connectivity/lora/lora-gateway_4.1.3.bb new file mode 100644 index 0000000..6c3214b --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway_4.1.3.bb @@ -0,0 +1,73 @@ +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 = "" +PR = "r10" +SRCREV = "v${PV}" + +SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ + file://lora-gateway-add-fpga-version-28-31-33.patch \ + file://library_4.0.cfg \ + file://lora-gateway-add-spi-path-function.patch \ + file://ln-lora-spi-dev.sh \ + file://lora-gateway-change-util-tx-continuous-clksrc.patch \ + file://lora-gateway-v28-skip-IQ-invert.patch \ + " + +SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf" +SRC_URI[sha256sum] = "28fbfe098013908794b32e51d1fed4427f20dd6c8adbbca78df2e1800f5c84dc" + +S = "${WORKDIR}/git" + +CFLAGS += "-Iinc -I." + +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/lora-gw-readme.md + + install -d ${D}/opt/lora/ + + install -d ${D}/opt/lora/gateway-utils + install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ + install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ + install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ +} + +do_install_append_mtcdt() { + install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ +} + +PACKAGES += "${PN}-utils ${PN}-utils-dbg" + +FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" +FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" +FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" +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-network-server_1.0.26.bb b/recipes-connectivity/lora/lora-network-server_1.0.26.bb deleted file mode 100644 index 7bde556..0000000 --- a/recipes-connectivity/lora/lora-network-server_1.0.26.bb +++ /dev/null @@ -1,49 +0,0 @@ -DESCRIPTION = "MultiTech LoRa Network Server" -PRIORITY = "optional" -SECTION = "console/utils" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7ffae4666a986c4ccf45e99e464f8402" -DEPENDS = "jsoncpp libmts mosquitto sqlite3" -RDEPENDS_${PN} += "lora-packet-forwarder logrotate" -PR = "r1" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - file://lora-network-server.logrotate.conf \ - " - -SRC_URI[md5sum] = "2c49e1b7e399cac2382fb73537da215c" -SRC_URI[sha256sum] = "a287d594b59a041877ee2db698383a77a36be348ffe111e2b6c93e1ce93e7ca3" - -# binaries are already stripped, so suppress warning -INSANE_SKIP_${PN} = "already-stripped" - -S = "${WORKDIR}" - -LORA_DIR = "/opt/lora" - -do_compile() { -} - -inherit update-rc.d - -INITSCRIPT_NAME = "lora-network-server" -INITSCRIPT_PARAMS = "defaults 80 30" - -do_install() { - install -d ${D}${LORA_DIR} - install -m 0755 lora-network-server ${D}${LORA_DIR}/ - install -m 0644 lora-network-server.conf.sample ${D}${LORA_DIR}/lora-network-server.conf.sample - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server - install -d ${D}${sysconfdir}/logrotate.d - install -m 0644 ${WORKDIR}/lora-network-server.logrotate.conf ${D}${sysconfdir}/logrotate.d/lora-network-server.conf -} - -CONFFILES_${PN} = "${sysconfdir}/default/lora-network-server" -FILES_${PN} += "${LORA_DIR}" -FILES_${PN}-dbg += "${LORA_DIR}/.debug" diff --git a/recipes-connectivity/lora/lora-network-server_1.0.29.bb b/recipes-connectivity/lora/lora-network-server_1.0.29.bb new file mode 100644 index 0000000..2afeec2 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_1.0.29.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "MultiTech LoRa Network Server" +PRIORITY = "optional" +SECTION = "console/utils" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7ffae4666a986c4ccf45e99e464f8402" +DEPENDS = "jsoncpp libmts mosquitto sqlite3" +RDEPENDS_${PN} += "lora-packet-forwarder logrotate" +PR = "r1" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + file://lora-network-server.logrotate.conf \ + " + +SRC_URI[md5sum] = "440097dbaf9fa85932b126d61455f797" +SRC_URI[sha256sum] = "8c1b825f4d0bae5f41aa38eb5c3df2797d6d279c89ebe9a75a0a7161e700f4f2" + +# binaries are already stripped, so suppress warning +INSANE_SKIP_${PN} = "already-stripped" + +S = "${WORKDIR}" + +LORA_DIR = "/opt/lora" + +do_compile() { +} + +inherit update-rc.d + +INITSCRIPT_NAME = "lora-network-server" +INITSCRIPT_PARAMS = "defaults 80 30" + +do_install() { + install -d ${D}${LORA_DIR} + install -m 0755 lora-network-server ${D}${LORA_DIR}/ + install -m 0644 lora-network-server.conf.sample ${D}${LORA_DIR}/lora-network-server.conf.sample + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server + install -d ${D}${sysconfdir}/logrotate.d + install -m 0644 ${WORKDIR}/lora-network-server.logrotate.conf ${D}${sysconfdir}/logrotate.d/lora-network-server.conf +} + +CONFFILES_${PN} = "${sysconfdir}/default/lora-network-server" +FILES_${PN} += "${LORA_DIR}" +FILES_${PN}-dbg += "${LORA_DIR}/.debug" diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb deleted file mode 100644 index 98e1973..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb +++ /dev/null @@ -1,79 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "SEMTECH" -LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" -DEPENDS = "lora-gateway" -PR = "r9" - -SRCREV = "v${PV}" - -SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ - file://README.md \ - file://lora-packet-forwarder.init \ - file://lora-packet-forwarder.default \ - file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic \ - file://local_conf.json \ - file://lora-packet-forwarder-add-spi-dev-path.patch \ - file://lora-packet-forwarder-remove-jit-power-check.patch \ -" - - -S = "${WORKDIR}/git" - -LORA_DIR = "/opt/lora" - -export LGW_PATH = "${STAGING_LIBDIR}/lora" -export LGW_INC = "${STAGING_INCDIR}/lora" - -CFLAGS += "-I${LGW_INC} -Iinc -I." - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${LORA_DIR} - install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ - - install -d ${D}${LORA_DIR}/forwarder-utils - install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder -} - -do_install_append_mtcdt() { - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 -} - -do_install_append_mtcap() { - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json -} - -FILES_${PN} += "${LORA_DIR}" -FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb new file mode 100644 index 0000000..98e1973 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb @@ -0,0 +1,79 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "SEMTECH" +LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" +DEPENDS = "lora-gateway" +PR = "r9" + +SRCREV = "v${PV}" + +SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ + file://README.md \ + file://lora-packet-forwarder.init \ + file://lora-packet-forwarder.default \ + file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic \ + file://local_conf.json \ + file://lora-packet-forwarder-add-spi-dev-path.patch \ + file://lora-packet-forwarder-remove-jit-power-check.patch \ +" + + +S = "${WORKDIR}/git" + +LORA_DIR = "/opt/lora" + +export LGW_PATH = "${STAGING_LIBDIR}/lora" +export LGW_INC = "${STAGING_INCDIR}/lora" + +CFLAGS += "-I${LGW_INC} -Iinc -I." + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${LORA_DIR} + install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ + + install -d ${D}${LORA_DIR}/forwarder-utils + install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder +} + +do_install_append_mtcdt() { + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 +} + +do_install_append_mtcap() { + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json +} + +FILES_${PN} += "${LORA_DIR}" +FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} -- cgit v1.2.3