use first kernel when generating kernel configs file
If multiple kernels are defined for a build, use the first one when
generating the kernel config file.
Bug: 159975506
Change-Id: Ia136264eb0d0b544bf0685bc22e600de187a9a9b
diff --git a/core/Makefile b/core/Makefile
index 11d2796..3460914 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3445,8 +3445,8 @@
$(BUILT_KERNEL_CONFIGS_FILE): .KATI_IMPLICIT_OUTPUTS := $(BUILT_KERNEL_VERSION_FILE)
$(BUILT_KERNEL_CONFIGS_FILE): PRIVATE_DECOMPRESS_TOOLS := $(my_decompress_tools)
$(BUILT_KERNEL_CONFIGS_FILE): $(foreach pair,$(my_decompress_tools),$(call word-colon,2,$(pair)))
-$(BUILT_KERNEL_CONFIGS_FILE): $(EXTRACT_KERNEL) $(INSTALLED_KERNEL_TARGET)
- $< --tools $(PRIVATE_DECOMPRESS_TOOLS) --input $(INSTALLED_KERNEL_TARGET) \
+$(BUILT_KERNEL_CONFIGS_FILE): $(EXTRACT_KERNEL) $(firstword $(INSTALLED_KERNEL_TARGET))
+ $< --tools $(PRIVATE_DECOMPRESS_TOOLS) --input $(firstword $(INSTALLED_KERNEL_TARGET)) \
--output-configs $@ \
--output-version $(BUILT_KERNEL_VERSION_FILE)