summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/distro/mlinux.conf4
-rw-r--r--recipes-connectivity/lora/lora-gateway/ln-lora-spi-dev.sh12
-rw-r--r--recipes-connectivity/lora/lora-gateway_4.0.1.bb14
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init15
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb9
-rw-r--r--recipes-core/images/mlinux-base-image.bb2
-rw-r--r--recipes-core/images/mlinux-factory-image.bb2
7 files changed, 38 insertions, 20 deletions
diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf
index bdc9165..0c231dd 100644
--- a/conf/distro/mlinux.conf
+++ b/conf/distro/mlinux.conf
@@ -1,8 +1,8 @@
DISTRO = "mlinux"
DISTRO_NAME = "mLinux"
-DISTRO_BASE_VERSION = "3.2"
+DISTRO_BASE_VERSION = "3.3"
DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0"
-DISTRO_CODENAME = ""
+DISTRO_CODENAME = "dev1"
SDK_VENDOR = "-mlinux"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
diff --git a/recipes-connectivity/lora/lora-gateway/ln-lora-spi-dev.sh b/recipes-connectivity/lora/lora-gateway/ln-lora-spi-dev.sh
new file mode 100644
index 0000000..c350fff
--- /dev/null
+++ b/recipes-connectivity/lora/lora-gateway/ln-lora-spi-dev.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+port1=/sys/devices/platform/mts-io/ap1
+port2=/sys/devices/platform/mts-io/ap2
+
+lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null)
+
+if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then
+ ln -sf /dev/spidev32766.2 /dev/spidev0.0
+elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then
+ ln -sf /dev/spidev32765.2 /dev/spidev0.0
+fi
diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb
index b2c52cf..7eac73e 100644
--- a/recipes-connectivity/lora/lora-gateway_4.0.1.bb
+++ b/recipes-connectivity/lora/lora-gateway_4.0.1.bb
@@ -6,13 +6,14 @@ SECTION = "console/utils"
LICENSE = "SEMTECH"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb"
DEPENDS = ""
-PR = "r4"
+PR = "r6"
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 \
"
SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf"
@@ -37,7 +38,10 @@ do_install() {
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 -m 0644 libloragw/readme.md ${D}${libdir}/lora/lora-gw-readme.md
+
+ install -d ${D}/opt/lora/
+ install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/
install -d ${D}/opt/lora/gateway-utils
install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/
@@ -45,12 +49,14 @@ do_install() {
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/
}
PACKAGES += "${PN}-utils ${PN}-utils-dbg"
-FILES_${PN}-utils = "/opt/lora/gateway-utils/*"
-FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug"
+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"
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index 7a72b34..75b753c 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -30,9 +30,8 @@ port2=/sys/devices/platform/mts-io/ap2
lora_us_id="MTAC-LORA-915"
lora_eu_id="MTAC-LORA-868"
-lora_usb_hw="MTAC-LORA-1.0"
-lora_spi_hw="MTAC-LORA-1.1"
-lora_h_hw="MTAC-LORA-1.5"
+lora_1_0_hw="MTAC-LORA-1.0"
+lora_1_5_h_hw="MTAC-LORA-1.5"
read_card_info() {
@@ -52,13 +51,13 @@ card_found() {
ln -sf /dev/spidev32765.2 /dev/spidev0.0
fi
- if [ "$lora_id" = "$lora_us_id" ] || [ "$lora_id" = "$lora_eu_id" ]; then
- if [ "$lora_hw" = "$lora_spi_hw" ] || [ "$lora_hw" = "$lora_h_hw" ]; then
- ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
- return 0
- elif [ "$lora_hw" = "$lora_usb_hw" ]; then
+ if [[ "$lora_id" =~ "$lora_us_id" ]] || [[ "$lora_id" =~ "$lora_eu_id" ]]; then
+ if [ "$lora_hw" = "$lora_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then
ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd
return 0
+ elif [ "$lora_hw" = "$lora_1_0_hw" ] || [ "$lora_hw" = "$lora_1_5_h_hw" ]; then
+ ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
+ return 0
else
return 1
fi
diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
index 8042d50..3f5be37 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
+++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
@@ -38,9 +38,10 @@ do_install() {
install -m 755 ${WORKDIR}/global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json
install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/
- install -m 755 util_sink/util_sink ${D}${LORA_DIR}/
- install -m 755 util_ack/util_ack ${D}${LORA_DIR}/
- install -m 755 util_tx_test/util_tx_test ${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}/
}
@@ -52,7 +53,7 @@ do_install_append_mtp() {
}
FILES_${PN} += "${LORA_DIR}"
-FILES_${PN}-dbg += "${LORA_DIR}/.debug"
+FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug"
# disable this on purpose for dev purposes
do_rm_work() {
diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb
index b90903a..35a58a9 100644
--- a/recipes-core/images/mlinux-base-image.bb
+++ b/recipes-core/images/mlinux-base-image.bb
@@ -53,7 +53,7 @@ MULTITECH_FEATURES += " \
jsparser \
"
-MISC_FEATURES = "minicom lrzsz nano"
+MISC_FEATURES = "minicom lrzsz nano rs9113"
# Extra stuff to install
IMAGE_INSTALL += " \
diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb
index 9cf9b06..6cc7197 100644
--- a/recipes-core/images/mlinux-factory-image.bb
+++ b/recipes-core/images/mlinux-factory-image.bb
@@ -20,7 +20,7 @@ IMAGE_INSTALL += "autossh"
IMAGE_INSTALL += "monit"
# LoRa support (MTAC-LORA accessory card)
-IMAGE_INSTALL += "lora-gateway-utils lora-gateway-usb-utils lora-network-server lora-query lora-packet-forwarder-usb"
+IMAGE_INSTALL += "lora-gateway-utils lora-network-server lora-query"
# MQTT server
IMAGE_INSTALL += "mosquitto mosquitto-clients"