From 1c0b31528970a181327ff9309e3efd1e8c625ff0 Mon Sep 17 00:00:00 2001 From: Bastian Bittorf Date: Tue, 8 Oct 2013 21:53:12 +0200 Subject: [PATCH] batman-adv: tweak the Makefile for dynamically patch 'main.h' via 'sed' by inserting '#undef CONFIG_MODULE_STRIPPED' - so the intelligent OpenWrt-optimizer will not destroy important module-metadata. remove the old patch which does the same, but needed rebasing everything main.h changes. compile and run-tested on ar71xx --- batman-adv/Makefile | 7 ++++ ...atman-adv-avoid-openwrt_metadata_stripping | 33 ------------------- 2 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 batman-adv/patches/0001-batman-adv-avoid-openwrt_metadata_stripping diff --git a/batman-adv/Makefile b/batman-adv/Makefile index b23abed..eda923f 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -114,6 +114,13 @@ define Build/Patch $(BATCTL_PATCH) endef +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) '/#define _NET_BATMAN_ADV_MAIN_H_/a\#undef CONFIG_MODULE_STRIPPED' \ + $(PKG_BUILD_DIR)/main.h +endef + + define Build/Compile $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_BATMAN_ADV_ARGS) $(BATCTL_BUILD) diff --git a/batman-adv/patches/0001-batman-adv-avoid-openwrt_metadata_stripping b/batman-adv/patches/0001-batman-adv-avoid-openwrt_metadata_stripping deleted file mode 100644 index 471a7ae..0000000 --- a/batman-adv/patches/0001-batman-adv-avoid-openwrt_metadata_stripping +++ /dev/null @@ -1,33 +0,0 @@ -Date: Fri, 6 Sep 2013 15:14:41 +0200 -From: Antonio Quartulli -To: b.a.t.m.a.n@lists.open-mesh.org -Cc: Antonio Quartulli -Subject: [B.A.T.M.A.N.] [PATCH openwrt-feed only] batman-adv: fix metadata stripping - -a new optimisation in openwrt is stripping some metadata information, invluding -the module version which is used by batctl to tell the user which version -batman-adv the node is currently running. - -Un-define this constant to prevent the metadata from being stripped - -Signed-off-by: Antonio Quartulli ---- - main.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/main.h b/main.h -index 834b1a0..b329e79 100644 ---- a/main.h -+++ b/main.h -@@ -20,6 +20,8 @@ - #ifndef _NET_BATMAN_ADV_MAIN_H_ - #define _NET_BATMAN_ADV_MAIN_H_ - -+#undef CONFIG_MODULE_STRIPPED -+ - #define BATADV_DRIVER_AUTHOR "Marek Lindner , " \ - "Simon Wunderlich " - #define BATADV_DRIVER_DESC "B.A.T.M.A.N. advanced" --- -1.8.1.5 - -- 2.30.2