kernel: Add `{recovery}kernelconfig`
This target just builds the `.config` in
`KERNEL_OBJ`/`RECOVERY_KERNEL_OBJ` to quickly check if fragments are
applied properly, not to be used during an actual kernel build
Change-Id: Ic92fe7bd544f6d0f1b3169c1405aceb6702775e0
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 02d4493..1c582be 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -528,7 +528,7 @@
kerneltags: $(KERNEL_CONFIG)
$(call make-kernel-target,tags)
-.PHONY: kernelsavedefconfig alldefconfig
+.PHONY: kernelsavedefconfig alldefconfig kernelconfig recoverykernelconfig
kernelsavedefconfig: $(KERNEL_OUT)
$(call make-kernel-config,$(KERNEL_OUT),$(BASE_KERNEL_DEFCONFIG))
@@ -539,6 +539,14 @@
env KCONFIG_NOTIMESTAMP=true \
$(call make-kernel-target,alldefconfig)
+kernelconfig: $(KERNEL_OUT) $(ALL_KERNEL_DEFCONFIG_SRCS)
+ @echo "Building Kernel Config"
+ $(call make-kernel-config,$(KERNEL_OUT),$(KERNEL_DEFCONFIG))
+
+recoverykernelconfig: $(KERNEL_OUT) $(ALL_RECOVERY_KERNEL_DEFCONFIG_SRCS)
+ @echo "Building Recovery Kernel Config"
+ $(call make-kernel-config,$(RECOVERY_KERNEL_OUT),$(RECOVERY_DEFCONFIG))
+
ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO)))
ifneq ($(BOARD_CUSTOM_DTBOIMG_MK),)
include $(BOARD_CUSTOM_DTBOIMG_MK)