I was in the middle of adding a new board to Yocto while I noticed that a lot of the configuration could be inherited from the previous hw revision.
So I was wondering if there could be the possibility of including a common_defconfig
in the <new_board>_defconfig
to not duplicate all the configuration files. Similarly to what happens with dts
files.
E.g.
common_defconfig:
CONFIG_ARM=y
CONFIG_SPL=y
CONFIG_CMD_I2C=y
board_hw1_defconfig:
#include "common_defconfig"
CONFIG_TARGET_BOARD_HW1=y
board_hw2_defconfig:
#include "common_defconfig"
CONFIG_TARGET_BOARD_HW2=y
UPDATE 1
Like pointed out by @Xypron, and as I was suspecting, there is no way to include different _defconfig
one in another.
I also tried to create a generic Kconfig.defconfig
to select some configurations. The problem was that, for example, ARM
is defined as a config
inside a choice
so cannot be selected from inside a Kconf
file.
I will end up creating a do_configure_append
task where I will merge the _defconfig
files through the use of scripts/kconfig/merge_config.sh
if no one will come with a better solution.