mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-02 03:56:49 +00:00
iproute2: merge upstream CAKE support
Add upstream support for CAKE into iproute2 and conditionally enable it depending on the build environment we're running under. When running with SDK=1 and CONFIG_BUILDBOT=y we assume that we're invoked by the release package builder at http://release-builds.lede-project.org/17.01/packages/ and produce shared iproute2 executables with legacy CAKE support for older released kernels. When not running under the release package builder environment, produce nonshared packages using the new, upstream CAKE support suitable for the latest kernel. Depending on the environment, suffix the PKG_RELEASE field with either "-cake-legacy" or "-cake-upstream" to ensure that the nonshared packages are preferred by opkg for newer builds. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
28d4e55432
commit
2725ad8de4
@ -19,6 +19,10 @@ PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
USE_CAKE:=$(if $(filter 1y,$(SDK)$(CONFIG_BUILDBOT)),cake-legacy,cake-upstream)
|
||||
PKG_FLAGS:=$(if $(filter cake-upstream,$(USE_CAKE)),nonshared)
|
||||
PKG_RELEASE:=$(PKG_RELEASE)-$(USE_CAKE)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/iproute2/Default
|
||||
@ -70,6 +74,14 @@ ifeq ($(BUILD_VARIANT),tiny)
|
||||
IP_CONFIG_TINY:=y
|
||||
endif
|
||||
|
||||
PATCH_DIR:=$(PKG_BUILD_DIR)/openwrt-patches
|
||||
|
||||
define Build/Patch
|
||||
$(INSTALL_DIR) $(PATCH_DIR)
|
||||
$(CP) ./patches/* ./patches-$(USE_CAKE)/* $(PATCH_DIR)/
|
||||
$(call Build/Patch/Default)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
|
||||
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user