[OpenWrt-Devel] netfilter.mk: how do I identify which kernel is being built?

Mauro Mozzarelli mauro at ezplanet.net
Sun Mar 13 08:03:31 EDT 2016

I would like to modify dynamically the modules being built depending on the kernel
version. I thought I could build KCONFIG using ifeq. But I cannot find anything that I
can use to determine which kernel is being built.

So far I tried:

ifeq ($(call kernel_patchver_gt,4.0.0),1)   # does not work
ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),eq,4.1.16)),1) # does not
ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),eq,3.18.27)),1) # does not
work either

I tried also looking into some variable:

KERNEL_PATCHVER=""              # always empty

Any suggestion?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list