* [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory
@ 2025-05-15 21:18 Yann E. MORIN
2025-05-16 17:46 ` Arnout Vandecappelle via buildroot
2025-05-31 16:53 ` Arnout Vandecappelle via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: Yann E. MORIN @ 2025-05-15 21:18 UTC (permalink / raw)
To: buildroot; +Cc: Yann E. MORIN
Currently, the defconfigs must all live in the top-level configs/
directory. While this might be considered sensible for the bundled
defconfigs, it can be tedious to manage in a br2-external tree, where
things could get better sorted and managed in sub-directories.
A few examples:
- for a given board, a first defconfig is the full system, and a
second is the rescue system;
- for a given board, two defconfigs implement an A/B feature set;
- a set of configurations targetting various famillies of systems each
running on different hardware, sorted per familly.
Extend the Makefile to look for and report defconfigs in sub-directories
of the top-level configs/.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 411e1de515..c0a41cabd5 100644
--- a/Makefile
+++ b/Makefile
@@ -1218,7 +1218,7 @@ help:
# $(2): br2-external name, empty for bundled
define list-defconfigs
@first=true; \
- for defconfig in $(1)/configs/*_defconfig; do \
+ for defconfig in $$(find $(1)/configs -name '*_defconfig' |sort); do \
[ -f "$${defconfig}" ] || continue; \
if $${first}; then \
if [ "$(2)" ]; then \
@@ -1228,7 +1228,7 @@ define list-defconfigs
fi; \
first=false; \
fi; \
- defconfig="$${defconfig##*/}"; \
+ defconfig="$${defconfig#$(1)/configs/}"; \
printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \
done; \
$${first} || printf "\n"
--
2.47.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory
2025-05-15 21:18 [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory Yann E. MORIN
@ 2025-05-16 17:46 ` Arnout Vandecappelle via buildroot
2025-05-16 18:26 ` Yann E. MORIN
2025-05-31 16:53 ` Arnout Vandecappelle via buildroot
1 sibling, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-16 17:46 UTC (permalink / raw)
To: Yann E. MORIN, buildroot
On 15/05/2025 23:18, Yann E. MORIN wrote:
> Currently, the defconfigs must all live in the top-level configs/
> directory. While this might be considered sensible for the bundled
> defconfigs, it can be tedious to manage in a br2-external tree, where
> things could get better sorted and managed in sub-directories.
>
> A few examples:
> - for a given board, a first defconfig is the full system, and a
> second is the rescue system;
> - for a given board, two defconfigs implement an A/B feature set;
> - a set of configurations targetting various famillies of systems each
> running on different hardware, sorted per familly.
>
> Extend the Makefile to look for and report defconfigs in sub-directories
> of the top-level configs/.
It is actually only about list-defconfigs, so I rephrased:
Makefile: include defconfigs in sub-directories in list-defconfigs
Currently, list-defconfigs only lists the defconfigs that live
live in the top-level configs/ directory. For the in-tree defconfigs
this is indeed the case, but it is possible to manage the configs in a
br2-external tree with sub-directories.
A few examples:
- for a given board, a first defconfig is the full system, and a
second is the rescue system;
- for a given board, two defconfigs implement an A/B feature set;
- a set of configurations targetting various famillies of systems each
running on different hardware, sorted per familly.
Extend list-defconfigs to look for and report defconfigs in
sub-directories of the top-level configs/.
Applied to master, thanks.
Regards,
Arnout
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 411e1de515..c0a41cabd5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1218,7 +1218,7 @@ help:
> # $(2): br2-external name, empty for bundled
> define list-defconfigs
> @first=true; \
> - for defconfig in $(1)/configs/*_defconfig; do \
> + for defconfig in $$(find $(1)/configs -name '*_defconfig' |sort); do \
> [ -f "$${defconfig}" ] || continue; \
> if $${first}; then \
> if [ "$(2)" ]; then \
> @@ -1228,7 +1228,7 @@ define list-defconfigs
> fi; \
> first=false; \
> fi; \
> - defconfig="$${defconfig##*/}"; \
> + defconfig="$${defconfig#$(1)/configs/}"; \
> printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \
> done; \
> $${first} || printf "\n"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory
2025-05-16 17:46 ` Arnout Vandecappelle via buildroot
@ 2025-05-16 18:26 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2025-05-16 18:26 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: buildroot
Arnout, All,
On 2025-05-16 19:46 +0200, Arnout Vandecappelle spake thusly:
> On 15/05/2025 23:18, Yann E. MORIN wrote:
> > Currently, the defconfigs must all live in the top-level configs/
[--SNIP--]
> It is actually only about list-defconfigs, so I rephrased:
Right.
> Makefile: include defconfigs in sub-directories in list-defconfigs
>
> Currently, list-defconfigs only lists the defconfigs that live
> live in the top-level configs/ directory. For the in-tree defconfigs
Spurious leading space; double 'live'. But no worries, I could have been
the one doing those typoes. ;-)
Thanks! :-)
Regards,
Yann E. MORIN.
> this is indeed the case, but it is possible to manage the configs in a
> br2-external tree with sub-directories.
>
> A few examples:
> - for a given board, a first defconfig is the full system, and a
> second is the rescue system;
> - for a given board, two defconfigs implement an A/B feature set;
> - a set of configurations targetting various famillies of systems each
> running on different hardware, sorted per familly.
>
> Extend list-defconfigs to look for and report defconfigs in
> sub-directories of the top-level configs/.
>
>
>
> Applied to master, thanks.
>
> Regards,
> Arnout
>
>
> >
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > ---
> > Makefile | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 411e1de515..c0a41cabd5 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1218,7 +1218,7 @@ help:
> > # $(2): br2-external name, empty for bundled
> > define list-defconfigs
> > @first=true; \
> > - for defconfig in $(1)/configs/*_defconfig; do \
> > + for defconfig in $$(find $(1)/configs -name '*_defconfig' |sort); do \
> > [ -f "$${defconfig}" ] || continue; \
> > if $${first}; then \
> > if [ "$(2)" ]; then \
> > @@ -1228,7 +1228,7 @@ define list-defconfigs
> > fi; \
> > first=false; \
> > fi; \
> > - defconfig="$${defconfig##*/}"; \
> > + defconfig="$${defconfig#$(1)/configs/}"; \
> > printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \
> > done; \
> > $${first} || printf "\n"
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory
2025-05-15 21:18 [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory Yann E. MORIN
2025-05-16 17:46 ` Arnout Vandecappelle via buildroot
@ 2025-05-31 16:53 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-31 16:53 UTC (permalink / raw)
To: Yann E. MORIN, buildroot
On 15/05/2025 23:18, Yann E. MORIN wrote:
> Currently, the defconfigs must all live in the top-level configs/
> directory. While this might be considered sensible for the bundled
> defconfigs, it can be tedious to manage in a br2-external tree, where
> things could get better sorted and managed in sub-directories.
>
> A few examples:
> - for a given board, a first defconfig is the full system, and a
> second is the rescue system;
> - for a given board, two defconfigs implement an A/B feature set;
> - a set of configurations targetting various famillies of systems each
> running on different hardware, sorted per familly.
>
> Extend the Makefile to look for and report defconfigs in sub-directories
> of the top-level configs/.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 411e1de515..c0a41cabd5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1218,7 +1218,7 @@ help:
> # $(2): br2-external name, empty for bundled
> define list-defconfigs
> @first=true; \
> - for defconfig in $(1)/configs/*_defconfig; do \
> + for defconfig in $$(find $(1)/configs -name '*_defconfig' |sort); do \
> [ -f "$${defconfig}" ] || continue; \
> if $${first}; then \
> if [ "$(2)" ]; then \
> @@ -1228,7 +1228,7 @@ define list-defconfigs
> fi; \
> first=false; \
> fi; \
> - defconfig="$${defconfig##*/}"; \
> + defconfig="$${defconfig#$(1)/configs/}"; \
> printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \
> done; \
> $${first} || printf "\n"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-31 16:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 21:18 [Buildroot] [PATCH] Makefile: allow defconfig to be in a sub-directory Yann E. MORIN
2025-05-16 17:46 ` Arnout Vandecappelle via buildroot
2025-05-16 18:26 ` Yann E. MORIN
2025-05-31 16:53 ` Arnout Vandecappelle via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.