From d79eeefa1cecfe088b687c64d7fd8be7d57fe334 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 19:58:25 +0100 Subject: [PATCH 1/9] alfred: upgrade package to latest release 2020.0 * fix build against gpsd API 9.0 Signed-off-by: Sven Eckelmann --- alfred/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alfred/Makefile b/alfred/Makefile index 375b720..156e025 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alfred -PKG_VERSION:=2019.5 -PKG_RELEASE:=0 -PKG_HASH:=8a7b6e4e1ae5826671beb683013c5ffa4a1af005bf179a42e541cf84de8fd726 +PKG_VERSION:=2020.0 +PKG_RELEASE:=1 +PKG_HASH:=1505bcb235289baaad25a5001a0189e4f16e5c4f023db62a8682c0eb91b162c0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) From 6c4c46fc34739e4178dd6a489b8ed3a0c9aa4a99 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 19:58:58 +0100 Subject: [PATCH 2/9] batctl: upgrade package to latest release 2020.0 Signed-off-by: Sven Eckelmann --- batctl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/batctl/Makefile b/batctl/Makefile index cd2b354..c62e998 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batctl -PKG_VERSION:=2019.5 -PKG_RELEASE:=0 -PKG_HASH:=ffe5857a33068ec174140c154610d76d833524d840a2fc2d1a15e16686213cad +PKG_VERSION:=2020.0 +PKG_RELEASE:=1 +PKG_HASH:=60efe9b148f66aa1b29110493244dc9f1f1d722e6d96969e4d4b2c0ab9278104 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) From 05da6ef2ca59ed9b225c3d2874f15d53dda8d00c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 19:59:11 +0100 Subject: [PATCH 3/9] batman-adv: upgrade package to latest release 2020.0 * support latest kernels (3.16 - 5.6) * coding style cleanups and refactoring * use wifi tx rates as fallback for the B.A.T.M.A.N. V throughput estimation * disable deprecated sysfs support by default * bugs squashed: - fix crash during the scheduling of OGMs for removed interfaces Signed-off-by: Sven Eckelmann --- batman-adv/Config.in | 1 - batman-adv/Makefile | 6 +++--- batman-adv/src/compat-hacks.h | 9 +++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/batman-adv/Config.in b/batman-adv/Config.in index 8995cdb..70cc48f 100644 --- a/batman-adv/Config.in +++ b/batman-adv/Config.in @@ -89,7 +89,6 @@ config BATMAN_ADV_DEBUG config BATMAN_ADV_SYSFS bool "batman-adv sysfs entries" depends on PACKAGE_kmod-batman-adv - default y help Say Y here if you want to enable batman-adv device configuration and status interface through sysfs attributes. It is replaced by the diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 44a6e4b..88f4cde 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv -PKG_VERSION:=2019.5 -PKG_RELEASE:=0 -PKG_HASH:=29fd11b07842f40fee1782bf7ea512278fc4e483bac3c52cf74f8af0f6fe28ec +PKG_VERSION:=2020.0 +PKG_RELEASE:=1 +PKG_HASH:=a12a32d1ec65b94b54ca86e6f31ac1b947bf04449aad0c96dfe936746bd0c585 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 2085767..fd6cfe1 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -17,6 +17,15 @@ #endif /* < KERNEL_VERSION(4, 15, 0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + +#ifndef sizeof_field +#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) +#endif + +#endif /* < KERNEL_VERSION(4, 16, 0) */ + + #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) #include_next From bacc8c1385b1b60824d72c82f1ea7894d6a4472e Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 20:05:58 +0100 Subject: [PATCH 4/9] batman-adv: Drop compat code for Linux < 4.14 The lowest kernel version supported by OpenWrt at the moment is Linux 4.14. It is therefore not required to have these dead code sections anymore. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index fd6cfe1..b57f7b6 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -64,40 +64,6 @@ static inline int batadv_ip_mc_check_igmp2(struct sk_buff *skb, #endif /* < KERNEL_VERSION(5, 1, 0) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - -#include_next - -/* hack for netlink.c which marked the family ops as ro */ -#ifdef __ro_after_init -#undef __ro_after_init -#endif -#define __ro_after_init - -#endif /* < KERNEL_VERSION(4, 10, 0) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 9) - -#include - -/* work around missing attribute needs_free_netdev and priv_destructor in - * net_device - */ -#define ether_setup(dev) \ - void batadv_softif_free2(struct net_device *dev) \ - { \ - batadv_softif_free(dev); \ - free_netdev(dev); \ - } \ - void (*t1)(struct net_device *dev) __attribute__((unused)); \ - bool t2 __attribute__((unused)); \ - ether_setup(dev) -#define needs_free_netdev destructor = batadv_softif_free2; t2 -#define priv_destructor destructor = batadv_softif_free2; t1 - -#endif /* < KERNEL_VERSION(4, 11, 9) */ - - #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #define batadv_softif_slave_add(__dev, __slave_dev, __extack) \ From 00de979415ae4897dd722df02209807e7fd03e67 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 20:14:58 +0100 Subject: [PATCH 5/9] batman-adv: replace SUBDIRS with M kernel build recipe The SUBDIRS variable has been removed in kernel 5.4 and M or KBUILD_EXTMOD has to be used instead. Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 88f4cde..a81f3cc 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -88,7 +88,7 @@ define Build/Compile $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)/net/batman-adv" \ + M="$(PKG_BUILD_DIR)/net/batman-adv" \ $(PKG_EXTRA_KCONFIG) \ EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ From b3f1370d9a445872795fd1f62fff8430b89b1252 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 21:59:30 +0100 Subject: [PATCH 6/9] alfred: Switch to OpenWrt package template The OpenWrt routing feed was tried to be merged together with the OpenWrt package feed. But they ended up being rejected due to formalities like the slightly different package template. Just moving to the OpenWrt package based one should simplify similar approaches in the future. Signed-off-by: Sven Eckelmann --- alfred/Makefile | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/alfred/Makefile b/alfred/Makefile index 156e025..e93e3d7 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -1,48 +1,45 @@ -# -# Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only include $(TOPDIR)/rules.mk PKG_NAME:=alfred PKG_VERSION:=2020.0 PKG_RELEASE:=1 -PKG_HASH:=1505bcb235289baaad25a5001a0189e4f16e5c4f023db62a8682c0eb91b162c0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) +PKG_HASH:=1505bcb235289baaad25a5001a0189e4f16e5c4f023db62a8682c0eb91b162c0 + +PKG_MAINTAINER:=Simon Wunderlich PKG_LICENSE:=GPL-2.0-only MIT PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT include $(INCLUDE_DIR)/package.mk define Package/alfred - URL:=https://www.open-mesh.org/ SECTION:=net CATEGORY:=Network TITLE:=A.L.F.R.E.D. - Almighty Lightweight Fact Remote Exchange Daemon + URL:=https://www.open-mesh.org/ DEPENDS:= +libc @IPV6 +libnl-tiny +librt \ - +ALFRED_NEEDS_lua:lua \ - +ALFRED_NEEDS_libgps:libgps + +ALFRED_NEEDS_lua:lua \ + +ALFRED_NEEDS_libgps:libgps endef define Package/alfred/description -alfred is a user space daemon for distributing arbitrary local information over -the mesh/network in a decentralized fashion. This data can be anything which -appears to be useful - originally designed to replace the batman-adv -visualization (vis), you may distribute hostnames, phone books, administration -information, DNS information, the local weather forecast ... + alfred is a user space daemon for distributing arbitrary local information + over the mesh/network in a decentralized fashion. This data can be anything + which appears to be useful - originally designed to replace the batman-adv + visualization (vis), you may distribute hostnames, phone books, administration + information, DNS information, the local weather forecast ... -alfred runs as daemon in the background of the system. A user may insert -information by using the alfred binary on the command line, or use special -programs to communicate with alfred (done via unix sockets). alfred then takes -care of distributing the local information to other alfred servers on other -nodes. This is done via IPv6 link-local multicast, and does not require any -configuration. A user can request data from alfred, and will receive the -information available from all alfred servers in the network. + alfred runs as daemon in the background of the system. A user may insert + information by using the alfred binary on the command line, or use special + programs to communicate with alfred (done via unix sockets). alfred then takes + care of distributing the local information to other alfred servers on other + nodes. This is done via IPv6 link-local multicast, and does not require any + configuration. A user can request data from alfred, and will receive the + information available from all alfred servers in the network. endef define Package/alfred/conffiles From 4561a42ac42366d3672b00bd346268a02f457479 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 21:59:30 +0100 Subject: [PATCH 7/9] batctl: Switch to OpenWrt package template The OpenWrt routing feed was tried to be merged together with the OpenWrt package feed. But they ended up being rejected due to formalities like the slightly different package template. Just moving to the OpenWrt package based one should simplify similar approaches in the future. Signed-off-by: Sven Eckelmann --- batctl/Makefile | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/batctl/Makefile b/batctl/Makefile index c62e998..4eb147b 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -1,41 +1,35 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only include $(TOPDIR)/rules.mk PKG_NAME:=batctl - PKG_VERSION:=2020.0 PKG_RELEASE:=1 -PKG_HASH:=60efe9b148f66aa1b29110493244dc9f1f1d722e6d96969e4d4b2c0ab9278104 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) +PKG_HASH:=60efe9b148f66aa1b29110493244dc9f1f1d722e6d96969e4d4b2c0ab9278104 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_MAINTAINER:=Simon Wunderlich PKG_LICENSE:=GPL-2.0-only ISC MIT PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT LICENSES/deprecated/ISC -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk define Package/batctl/Default - URL:=https://www.open-mesh.org/ SECTION:=net CATEGORY:=Network + URL:=https://www.open-mesh.org/ DEPENDS:=+libnl-tiny +libc +librt PROVIDES:=batctl - MAINTAINER:=Simon Wunderlich endef define Package/batctl/description -batctl is a more intuitive managment utility for B.A.T.M.A.N.-Advanced. -It is an easier method for configuring batman-adv and provides some -additional tools for debugging as well. This package builds -version $(PKG_VERSION) of the user space utility. + batctl is a more intuitive managment utility for B.A.T.M.A.N.-Advanced. + It is an easier method for configuring batman-adv and provides some + additional tools for debugging as well. This package builds + version $(PKG_VERSION) of the user space utility. endef define Package/batctl-tiny @@ -48,7 +42,7 @@ endef define Package/batctl-tiny/description $(Package/batctl/description) -Only configuration relevant subcommands are enabled. + Only configuration relevant subcommands are enabled. endef define Package/batctl-default @@ -60,7 +54,7 @@ endef define Package/batctl-default/description $(Package/batctl/description) -Standard subcommands for configuration and online debugging are enabled. + Standard subcommands for configuration and online debugging are enabled. endef define Package/batctl-full @@ -72,7 +66,7 @@ endef define Package/batctl-full/description $(Package/batctl/description) -Subcommands for configuration, online and offline debugging are enabled. + Subcommands for configuration, online and offline debugging are enabled. endef # The linker can identify unused sections of a binary when each symbol is stored From cc0ce25bb023d6d267b6b18bd9458a8539e4663e Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 6 Mar 2020 21:59:30 +0100 Subject: [PATCH 8/9] batman-adv: Switch to OpenWrt package template The OpenWrt routing feed was tried to be merged together with the OpenWrt package feed. But they ended up being rejected due to formalities like the slightly different package template. Just moving to the OpenWrt package based one should simplify similar approaches in the future. Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index a81f3cc..0b86592 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -1,23 +1,19 @@ -# -# Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv - PKG_VERSION:=2020.0 PKG_RELEASE:=1 -PKG_HASH:=a12a32d1ec65b94b54ca86e6f31ac1b947bf04449aad0c96dfe936746bd0c585 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) +PKG_HASH:=a12a32d1ec65b94b54ca86e6f31ac1b947bf04449aad0c96dfe936746bd0c585 +PKG_EXTMOD_SUBDIRS:=net/batman-adv + +PKG_MAINTAINER:=Simon Wunderlich PKG_LICENSE:=GPL-2.0-only MIT PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT -PKG_EXTMOD_SUBDIRS=net/batman-adv STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h @@ -25,22 +21,21 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk define KernelPackage/batman-adv - URL:=https://www.open-mesh.org/ - MAINTAINER:=Simon Wunderlich SUBMENU:=Network Support - DEPENDS:=+BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-lib-crc32c +kmod-cfg80211 +batctl TITLE:=B.A.T.M.A.N. Adv + URL:=https://www.open-mesh.org/ + DEPENDS:=+BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-lib-crc32c +kmod-cfg80211 +batctl FILES:=$(PKG_BUILD_DIR)/net/batman-adv/batman-adv.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoProbe,batman-adv) endef define KernelPackage/batman-adv/description -B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is -a routing protocol for multi-hop ad-hoc mesh networks. The -networks may be wired or wireless. See -https://www.open-mesh.org/ for more information and user space -tools. This package builds version $(PKG_VERSION) of the kernel -module. + B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is + a routing protocol for multi-hop ad-hoc mesh networks. The + networks may be wired or wireless. See + https://www.open-mesh.org/ for more information and user space + tools. This package builds version $(PKG_VERSION) of the kernel + module. endef define KernelPackage/batman-adv/config From e002648835d52de89ce240f6a4c85c9a185bc6fe Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 7 Mar 2020 18:52:16 +0100 Subject: [PATCH 9/9] batctl: Drop duplicated PROVIDES for batctl-tiny The PROVIDES:=batctl is also set by Package/batctl/Default and doesn't have to be duplicated for Package/batctl-tiny (which inherits from Package/batctl/Default). Signed-off-by: Sven Eckelmann --- batctl/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/batctl/Makefile b/batctl/Makefile index 4eb147b..196813d 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -36,7 +36,6 @@ define Package/batctl-tiny $(call Package/batctl/Default) TITLE:=B.A.T.M.A.N. Advanced user space configuration tool (Minimal) VARIANT:=tiny - PROVIDES:=batctl ALTERNATIVES:=100:/usr/sbin/batctl:/usr/libexec/batctl-tiny endef