From c2b980177d7e222dcadbdf0bd96f39d5e892184a Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Thu, 29 Aug 2024 10:26:41 +0200 Subject: [PATCH] remove upstreamed packages, which are now in the community-packages --- ffac-mt7915-hotfix/LICENSE | 21 ------ ffac-mt7915-hotfix/Makefile | 23 ------ ffac-mt7915-hotfix/README.md | 34 --------- .../files/lib/gluon/mt7915/reboot-on-error.sh | 12 --- .../files/usr/lib/micron.d/mt7915-hotfix | 2 - ffac-update-location-gps/Makefile | 22 ------ ffac-update-location-gps/README.md | 11 --- .../files/etc/config/update-location-gps | 2 - .../etc/hotplug.d/usb/10-update-location-gps | 26 ------- .../luasrc/usr/bin/update-location-gps | 73 ------------------- 10 files changed, 226 deletions(-) delete mode 100644 ffac-mt7915-hotfix/LICENSE delete mode 100644 ffac-mt7915-hotfix/Makefile delete mode 100644 ffac-mt7915-hotfix/README.md delete mode 100755 ffac-mt7915-hotfix/files/lib/gluon/mt7915/reboot-on-error.sh delete mode 100644 ffac-mt7915-hotfix/files/usr/lib/micron.d/mt7915-hotfix delete mode 100644 ffac-update-location-gps/Makefile delete mode 100644 ffac-update-location-gps/README.md delete mode 100644 ffac-update-location-gps/files/etc/config/update-location-gps delete mode 100644 ffac-update-location-gps/files/etc/hotplug.d/usb/10-update-location-gps delete mode 100755 ffac-update-location-gps/luasrc/usr/bin/update-location-gps diff --git a/ffac-mt7915-hotfix/LICENSE b/ffac-mt7915-hotfix/LICENSE deleted file mode 100644 index fd31e5e..0000000 --- a/ffac-mt7915-hotfix/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Felix Baumann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/ffac-mt7915-hotfix/Makefile b/ffac-mt7915-hotfix/Makefile deleted file mode 100644 index 2d87196..0000000 --- a/ffac-mt7915-hotfix/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Felix Baumann (FFAC) -# SPDX-License-Identifier: MIT -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffac-mt7915-hotfix -PKG_VERSION:=1 -PKG_RELEASE:=1 - -PKG_LICENSE:=MIT - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/../package/gluon.mk - -define Package/$(PKG_NAME) - SECTION:=gluon - CATEGORY:=Gluon - TITLE:=reboot device if mt7915e driver shows known failure symptom - DEPENDS:=@(TARGET_mediatek_filogic||TARGET_ramips_mt7621||TARGET_mediatek_mt7622) kmod-mt7915e +gluon-core +micrond - MAINTAINER:=Freifunk Aachen -endef - -$(eval $(call BuildPackageGluon,$(PKG_NAME))) diff --git a/ffac-mt7915-hotfix/README.md b/ffac-mt7915-hotfix/README.md deleted file mode 100644 index 98e63b4..0000000 --- a/ffac-mt7915-hotfix/README.md +++ /dev/null @@ -1,34 +0,0 @@ -mt7915 hotfix -============= - -This script reboots the device if the mt7915-firmware hangs on ramips-mt7621 -and mediatek-filogic. It's meant as a hotfix for the mcu timeout issue: -https://github.com/freifunk-gluon/gluon/issues/3154 -The issue popped up with Gluon v2023.2, earlier releases are not affected. - -Create a file `modules` with the following content in your `./gluon/site/` -directory and add these lines: - -``` -GLUON_SITE_FEEDS="community" -PACKAGES_COMMUNITY_REPO=https://github.com/freifunk-gluon/community-packages.git -PACKAGES_COMMUNITY_COMMIT=*/missing/* -PACKAGES_COMMUNITY_BRANCH=master -``` - -Now you can add the package `ffac-mt7915-hotfix` to your site.mk -(`*/missing/*` has to be replaced by the github-commit-ID of the version you -want to use, you have to pick it manually.) - -Further info on the issue this tries to prevent from happening: -I've seen the MCU timeout issue happening as early as 16 hours of uptime. -MCU timeouts result in WiFi not working. WiFi mesh nodes running into the -issue go offline until they are rebooted manually while any wired node is -still accessible via ssh. - -On most devices it will take days or weeks for this issue to manifest, -while others are affected daily. This is due to the difference in clients -that are connecting to it on a frequent base. The more people frequent -the device the more probable it is to go offline. - -Also see https://github.com/freifunk-gluon/gluon/issues/3154 diff --git a/ffac-mt7915-hotfix/files/lib/gluon/mt7915/reboot-on-error.sh b/ffac-mt7915-hotfix/files/lib/gluon/mt7915/reboot-on-error.sh deleted file mode 100755 index 9890cb3..0000000 --- a/ffac-mt7915-hotfix/files/lib/gluon/mt7915/reboot-on-error.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -if ls /sys/kernel/debug/ieee80211/phy*/mt76/rf_regval > /dev/null && ! cat /sys/kernel/debug/ieee80211/phy*/mt76/rf_regval > /dev/null; then - logger -s -t "ffac-mt7915-hotfix" -p err "wifi firmware crashed, scheduled reboot in 5 seconds" - sleep 5 - # Autoupdate? - upgrade_started='/tmp/autoupdate.lock' - if [ -f $upgrade_started ] ; then - logger -s -t "ffac-mt7915-hotfix" -p 5 "Autoupdate running! Aborting" - exit 2 - fi - reboot -fi diff --git a/ffac-mt7915-hotfix/files/usr/lib/micron.d/mt7915-hotfix b/ffac-mt7915-hotfix/files/usr/lib/micron.d/mt7915-hotfix deleted file mode 100644 index 359d689..0000000 --- a/ffac-mt7915-hotfix/files/usr/lib/micron.d/mt7915-hotfix +++ /dev/null @@ -1,2 +0,0 @@ -# run every second minute -*/2 * * * * /lib/gluon/mt7915/reboot-on-error.sh diff --git a/ffac-update-location-gps/Makefile b/ffac-update-location-gps/Makefile deleted file mode 100644 index 19bd926..0000000 --- a/ffac-update-location-gps/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Florian Maurer, xelo -# SPDX-License-Identifier: MIT -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffac-update-location-gps -PKG_VERSION:=1.0 -PKG_RELEASE:=1 - -PKG_LICENSE:=MIT - -include $(TOPDIR)/../package/gluon.mk - -define Package/$(PKG_NAME) - TITLE:=Use attached GPS controller to update location from it - DEPENDS:=+kmod-usb-core +kmod-usb-ohci +kmod-usb2 +kmod-usb-acm +kmod-usb-serial-pl2303 +micrond -endef - -define Package/$(PKG_NAME)/description - If enabled, this package updates the gluon-node-info location based on the NMEA output of an attached GPS device. -endef - -$(eval $(call BuildPackageGluon,$(PKG_NAME))) diff --git a/ffac-update-location-gps/README.md b/ffac-update-location-gps/README.md deleted file mode 100644 index d4a2685..0000000 --- a/ffac-update-location-gps/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# ffac-update-location-gps - -This package configures gluon to update the location based on tty output of an attached GPS device. - -When a USB device which provides a tty is attached, it updates the location based on the output of it. -This is done using a lua rewrite of the script from the original forum posting. - -Further information can be found here: - -* https://github.com/dmth/gluon-gps-locationupdate -* https://forum.freifunk.net/t/freifunk-location-update-via-gps/1493 \ No newline at end of file diff --git a/ffac-update-location-gps/files/etc/config/update-location-gps b/ffac-update-location-gps/files/etc/config/update-location-gps deleted file mode 100644 index cfc510d..0000000 --- a/ffac-update-location-gps/files/etc/config/update-location-gps +++ /dev/null @@ -1,2 +0,0 @@ -config settings 'settings' - option enabled '0' \ No newline at end of file diff --git a/ffac-update-location-gps/files/etc/hotplug.d/usb/10-update-location-gps b/ffac-update-location-gps/files/etc/hotplug.d/usb/10-update-location-gps deleted file mode 100644 index e215954..0000000 --- a/ffac-update-location-gps/files/etc/hotplug.d/usb/10-update-location-gps +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -TTYPATH="/sys${DEVPATH}/tty" -LOCKPATH="/tmp/update-location-gps" - -ENABLED=$(uci get update-location-gps.settings.enabled) - -if [ "${ACTION}" = "add" ]; then - [ "${ENABLED}" != "1" ] && exit 0 - test -e "${LOCKPATH}" && exit 0 - if test -e "${TTYPATH}"; then - TTY_NAME=$(find "${TTYPATH}" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sed -n 's|.*/tty/||p') - logger -t hotplug "USB GPS device was plugged in" - echo "${DEVPATH}" > "${LOCKPATH}" - echo "*/5 * * * * /usr/bin/update-location-gps /dev/${TTY_NAME} | logger -t update-location-gps" > "/usr/lib/micron.d/update-location-gps" - /etc/init.d/micrond restart - fi -fi - -if [ "${ACTION}" = "remove" ]; then - if [ "${DEVPATH}" = "$(cat ${LOCKPATH})" ]; then - logger -t hotplug "USB GPS device was removed" - rm -f "/usr/lib/micron.d/update-location-gps" - rm "${LOCKPATH}" - /etc/init.d/micrond restart - fi -fi \ No newline at end of file diff --git a/ffac-update-location-gps/luasrc/usr/bin/update-location-gps b/ffac-update-location-gps/luasrc/usr/bin/update-location-gps deleted file mode 100755 index 2a1b061..0000000 --- a/ffac-update-location-gps/luasrc/usr/bin/update-location-gps +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/lua - --- Get GPS device tty -local TTY_DEVICE = arg[1] - -local uci = require('simple-uci').cursor() - --- Use GPS as Stream -local file = io.open(TTY_DEVICE, "r") - -while true do - local this_line = file:read("*line") - if not this_line then break end -- Exit loop if no more lines - - local nc = this_line:match("^([^,]+)") - - if nc == '$GPRMC' then - local fields = {} - for field in this_line:gmatch("([^,]+)") do - table.insert(fields, field) - end - - local valid = fields[3] - - if valid == "A" then - -- First: Retrieve coordinate - local lat = fields[4] - local lon = fields[6] - - -- Second: Determine if coordinate is oriented North/South or East/West - local latdir = fields[5] - local londir = fields[7] - - -- Split DEGREES from coordinate - local latdeg = tonumber(lat:sub(1, 2)) - local londeg = tonumber(lon:sub(1, 3)) - - -- Split MINUTES.SECONDS from coordinate - local latmin = tonumber(lat:sub(3)) - local lonmin = tonumber(lon:sub(4)) - - -- Convert from Degree-Minutes to Decimal-Minutes - local latdec = latmin / 60 - local londec = lonmin / 60 - - -- Use negative notation instead of North/South or East/West - if latdir == 'S' then - latdeg = -latdeg - end - if londir == 'W' then - londeg = -londeg - end - lat = string.format("%f", latdeg + latdec) - lon = string.format("%f", londeg + londec) - - print("GPS position is valid Lat/Lon:", lat, lon) - -- set temp location in gluon-node-info - uci:set('gluon-node-info', '@location[0]', 'share_location', '1') - uci:set('gluon-node-info', '@location[0]', 'latitude', lat) - uci:set('gluon-node-info', '@location[0]', 'longitude', lon) - uci:save('gluon-node-info') - -- Link to Phip's comment: https://forum.freifunk.net/t/freifunk-location-update-via-gps/1493/2 - -- Committing here would wear out the nvram very fast, so it should not be done. - break - else - print("GPS position is Invalid...", valid) - break - end - end -end - -file:close() -os.exit(0) \ No newline at end of file