diff --git a/alfred/Makefile b/alfred/Makefile index 535e712..2982265 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -18,8 +18,6 @@ PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk -init-y := alfred - define Package/alfred URL:=https://www.open-mesh.org/ SECTION:=net @@ -54,7 +52,7 @@ define Package/alfred/config source "$(SOURCE)/Config.in" endef -MAKE_ALFRED_FLAGS=\ +MAKE_FLAGS += \ CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n) \ CONFIG_ALFRED_GPSD=$(if $(CONFIG_PACKAGE_ALFRED_GPSD),y,n) \ CONFIG_ALFRED_CAPABILITIES=n \ @@ -65,12 +63,6 @@ MAKE_ALFRED_FLAGS=\ TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin -define Build/Compile - CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) $(MAKE_ALFRED_FLAGS) all -endef - define Package/alfred/install $(INSTALL_DIR) $(1)/usr/sbin cp -fpR $(PKG_BUILD_DIR)/alfred $(1)/usr/sbin/ diff --git a/batctl/Makefile b/batctl/Makefile index 7cbb9bd..25eff7d 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -88,18 +88,11 @@ TARGET_LDFLAGS += -Wl,--gc-sections TARGET_CFLAGS += -flto TARGET_LDFLAGS += -fuse-linker-plugin -MAKE_BATCTL_ENV += \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ +MAKE_VARS += \ LIBNL_NAME="libnl-tiny" \ LIBNL_GENL_NAME="libnl-tiny" -MAKE_BATCTL_ARGS += \ - REVISION="$(PKG_BATCTL_SHORTREV)" \ - CC="$(TARGET_CC)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - batctl install \ +MAKE_FLAGS += \ REVISION="openwrt-$(PKG_VERSION)-$(PKG_RELEASE)" config-n := \ @@ -222,10 +215,7 @@ $(call ConfigVars,n)$(call ConfigVars,y) endef $(eval $(call shexport,batctl_config)) -define Build/Compile - $(MAKE_BATCTL_ENV) $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_BATCTL_ARGS) \ - $$$$$(call shvar,batctl_config) -endef +MAKE_FLAGS += $$$$$(call shvar,batctl_config) define Package/batctl-tiny/install $(INSTALL_DIR) $(1)/usr/libexec diff --git a/batmand/Makefile b/batmand/Makefile index 77497ab..47d8741 100644 --- a/batmand/Makefile +++ b/batmand/Makefile @@ -6,7 +6,6 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand @@ -23,19 +22,11 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_MIRROR_HASH:=ceb8e0e399f79b1b663594fcf9642e1efc40e696a7604daf709c77da9b6ec52f PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE - -PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules - include $(INCLUDE_DIR)/package.mk -define Package/batmand/Default +define Package/batmand URL:=https://www.open-mesh.org/ MAINTAINER:=Corinna "Elektra" Aichele -endef - -define Package/batmand -$(call Package/batmand/Default) SECTION:=net CATEGORY:=Network SUBMENU:=Routing and Redirection @@ -47,61 +38,16 @@ define Package/batmand/description B.A.T.M.A.N. layer 3 routing daemon endef -define KernelPackage/batgat -$(call Package/batmand/Default) - SUBMENU:=Network Support - DEPENDS:=+batmand @BROKEN - TITLE:=B.A.T.M.A.N. gateway module - FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoLoad,50,batgat) -endef - - -define KernelPackage/batgat/description -Kernel gateway module for B.A.T.M.A.N. for better tunnel performance -endef - -MAKE_BATMAND_ARGS += \ - EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \ - CCFLAGS="$(TARGET_CFLAGS)" \ - OFLAGS="$(TARGET_CFLAGS)" \ +MAKE_FLAGS += \ + EXTRA_CFLAGS='-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE' \ REVISION="$(PKG_REV)" \ CC="$(TARGET_CC)" \ - NODEBUG=1 \ UNAME="Linux" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - batmand install - -MAKE_BATGAT_ARGS += \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \ - LINUX_VERSION="$(LINUX_VERSION)" \ - REVISION="$(PKG_REV)" modules - - -define Build/Configure -endef - -ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),) - BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_BATMAND_ARGS) -endif - -ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),) - BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS) -endif - -define Build/Compile - $(BUILD_BATMAND) - cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile - $(BUILD_BATGAT) -endef + batmand define Package/batmand/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/batmand $(1)/usr/sbin/ $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config endef @@ -111,4 +57,3 @@ define Package/batmand/conffiles endef $(eval $(call BuildPackage,batmand)) -$(eval $(call KernelPackage,batgat)) diff --git a/batmand/patches/100-2.6.36.patch b/batmand/patches/100-2.6.36.patch deleted file mode 100644 index 13318e0..0000000 --- a/batmand/patches/100-2.6.36.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - batman/linux/modules/gateway.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - ---- batmand-r1439.orig/linux/modules/gateway.c -+++ batmand-r1439/linux/modules/gateway.c -@@ -29,6 +29,7 @@ static struct class *batman_class; - static int batgat_open(struct inode *inode, struct file *filp); - static int batgat_release(struct inode *inode, struct file *file); - static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg ); -+static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg ); - - - static void udp_data_ready(struct sock *sk, int len); -@@ -53,7 +54,11 @@ static int proc_clients_read(char *buf, - static struct file_operations fops = { - .open = batgat_open, - .release = batgat_release, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ .unlocked_ioctl = batgat_ioctl_unlocked, -+#else - .ioctl = batgat_ioctl, -+#endif - }; - - -@@ -166,6 +171,20 @@ static int batgat_release(struct inode * - } - - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+#include -+static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg ) -+{ -+ int ret; -+ -+ lock_kernel(); -+ ret = batgat_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); -+ unlock_kernel(); -+ -+ return ret; -+} -+#endif -+ - static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg ) - { - uint8_t tmp_ip[4]; diff --git a/vis/Makefile b/vis/Makefile index af58f5e..5da78b8 100644 --- a/vis/Makefile +++ b/vis/Makefile @@ -22,8 +22,6 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_MIRROR_HASH:=fd4b337a56993eec9a03ad8e7918bccc7691aa8b2e5ab6dd7863350f07503285 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE - include $(INCLUDE_DIR)/package.mk define Package/vis @@ -40,29 +38,15 @@ define Package/vis/description visualization server for B.A.T.M.A.N. layer 3 endef -MAKE_VIS_ARGS += \ - EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \ - CCFLAGS="$(TARGET_CFLAGS)" \ - OFLAGS="$(TARGET_CFLAGS)" \ +MAKE_FLAGS += \ + EXTRA_CFLAGS='-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE' \ REVISION="$(PKG_REV)" \ CC="$(TARGET_CC)" \ - NODEBUG=1 \ - UNAME="Linux" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - vis install - - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_VIS_ARGS) -endef + vis define Package/vis/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vis $(1)/usr/sbin/ $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config endef