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

Tom Rini trini at konsulko.com
Fri Mar 20 15:04:48 CET 2026


On Thu, Mar 19, 2026 at 04:09:42PM -0600, Simon Glass wrote:
> 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.

buildman changes are something to bring up on their own, and on their
own merit, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260320/65373b28/attachment.sig>


More information about the U-Boot mailing list