openvswitch: rework skipping intree kmod build for unsupported kernels
This is a workaround to prevent the whole build from failing because of the intree kmods are not supported yet by upstream project. Root cause is that kernel version should not play a part when making DEPENDS as the generated kconfig was for all targets that may have different kernel versions. One less than ideal effect of this change is that for an unsupported kernel version, people can still select the intree kmod but it won't be built. This may contradict expectation if the warning was not noticed by them Resolves openwrt/packages#9274 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
d1517aa627
commit
a6ec885522
1 changed files with 8 additions and 2 deletions
|
@ -49,12 +49,13 @@ ovs_kmod_is_intree=$(filter %-intree,$(1))
|
|||
ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
|
||||
ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
|
||||
define OvsKmodPackageTemplate
|
||||
ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
|
||||
define KernelPackage/$(call ovs_kmod_package_name,$(1))
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
TITLE:=$(ovs_kmod_$(1)_title)
|
||||
DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL $(if $(ovs_kmod_intree_not_supported),@BROKEN))
|
||||
DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL)
|
||||
PROVIDES:=$(call ovs_kmod_package_provides,$(1))
|
||||
KCONFIG:=$(ovs_kmod_$(1)_kconfig)
|
||||
FILES:=$(ovs_kmod_$(1)_files)
|
||||
|
@ -62,6 +63,7 @@ define OvsKmodPackageTemplate
|
|||
endef
|
||||
|
||||
ovs_kmod_packages+=$(call ovs_kmod_package_name,$(1))
|
||||
endif
|
||||
endef
|
||||
|
||||
ovs_kmod_openvswitch_title:=Open vSwitch kernel datapath (upstream)
|
||||
|
@ -311,7 +313,11 @@ ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
|
|||
ovs_intree_kmod_enabled:=$(strip $(foreach c,$(ovs_intree_kmod_configs),$($(c))))
|
||||
PKG_CONFIG_DEPENDS+=$(ovs_intree_kmod_configs)
|
||||
ifneq ($(ovs_intree_kmod_enabled),)
|
||||
CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
|
||||
ifeq ($(ovs_kmod_intree_not_supported),)
|
||||
CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
|
||||
else
|
||||
$(warning XXX: openvswitch: intree kmods selected but not supported)
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -flto -std=gnu99
|
||||
|
|
Loading…
Reference in a new issue