From 003607ac1e6337c9d0a7fa2bfe69a0b17390de0c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 10:42:12 +0200 Subject: [PATCH 1/6] 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 651d7c7..db4ed9d 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 8112737cdce195c40a9a942d84cd4102692ba75e Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 13:20:30 +0200 Subject: [PATCH 2/6] 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.3/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 db4ed9d..b6835d3 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -16,6 +16,7 @@ PKG_HASH:=33f3f942203732e0568a6bc0226a0fe8eb147c961f0d0c13b2e6b16237d412ff 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 542a63720f922e19b497b1d59508eae21eca42d6 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 3/6] 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 b6835d3..0d9aa77 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv PKG_VERSION:=2018.3 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_HASH:=33f3f942203732e0568a6bc0226a0fe8eb147c961f0d0c13b2e6b16237d412ff 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 c903a445a866746b7b7bdea9fd0cd3455a800e50 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 4/6] 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 832a8db..0b89941 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batctl PKG_VERSION:=2018.3 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_HASH:=24e32d3fe8268ce0951903546e71b925b78b17acc8809ba899940f48a5e892e6 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 373663067662ca389b85a56634d7785be5569215 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 11:10:05 +0200 Subject: [PATCH 5/6] 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 8ad7c92..f468abc 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alfred PKG_VERSION:=2018.3 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_HASH:=6265b8a3e99186ecb6e0cf7dde84fe8b67c66d9fefa6286f9f12110e98f28b1a 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 e6a8135faa3cd838f1123393115b3b2a2d14b0c8 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 7 Oct 2018 16:11:48 +0200 Subject: [PATCH 6/6] 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 0b89941..8765d15 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