summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-basic-station_2.0.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/lora/lora-basic-station_2.0.3.bb')
-rw-r--r--recipes-connectivity/lora/lora-basic-station_2.0.3.bb58
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes-connectivity/lora/lora-basic-station_2.0.3.bb b/recipes-connectivity/lora/lora-basic-station_2.0.3.bb
new file mode 100644
index 0000000..2db6a14
--- /dev/null
+++ b/recipes-connectivity/lora/lora-basic-station_2.0.3.bb
@@ -0,0 +1,58 @@
+DESCRIPTION = "LoRa Basic Station"
+HOMEPAGE = "https://github.com/lorabasics/basicstation"
+PRIORITY = "optional"
+SECTION = "console/utils"
+# Semtech license is a modified BSD-style license
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7706b51ea6d730e45568141c660072d5"
+DEPENDS = "lora-gateway logrotate lora-logging mbedtls"
+RDEPENDS_${PN} += "bash"
+PR = "r1"
+
+SRCREV = "v${PV}"
+
+SRC_URI = "git://github.com/lorabasics/basicstation.git;protocol=git \
+ file://setup.gmk \
+ file://lora-basic-station.init \
+ file://lora-basic-station.default \
+ file://tc.uri \
+ file://lora-basic-station-disable-device-mode.patch \
+ file://lora-basic-station-sys-linux-log-fix.patch \
+ file://lora-basic-station-fix-clksrc-0.patch \
+"
+
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+LORA_DIR = "/opt/lora"
+
+export LGW_PATH = "${STAGING_LIBDIR}/lora"
+export LGW_INC = "${STAGING_INCDIR}/lora"
+
+CFLAGS += "-I${STAGING_INCDIR} -I${STAGING_INCDIR}/lora -I${WORKDIR}/git/deps -Iinc -I. -std=gnu11 -L${STAGING_LIBDIR}/lora"
+
+do_compile() {
+ rm -fr ${S}/deps/lgw
+ ln -s ${STAGING_INCDIR}/lora ${S}/deps/lgw
+ cp ${WORKDIR}/setup.gmk ${S}/setup.gmk
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}${LORA_DIR}
+ install -m 755 ${S}/build-mlinux-std/bin/station ${D}${LORA_DIR}/
+ install -m 755 ${WORKDIR}/tc.uri ${D}${LORA_DIR}/
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/lora-basic-station.default ${D}${sysconfdir}/default/lora-basic-station
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/lora-basic-station.init ${D}${sysconfdir}/init.d/lora-basic-station
+}
+
+FILES_${PN} += "${LORA_DIR}"
+
+# disable this on purpose for dev purposes
+do_rm_work() {
+ echo "skipping"
+}