From b6c45fc0d0d3dfec7f2185ef4c95d0488ba22748 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 20 Feb 2021 11:41:27 +0100 Subject: [PATCH 1/2] rtpengine: build in BUILD_DIR rtpengine is not primarily about kernel modules. It's an application (which also offers a kernel module). So build it in BUILD_DIR instead of KERNEL_BUILD_DIR. Signed-off-by: Sebastian Kemper --- net/rtpengine/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rtpengine/Makefile b/net/rtpengine/Makefile index 443be3a..219faba 100644 --- a/net/rtpengine/Makefile +++ b/net/rtpengine/Makefile @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-mr$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/sipwise/rtpengine/tar.gz/mr$(PKG_VERSION)? PKG_HASH:=7f463f1f23067d7f69c334e04710348ce95cd637c340724b3042d44083ccba07 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-mr$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-mr$(PKG_VERSION) PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE From 38e16beb650b42c1fb12364da60c82192d094e07 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 20 Feb 2021 11:45:49 +0100 Subject: [PATCH 2/2] rtpengine: fix Module.symvers handling This sets PKG_EXTMOD_SUBDIRS so kernel.mk can find the rtpengine Module.symvers file. Also, this puts KERNEL_MAKE_FLAGS into the make flags used to compile the kernel module. This way Module.symvers files of other modules are made available, plus there is no need anymore to specify ARCH and CROSS_COMPILE, as KERNEL_MAKE_FLAGS already takes care of that. While updating make flags this also adds PKG_JOBS for completeness' sake. Signed-off-by: Sebastian Kemper --- net/rtpengine/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/net/rtpengine/Makefile b/net/rtpengine/Makefile index 219faba..d794d1b 100644 --- a/net/rtpengine/Makefile +++ b/net/rtpengine/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=rtpengine PKG_VERSION:=8.5.3.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-mr$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/sipwise/rtpengine/tar.gz/mr$(PKG_VERSION)? @@ -31,6 +31,10 @@ PKG_BUILD_PARALLEL:=0 PKG_BUILD_DEPENDS:=gperf/host +# With below variable set, $(PKG_SYMVERS_DIR)/rtpengine.symvers gets generated +# from kernel-module/Module.symvers. +PKG_EXTMOD_SUBDIRS:=kernel-module + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -239,10 +243,10 @@ define Build/Compile ifneq ($(CONFIG_PACKAGE_kmod-ipt-rtpengine),) RTPENGINE_VERSION=$(PKG_VERSION) $(MAKE) \ + $(PKG_JOBS) \ -C $(PKG_BUILD_DIR)/kernel-module \ KSRC=$(LINUX_DIR) \ - ARCH=$(LINUX_KARCH) \ - CROSS_COMPILE=$(TARGET_CROSS) + $(KERNEL_MAKE_FLAGS) endif ifneq ($(CONFIG_PACKAGE_iptables-mod-rtpengine),) @@ -262,8 +266,10 @@ endef define Build/InstallDev endef -$(eval $(call BuildPackage,rtpengine-no-transcode)) +# KernelPackage calls need to go first, otherwise hooks like +# collect_module_symvers won't get added. $(eval $(call KernelPackage,ipt-rtpengine)) +$(eval $(call BuildPackage,rtpengine-no-transcode)) $(eval $(call BuildPackage,iptables-mod-rtpengine)) $(eval $(call BuildPackage,rtpengine)) $(eval $(call BuildPackage,rtpengine-recording))