target: fix kernel_menuconfig with external feed overwriting generic

In the case where an external feed overwrite the generic target
directory, for kernel_menuconfig the kconfig.pl use the GENERIC_PLATFORM_DIR
variable to search for the config-filter file.

The config-filter file is a file to exclude some kernel config from the
final target config file and doesn't depend on specific kernel version.
Also it's generic enough and it's possible to use the TOPDIR generic
target instead of requiring the external target feed to provide one.

To fix the kernel_menuconfig and prevent external feed from having to
duplicate this additional file, use the TOPDIR generic target as
fallback if the external target feed doesn't provide one.

References: PCF-1881
Fixes: e4635d24b21b ("target: introduce default location for external target linux generic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2025-06-26 11:07:15 +02:00 committed by Petr Štetiar
parent 0894b55ce2
commit d9f0e5c400
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -216,7 +216,8 @@ __linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
LINUX_CONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_KCONFIG_LIST))
LINUX_RECONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_RECONFIG_LIST))
LINUX_RECONF_DIFF = $(SCRIPT_DIR)/kconfig.pl - '>' $(call __linux_confcmd,$(filter-out $(LINUX_RECONFIG_TARGET),$(LINUX_RECONFIG_LIST))) $(1) $(GENERIC_PLATFORM_DIR)/config-filter
LINUX_RECONF_DIFF = $(SCRIPT_DIR)/kconfig.pl - '>' $(call __linux_confcmd,$(filter-out $(LINUX_RECONFIG_TARGET),$(LINUX_RECONFIG_LIST))) $(1) \
$(if $(wildcard $(GENERIC_PLATFORM_DIR)/config-filter), $(GENERIC_PLATFORM_DIR)/config-filter, $(TOPDIR)/target/linux/generic/config-filter)
ifeq ($(DUMP),1)
BuildTarget=$(BuildTargets/DumpCurrent)