[PATCH] scripts: merge_config.sh: support include directives in fragments

Simon Glass sjg at chromium.org
Thu Mar 19 23:09:42 CET 2026


Hi Tom,

On Thu, 19 Mar 2026 at 10:21, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Mar 19, 2026 at 05:14:05PM +0100, Julien Stephan wrote:
>
> > Many defconfig files rely on include directives to factor out common
> > configuration. When running "make some_board_defconfig", these files are
> > preprocessed and the includes are resolved automatically. However,
> > merge_config.sh script currently does not handle include directives in
> > configuration fragments.
> >
> > Add a preprocessing step to resolve include directives in all fragments
> > before merging them.
> >
> > By default, the include search path consists of:
> >   - the current working directory
> >   - the fragment's directory
> >   - the default U-Boot configs/ directory
> >
> > This ensures that existing defconfig files work out of the box. Additional
> > include directories can be specified using the -I option:
> >
> >   ./scripts/kconfig/merge_config.sh -I <additional include dir>  configs/some_board_defconfig frag1.cfg frag2.cfg
> >
> > Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> > ---
> >  scripts/kconfig/merge_config.sh | 56 +++++++++++++++++++++++++++++++++++++----
> >  1 file changed, 51 insertions(+), 5 deletions(-)
>
> This forks us from the upstream version of the script, and I don't think
> upstream will want this.
>
> When I make use of this locally I do a two step:
> - make foo_defconfig savedefconfig
> - merge_config.sh defconfig frag1 ... fragN
>
> So, I am hesistant to start with to change this tool more.

Related, there are quite a few buildman updates which could be useful
here. If you are interested I could send part of the series which
handles fragments. I believe you don't want the 'extended board'
feature (intended for CI testing) so I could leave out those four
patches.

Regards,
Simon


More information about the U-Boot mailing list