From b06e1217f11dd8bdd904538d835ce7938d4fe2a7 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 19 Jun 2020 12:07:21 -0500 Subject: lora: update lora-query, lora-basic-station and add mbedtls --- .../lora-basic-station-disable-device-mode.patch | 15 ----- .../lora-basic-station-fix-clksrc-0.patch | 14 ---- .../lora-basic-station-sys-linux-log-fix.patch | 14 ---- .../lora/lora-basic-station_2.0.3.bb | 58 ----------------- .../lora/lora-basic-station_2.0.5-1.bb | 55 ++++++++++++++++ recipes-connectivity/lora/lora-query/Makefile | 75 ---------------------- recipes-connectivity/lora/lora-query_1.0.4.bb | 22 ------- recipes-connectivity/lora/lora-query_1.0.6.bb | 22 +++++++ recipes-connectivity/mbedtls/mbedtls_2.13.0.bb | 42 ++++++++++++ 9 files changed, 119 insertions(+), 198 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch delete mode 100644 recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch delete mode 100644 recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch delete mode 100644 recipes-connectivity/lora/lora-basic-station_2.0.3.bb create mode 100644 recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb delete mode 100644 recipes-connectivity/lora/lora-query/Makefile delete mode 100644 recipes-connectivity/lora/lora-query_1.0.4.bb create mode 100644 recipes-connectivity/lora/lora-query_1.0.6.bb create mode 100644 recipes-connectivity/mbedtls/mbedtls_2.13.0.bb diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch deleted file mode 100644 index d81d041..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/sx1301conf.c b/src/sx1301conf.c -index bca649c..c2681a4 100644 ---- a/src/sx1301conf.c -+++ b/src/sx1301conf.c -@@ -433,7 +433,10 @@ int sx1301conf_start (struct sx1301conf* sx1301conf, u4_t cca_region) { - } - - LOG(MOD_RAL|INFO, "Station device: %s (PPS capture %sabled)", sx1301conf->device, sx1301conf->pps ? "en":"dis"); -+ -+#ifndef CFG_prod - lgwx_device_mode = sys_deviceMode; -+#endif - int err = lgw_start(); - if( err == LGW_HAL_SUCCESS ) { - lgw_reg_w(LGW_GPS_EN, sx1301conf->pps ? 1 : 0); diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch deleted file mode 100644 index c534460..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/sx1301conf.c b/src/sx1301conf.c -index bca649c..fe62351 100644 ---- a/src/sx1301conf.c -+++ b/src/sx1301conf.c -@@ -193,7 +193,8 @@ static void parse_sx1301_conf (ujdec_t* D, struct sx1301conf* sx1301conf) { - break; - } - case J_clksrc: { - sx1301conf->boardconf.clksrc = uj_intRange(D, 0, LGW_RF_CHAIN_NB-1); -+ sx1301conf->boardconf.clksrc = 0; - break; - } - case J_tx_gain_lut: { - diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch deleted file mode 100644 index 83be080..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src-linux/sys_linux.c b/src-linux/sys_linux.c -index f8286c8..7afc073 100644 ---- a/src-linux/sys_linux.c -+++ b/src-linux/sys_linux.c -@@ -724,7 +724,7 @@ static int parseStationConf () { - case J_nodc: - case J_nodwell: - case J_device_mode: { -- LOG(MOD_S2E|WARNING, "Feature not supported in production level code (station.conf) - ignored: %s", D->field.name); -- uj_skipValue(D); -+ LOG(MOD_S2E|WARNING, "Feature not supported in production level code (station.conf) - ignored: %s", D.field.name); -+ uj_skipValue(&D); - break; - } diff --git a/recipes-connectivity/lora/lora-basic-station_2.0.3.bb b/recipes-connectivity/lora/lora-basic-station_2.0.3.bb deleted file mode 100644 index 2db6a14..0000000 --- a/recipes-connectivity/lora/lora-basic-station_2.0.3.bb +++ /dev/null @@ -1,58 +0,0 @@ -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" -} diff --git a/recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb b/recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb new file mode 100644 index 0000000..f0df90b --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb @@ -0,0 +1,55 @@ +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 = "${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/basicstation.git;protocol=git;branch=master \ + file://setup.gmk \ + file://lora-basic-station.init \ + file://lora-basic-station.default \ + file://tc.uri \ +" + + +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" +} diff --git a/recipes-connectivity/lora/lora-query/Makefile b/recipes-connectivity/lora/lora-query/Makefile deleted file mode 100644 index 2079a0d..0000000 --- a/recipes-connectivity/lora/lora-query/Makefile +++ /dev/null @@ -1,75 +0,0 @@ - -includedir ?= /usr/include -libdir ?= /usr/lib - -CFLAGS += - -LIBS := -lmts -ljsoncpp -lpthread - -OBJS += \ -Version.o \ -main.o - -CPP_DEPS += \ -Version.d \ -main.d - - -all: postbuild - -prebuild: - @echo PRE-BUILD - @echo 'Removing previous version components started' - -$(RM) Version.o - -$(RM) Version.d - -$(RM) Version.cpp - @echo 'Removing previous version components complete' - @echo ' ' - -postbuild: mainbuild - @echo POST-BUILD - @echo ' ' - -mainbuild: prebuild - @echo MAIN-BUILD - @$(MAKE) --no-print-directory target - -target: $(OBJS) - @echo 'Building target: $@' - $(CXX) $(CFLAGS) $(LDFLAGS) -o lora-query $(OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -Version.o: Version.cpp - @echo 'Building file: $<' - $(CXX) $(CFLAGS) -Iinclude -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - -Version.cpp: - @echo 'Creating file: Version.cpp' - /bin/echo -e "//Pre-Build Auto-Generated Source\n#include \"Version.h\"\n\nconst std::string Version::version(\"$(shell git describe)\");" > Version.cpp - @echo 'Finished creating: Version.cpp' - @echo ' ' - -main.o: main.cpp - @echo 'Building file: $<' - $(CXX) $(CFLAGS) -I=$(includedir)/jsoncpp -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - -install: - install -d $(DESTDIR)/usr/bin - install -m 0755 lora-query $(DESTDIR)/usr/bin - -strip: - $(STRIP) lora-query - -clean: - -$(RM) $(OBJS) $(CPP_DEPS) lora-query - -@echo ' ' - -.PHONY: all clean dependents install strip target -.SECONDARY: - - diff --git a/recipes-connectivity/lora/lora-query_1.0.4.bb b/recipes-connectivity/lora/lora-query_1.0.4.bb deleted file mode 100644 index 60bcc42..0000000 --- a/recipes-connectivity/lora/lora-query_1.0.4.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "LoRa network server query tool" -HOMEPAGE = "http://www.multitech.net/" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" -DEPENDS = "jsoncpp libmts" -RDEPENDS_${PN} += "jsoncpp" -PR = "r2" - -SRCREV = "${PV}" - -SRC_URI = "git://git.multitech.net/lora-query;branch=master" - -S = "${WORKDIR}/git" - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake install DESTDIR=${D} -} - diff --git a/recipes-connectivity/lora/lora-query_1.0.6.bb b/recipes-connectivity/lora/lora-query_1.0.6.bb new file mode 100644 index 0000000..60bcc42 --- /dev/null +++ b/recipes-connectivity/lora/lora-query_1.0.6.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "LoRa network server query tool" +HOMEPAGE = "http://www.multitech.net/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" +DEPENDS = "jsoncpp libmts" +RDEPENDS_${PN} += "jsoncpp" +PR = "r2" + +SRCREV = "${PV}" + +SRC_URI = "git://git.multitech.net/lora-query;branch=master" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + diff --git a/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb b/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb new file mode 100644 index 0000000..ff3f7f0 --- /dev/null +++ b/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb @@ -0,0 +1,42 @@ +SUMMARY = "Lightweight crypto and SSL/TLS library" +DESCRIPTION = "mbedtls is a lean open source crypto library \ +for providing SSL and TLS support in your programs. It offers \ +an intuitive API and documented header files, so you can actually \ +understand what the code does. It features: \ + \ + - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ + Camellia and XTEA \ + - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ + - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ + - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ + ECDSA and ECDH \ + - SSL v3 and TLS 1.0, 1.1 and 1.2 \ + - Abstraction layers for ciphers, hashes, public key operations, \ + platform abstraction and threading \ +" + +HOMEPAGE = "https://tls.mbed.org/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a" + +SECTION = "libs" + +SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz" + +SRC_URI[md5sum] = "659d96bb03012ca6db414a9137fcdbd6" +SRC_URI[sha256sum] = "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da" + +inherit cmake + +PACKAGECONFIG ??= "shared-libs programs" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" + +EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}" + +PROVIDES += "polarssl" +RPROVIDES_${PN} = "polarssl" + +PACKAGES =+ "${PN}-programs" +FILES_${PN}-programs = "${bindir}/" -- cgit v1.2.3