From a9a4b04b986e80bfb7da57bf64b9168c568f3d0b Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 10:42:12 +0200 Subject: [PATCH 1/9] batman-adv: Rebuild automatically on mac80211 changes Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index b1e3bf2..1f68cdc 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -17,6 +17,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 +STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h + include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk From 3d5c2d06b6722c1428cdc60c2e703d10f1c94ab6 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 14 Oct 2018 16:01:46 +0200 Subject: [PATCH 2/9] batman-adv: Add DEBUG_LOG -> DEBUGFS dependency The debug log is only available when the debugfs is also enabled. This must be reflected in Kconfig to avoid incompatible selection of batman-adv options. Signed-off-by: Sven Eckelmann --- batman-adv/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/batman-adv/Config.in b/batman-adv/Config.in index 1b2399f..d45ad57 100644 --- a/batman-adv/Config.in +++ b/batman-adv/Config.in @@ -2,6 +2,7 @@ config KMOD_BATMAN_ADV_DEBUG_LOG bool "enable verbose debug logging" depends on PACKAGE_kmod-batman-adv + depends on KMOD_BATMAN_ADV_DEBUGFS default n config KMOD_BATMAN_ADV_BLA From 059d7266a93bd307a69db8684babec54abf8e9ef Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 19 Jun 2018 12:21:30 +0200 Subject: [PATCH 3/9] batman-adv: Remove unused option "interfaces" in config Signed-off-by: Sven Eckelmann --- batman-adv/files/etc/config/batman-adv | 1 - 1 file changed, 1 deletion(-) diff --git a/batman-adv/files/etc/config/batman-adv b/batman-adv/files/etc/config/batman-adv index 97be622..6e6017a 100644 --- a/batman-adv/files/etc/config/batman-adv +++ b/batman-adv/files/etc/config/batman-adv @@ -18,4 +18,3 @@ config 'mesh' 'bat0' # yet another batX instance # config 'mesh' 'bat5' -# option 'interfaces' 'second_mesh' From b9656fb31ec8c806cd58a72a970bd14c464ea309 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 13:20:30 +0200 Subject: [PATCH 4/9] batman-adv: Fix search for cfg80211 module symbols The Module.symvers with the exported symbols of all other kernel modules in OpenWrt is usually placed in the main source directory of the package. But the actual sources for batman-adv are found in net/batman-adv. OpenWrt must therefore be informed to move it to this subdirectory or otherwise modpost will fail to find the symbols WARNING: "cfg80211_get_station" [.../batman-adv-2018.1/net/batman-adv/batman-adv.ko] undefined! The dependency will then be missing in the .modinfo depends= option and thus it the kernel module loader will not correctly load the cfg80211.ko during bootup. Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 1f68cdc..e261015 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -16,6 +16,7 @@ PKG_HASH:=b866b28dbbe5c9238abbdf5abbc30fc526dea56898ce4c1bd76d5c017843048b PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 +PKG_EXTMOD_SUBDIRS=net/batman-adv STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h From 1ba424a4d040210fdded11a7d6848f9b82857918 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 5 Jun 2018 14:28:39 +0200 Subject: [PATCH 5/9] batman-adv: Load module with AutoProbe cfg80211 is loaded by kmodloader after the modules with a priority (AutoLoad) are loaded. batman-adv should therefore also be loaded at that time and must not load cfg80211 itself. The information in the ELF header are enough for kmodloader to load these two modules in the correct order. 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 e261015..97f8cb1 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -30,7 +30,7 @@ define KernelPackage/batman-adv DEPENDS:=+KMOD_BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-crypto-crc32c +kmod-lib-crc32c +kmod-cfg80211 TITLE:=B.A.T.M.A.N. Adv FILES:=$(PKG_BUILD_DIR)/net/batman-adv/batman-adv.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoLoad,50,cfg80211 batman-adv) + AUTOLOAD:=$(call AutoProbe,batman-adv) endef define KernelPackage/batman-adv/description From 1a83b56d4749a662cca5565a0203c7d9249f6938 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 6/9] batman-adv: Add openwrt revision to internal version OpenWrt is using a modified version of the software and these modifications may introduce extra bugs (or behavior changes). It is also patched for stable releases instead of switching to new releases. The revision should therefore be added to the version number to make it easier understandable which modified version the user may have installed. Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 97f8cb1..69e800a 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv PKG_VERSION:=2018.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_HASH:=b866b28dbbe5c9238abbdf5abbc30fc526dea56898ce4c1bd76d5c017843048b PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -69,7 +69,8 @@ NOSTDINC_FLAGS = \ -I$(STAGING_DIR)/usr/include/mac80211/uapi \ -I$(PKG_BUILD_DIR)/include/ \ -include backport/backport.h \ - -include $(PKG_BUILD_DIR)/compat-hacks.h + -include $(PKG_BUILD_DIR)/compat-hacks.h \ + -DBATADV_SOURCE_VERSION=\\\"openwrt-$(PKG_VERSION)-$(PKG_RELEASE)\\\" COMPAT_SOURCES = \ $(if $(CONFIG_KMOD_BATMAN_ADV_MCAST),../../compat-sources/net/core/skbuff.o,) \ From 93cce266fe3fc402a3e7ef8eaa063465cfb0d9a7 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 7/9] batctl: Add openwrt revision to internal version OpenWrt is using a modified version of the software and these modifications may introduce extra bugs (or behavior changes). It is also patched for stable releases instead of switching to new releases. The revision should therefore be added to the version number to make it easier understandable which modified version the user may have installed. Signed-off-by: Sven Eckelmann --- batctl/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/batctl/Makefile b/batctl/Makefile index ae878a6..66cb55d 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batctl PKG_VERSION:=2018.1 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_HASH:=27877d0da6916f88a6cecbbb3f3d23cc4558ef7c7294324bf4fd050ed606b553 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -62,7 +62,8 @@ MAKE_BATCTL_ARGS += \ REVISION="$(PKG_BATCTL_SHORTREV)" \ CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - batctl install + batctl install \ + REVISION="openwrt-$(PKG_VERSION)-$(PKG_RELEASE)" define Build/Compile From 95e56cf644dcb8501c1e443a57b70141a32d5a7a Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 8/9] alfred: Add openwrt revision to internal version OpenWrt is using a modified version of the software and these modifications may introduce extra bugs (or behavior changes). It is also patched for stable releases instead of switching to new releases. The revision should therefore be added to the version number to make it easier understandable which modified version the user may have installed. Signed-off-by: Sven Eckelmann --- alfred/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alfred/Makefile b/alfred/Makefile index a0d25a5..ef260ad 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alfred PKG_VERSION:=2018.1 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_HASH:=808fa6acf65c7a8e26405115176a5587157f746108cbe5dd974788eb05416d76 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -59,7 +59,8 @@ MAKE_ALFRED_FLAGS=\ CONFIG_ALFRED_GPSD=$(if $(CONFIG_PACKAGE_ALFRED_GPSD),y,n) \ CONFIG_ALFRED_CAPABILITIES=n \ LIBNL_NAME="libnl-tiny" \ - LIBNL_GENL_NAME="libnl-tiny" + LIBNL_GENL_NAME="libnl-tiny" \ + REVISION="openwrt-$(PKG_VERSION)-$(PKG_RELEASE)" TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin From 121c92d669ee2e9bbb2693a6c6eeaa7d28397141 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 16:11:48 +0200 Subject: [PATCH 9/9] batctl: Don't overwrite default PKG_BUILD_DIR There is no benefit to overwrite the PKG_BUILD_DIR directory for batctl. As seen with kmod-batman-adv, it actually can also break the build. Signed-off-by: Sven Eckelmann --- batctl/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/batctl/Makefile b/batctl/Makefile index 66cb55d..4e67512 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -17,8 +17,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk define Package/batctl