I want to automate a Linux build but eventually get to a point where I need to run what seems to be a very manual step: make menuconfig
. This seems to synchronize configs between the OS and kernel configs?
cp git-tracked-config .config
make defconfig
make menuconfig # <- how to automate/script this?
make V=s
Basically, how can I remove the call to make menuconfig
for a build script?
As an aside, this is in reaction to a build error that seems to happen when I run without ever calling make menuconfig:
make[1]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
Which seems to be there is a missing rule in a makefile perhaps because the makefile itself does NOT exist or the makefile has not been generated/morphed to contain that rule but that is a separate question.
There could be a smarter way to approach this alltogether. Are there other configs that I'm not tracking but should (e.g. oldconfig)?
Best Answer
The Linux kernel build-system provide many build targets, the best way to know about it is probably to do a
make help
:As jimmij says in the comments, the interesting parts are in the
oldconfig
related targets.Personally, I would recommend you to go for
silentoldconfig
(if nothing changed in the.config
file orolddefconfig
if you updated your.config
file with a new kernel.