SoC common : build :Add multi-config files choice supported. [1/1]
PD#SWPL-189565
Problem:
Add multi-config files choice function supported.
Solution:
Add multi-config files choice supported with make xxx_defconfig.
Verify:
N/A
Change-Id: Ia12bd86889001a2a3816d23938c6cceda2c4dfad
Signed-off-by: xiaohu.huang <xiaohu.huang@amlogic.com>
diff --git a/Makefile b/Makefile
index fcb0d0c..7fa8d73 100644
--- a/Makefile
+++ b/Makefile
@@ -287,9 +287,16 @@
menuconfig: toolchain $(kernel_BUILD_DIR)
@ cmake --build $(kernel_BUILD_DIR) --target $@
+%defconfig:
+ @ make config BOARD_SPEC_CONFIG=$@
+
.PHONY: config
-config: toolchain $(kernel_BUILD_DIR)
- @echo "-- Only do config..."
+config: config_clean toolchain $(kernel_BUILD_DIR)
+ @ echo "configuration written to $(kernel_BUILD_DIR)/.config"
+
+.PHONY: config_clean
+config_clean:
+ @ rm -f $(kernel_BUILD_DIR)/build.ninja;
.PHONY: flash
flash: