lima
lima copied to clipboard
Add defconfig make target for current arch config
make defconfig
- https://github.com/lima-vm/lima/issues/2426#issuecomment-2187316192
$ make config
cp config.mk .config
/usr/local/bin/kconfig-conf Kconfig
*
* Lima
*
guestagent OS: Linux (GUESTAGENT_OS_LINUX) [Y/n/?]
guestagent Arch: x86_64 (GUESTAGENT_ARCH_X8664) [Y/n/?]
guestagent Arch: aarch64 (GUESTAGENT_ARCH_AARCH64) [Y/n/?]
guestagent Arch: armv7l (GUESTAGENT_ARCH_ARMV7L) [Y/n/?]
guestagent Arch: riscv64 (GUESTAGENT_ARCH_RISCV64) [Y/n/?]
#
# configuration written to .config
#
$ make menuconfig
cp config.mk .config
MENUCONFIG_STYLE=aquatic \
/usr/local/bin/kconfig-mconf Kconfig
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
The goal was to generate a config file, with only the current architecture.
Default config, empty defconfig:
#
# Automatically generated file; DO NOT EDIT.
# Lima
#
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_ARCH_X8664=y
CONFIG_GUESTAGENT_ARCH_AARCH64=y
CONFIG_GUESTAGENT_ARCH_ARMV7L=y
CONFIG_GUESTAGENT_ARCH_RISCV64=y
Could have used files:
arch/x86_64/defconfig
arch/aarch64/defconfig
As in the tool default:
ARCH=x86_64 kconfig-conf --defconfig Kconfig
***
*** Can't find default configuration "arch/x86_64/defconfig"!
***
arch/x86_64/config.mk
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_ARCH_X8664=y
CONFIG_GUESTAGENT_ARCH_AARCH64=n
CONFIG_GUESTAGENT_ARCH_ARMV7L=n
CONFIG_GUESTAGENT_ARCH_RISCV64=n
alternatively, defconfig:
# CONFIG_GUESTAGENT_ARCH_X8664 is not set
# CONFIG_GUESTAGENT_ARCH_ARMV7L is not set
# CONFIG_GUESTAGENT_ARCH_RISCV64 is not set
ARCH=aarch64 kconfig-conf --defconfig Kconfig
***
*** Can't find default configuration "arch/aarch64/defconfig"!
***
arch/aarch64/config.mk
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_ARCH_X8664=n
CONFIG_GUESTAGENT_ARCH_AARCH64=y
CONFIG_GUESTAGENT_ARCH_ARMV7L=n
CONFIG_GUESTAGENT_ARCH_RISCV64=n
alternatively, defconfig:
# CONFIG_GUESTAGENT_ARCH_AARCH64 is not set
# CONFIG_GUESTAGENT_ARCH_ARMV7L is not set
# CONFIG_GUESTAGENT_ARCH_RISCV64 is not set
The framework is overkill here, compared with kernel.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch