* [PATCH] Makefile: binman: Search board directory before srctree
@ 2026-05-15 5:43 Wadim Egorov
2026-05-15 14:01 ` Simon Glass
2026-05-15 14:54 ` Tom Rini
0 siblings, 2 replies; 9+ messages in thread
From: Wadim Egorov @ 2026-05-15 5:43 UTC (permalink / raw)
To: trini, ilias.apalodimas, sjg, marek.vasut+renesas, sughosh.ganu
Cc: u-boot, upstream
A file like rm-cfg.yaml accidentally left in the source tree root
shadows the board-specific copy. binman builds the wrong YAML, the
resulting rm-cfg.bin may match a different SoC, and we end up with
the following error:
k3_system_controller sysctrler: k3_sysctrler_start:
Boot Notification response failed. ret = -110
Move the board directory ahead of the srctree root so that the
most-specific match wins.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 552328f9f2c..1ec29dfe0be 100644
--- a/Makefile
+++ b/Makefile
@@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
build -u -d $(binman_dtb) -O . -m \
--allow-missing --fake-ext-blobs \
$(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
- -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
+ -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
$(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
$(foreach f,$(BINMAN_INDIRS),-I $(f)) \
-a atf-bl1-path=${BL1} \
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 5:43 [PATCH] Makefile: binman: Search board directory before srctree Wadim Egorov
@ 2026-05-15 14:01 ` Simon Glass
2026-05-15 14:54 ` Tom Rini
1 sibling, 0 replies; 9+ messages in thread
From: Simon Glass @ 2026-05-15 14:01 UTC (permalink / raw)
To: w.egorov
Cc: trini, ilias.apalodimas, sjg, marek.vasut+renesas, sughosh.ganu,
u-boot
On 2026-05-15T05:43:27, Wadim Egorov <w.egorov@phytec.de> wrote:
> Makefile: binman: Search board directory before srctree
>
> A file like rm-cfg.yaml accidentally left in the source tree root
> shadows the board-specific copy. binman builds the wrong YAML, the
> resulting rm-cfg.bin may match a different SoC, and we end up with
> the following error:
>
> k3_system_controller sysctrler: k3_sysctrler_start:
> Boot Notification response failed. ret = -110
>
> Move the board directory ahead of the srctree root so that the
> most-specific match wins.
>
> Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
>
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 5:43 [PATCH] Makefile: binman: Search board directory before srctree Wadim Egorov
2026-05-15 14:01 ` Simon Glass
@ 2026-05-15 14:54 ` Tom Rini
2026-05-15 15:35 ` Simon Glass
1 sibling, 1 reply; 9+ messages in thread
From: Tom Rini @ 2026-05-15 14:54 UTC (permalink / raw)
To: Wadim Egorov
Cc: ilias.apalodimas, sjg, marek.vasut+renesas, sughosh.ganu, u-boot,
upstream
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> A file like rm-cfg.yaml accidentally left in the source tree root
> shadows the board-specific copy. binman builds the wrong YAML, the
> resulting rm-cfg.bin may match a different SoC, and we end up with
> the following error:
>
> k3_system_controller sysctrler: k3_sysctrler_start:
> Boot Notification response failed. ret = -110
>
> Move the board directory ahead of the srctree root so that the
> most-specific match wins.
>
> Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 552328f9f2c..1ec29dfe0be 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> build -u -d $(binman_dtb) -O . -m \
> --allow-missing --fake-ext-blobs \
> $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> -a atf-bl1-path=${BL1} \
Why do we need to look in $(srctree) itself?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 14:54 ` Tom Rini
@ 2026-05-15 15:35 ` Simon Glass
2026-05-15 16:02 ` Tom Rini
0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2026-05-15 15:35 UTC (permalink / raw)
To: Tom Rini
Cc: Wadim Egorov, ilias.apalodimas, marek.vasut+renesas, sughosh.ganu,
u-boot, upstream
Hi Tom,
On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
>
> > A file like rm-cfg.yaml accidentally left in the source tree root
> > shadows the board-specific copy. binman builds the wrong YAML, the
> > resulting rm-cfg.bin may match a different SoC, and we end up with
> > the following error:
> >
> > k3_system_controller sysctrler: k3_sysctrler_start:
> > Boot Notification response failed. ret = -110
> >
> > Move the board directory ahead of the srctree root so that the
> > most-specific match wins.
> >
> > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > ---
> > Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 552328f9f2c..1ec29dfe0be 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > build -u -d $(binman_dtb) -O . -m \
> > --allow-missing --fake-ext-blobs \
> > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > -a atf-bl1-path=${BL1} \
>
> Why do we need to look in $(srctree) itself?
See for example:
arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
"arch/arm/mach-k3/keys/custMpk.pem";
Also, people sometimes put files in the source tree, e.g. BL31 images,
in the hope that they will be found.
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 15:35 ` Simon Glass
@ 2026-05-15 16:02 ` Tom Rini
2026-05-15 18:13 ` Simon Glass
0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2026-05-15 16:02 UTC (permalink / raw)
To: Simon Glass, nm
Cc: Wadim Egorov, ilias.apalodimas, marek.vasut+renesas, sughosh.ganu,
u-boot, upstream
[-- Attachment #1: Type: text/plain, Size: 2202 bytes --]
On Fri, May 15, 2026 at 09:35:10AM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> >
> > > A file like rm-cfg.yaml accidentally left in the source tree root
> > > shadows the board-specific copy. binman builds the wrong YAML, the
> > > resulting rm-cfg.bin may match a different SoC, and we end up with
> > > the following error:
> > >
> > > k3_system_controller sysctrler: k3_sysctrler_start:
> > > Boot Notification response failed. ret = -110
> > >
> > > Move the board directory ahead of the srctree root so that the
> > > most-specific match wins.
> > >
> > > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > > ---
> > > Makefile | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 552328f9f2c..1ec29dfe0be 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > > build -u -d $(binman_dtb) -O . -m \
> > > --allow-missing --fake-ext-blobs \
> > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > > -a atf-bl1-path=${BL1} \
> >
> > Why do we need to look in $(srctree) itself?
>
> See for example:
>
> arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
> "arch/arm/mach-k3/keys/custMpk.pem";
That's not great, I'm sorry I missed it at the time. I wonder how easy
replacing that key is with a non-dummy key. Hopefully it's done in a way
that doesn't encourage checking private keys in to repositories..
> Also, people sometimes put files in the source tree, e.g. BL31 images,
> in the hope that they will be found.
That's also a bad practice and what BINMAN_INDIRS is for.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 16:02 ` Tom Rini
@ 2026-05-15 18:13 ` Simon Glass
2026-05-15 18:24 ` Tom Rini
0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2026-05-15 18:13 UTC (permalink / raw)
To: Tom Rini
Cc: nm, Wadim Egorov, ilias.apalodimas, marek.vasut+renesas,
sughosh.ganu, u-boot, upstream
Hi Tom,
On Fri, 15 May 2026 at 10:03, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, May 15, 2026 at 09:35:10AM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> > >
> > > > A file like rm-cfg.yaml accidentally left in the source tree root
> > > > shadows the board-specific copy. binman builds the wrong YAML, the
> > > > resulting rm-cfg.bin may match a different SoC, and we end up with
> > > > the following error:
> > > >
> > > > k3_system_controller sysctrler: k3_sysctrler_start:
> > > > Boot Notification response failed. ret = -110
> > > >
> > > > Move the board directory ahead of the srctree root so that the
> > > > most-specific match wins.
> > > >
> > > > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > > > ---
> > > > Makefile | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/Makefile b/Makefile
> > > > index 552328f9f2c..1ec29dfe0be 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > > > build -u -d $(binman_dtb) -O . -m \
> > > > --allow-missing --fake-ext-blobs \
> > > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > > > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > > > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > > > -a atf-bl1-path=${BL1} \
> > >
> > > Why do we need to look in $(srctree) itself?
> >
> > See for example:
> >
> > arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
> > "arch/arm/mach-k3/keys/custMpk.pem";
>
> That's not great, I'm sorry I missed it at the time. I wonder how easy
> replacing that key is with a non-dummy key. Hopefully it's done in a way
> that doesn't encourage checking private keys in to repositories..
Typically we would use an environment var passed in from the Makefile,
as we do with BL31, TEE, TI_DM, etc.
>
> > Also, people sometimes put files in the source tree, e.g. BL31 images,
> > in the hope that they will be found.
>
> That's also a bad practice and what BINMAN_INDIRS is for.
Yes, but that came quite a bit later with the bintool stuff (2021).
Anyway, with a bit of work I believe we could drop the source dir.
Would you like to look at it, or should I?
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 18:13 ` Simon Glass
@ 2026-05-15 18:24 ` Tom Rini
2026-05-15 18:32 ` Simon Glass
0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2026-05-15 18:24 UTC (permalink / raw)
To: Simon Glass
Cc: nm, Wadim Egorov, ilias.apalodimas, marek.vasut+renesas,
sughosh.ganu, u-boot, upstream
[-- Attachment #1: Type: text/plain, Size: 3097 bytes --]
On Fri, May 15, 2026 at 12:13:50PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 15 May 2026 at 10:03, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, May 15, 2026 at 09:35:10AM -0600, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> > > >
> > > > > A file like rm-cfg.yaml accidentally left in the source tree root
> > > > > shadows the board-specific copy. binman builds the wrong YAML, the
> > > > > resulting rm-cfg.bin may match a different SoC, and we end up with
> > > > > the following error:
> > > > >
> > > > > k3_system_controller sysctrler: k3_sysctrler_start:
> > > > > Boot Notification response failed. ret = -110
> > > > >
> > > > > Move the board directory ahead of the srctree root so that the
> > > > > most-specific match wins.
> > > > >
> > > > > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > > > > ---
> > > > > Makefile | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/Makefile b/Makefile
> > > > > index 552328f9f2c..1ec29dfe0be 100644
> > > > > --- a/Makefile
> > > > > +++ b/Makefile
> > > > > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > > > > build -u -d $(binman_dtb) -O . -m \
> > > > > --allow-missing --fake-ext-blobs \
> > > > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > > > > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > > > > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > > > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > > > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > > > > -a atf-bl1-path=${BL1} \
> > > >
> > > > Why do we need to look in $(srctree) itself?
> > >
> > > See for example:
> > >
> > > arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
> > > "arch/arm/mach-k3/keys/custMpk.pem";
> >
> > That's not great, I'm sorry I missed it at the time. I wonder how easy
> > replacing that key is with a non-dummy key. Hopefully it's done in a way
> > that doesn't encourage checking private keys in to repositories..
>
> Typically we would use an environment var passed in from the Makefile,
> as we do with BL31, TEE, TI_DM, etc.
>
> >
> > > Also, people sometimes put files in the source tree, e.g. BL31 images,
> > > in the hope that they will be found.
> >
> > That's also a bad practice and what BINMAN_INDIRS is for.
>
> Yes, but that came quite a bit later with the bintool stuff (2021).
>
> Anyway, with a bit of work I believe we could drop the source dir.
> Would you like to look at it, or should I?
Well, the first step would be getting some more feedback on how people
override some of these files for example. Even more environment files
seems like a bad idea and I'm not sure what BINMAN_INDIRS can't cover
today.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 18:24 ` Tom Rini
@ 2026-05-15 18:32 ` Simon Glass
2026-05-15 18:44 ` Tom Rini
0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2026-05-15 18:32 UTC (permalink / raw)
To: Tom Rini
Cc: nm, Wadim Egorov, ilias.apalodimas, marek.vasut+renesas,
sughosh.ganu, u-boot, upstream
Hi Tom,
On Fri, 15 May 2026 at 12:24, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, May 15, 2026 at 12:13:50PM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > On Fri, 15 May 2026 at 10:03, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Fri, May 15, 2026 at 09:35:10AM -0600, Simon Glass wrote:
> > > > Hi Tom,
> > > >
> > > > On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> > > > >
> > > > > > A file like rm-cfg.yaml accidentally left in the source tree root
> > > > > > shadows the board-specific copy. binman builds the wrong YAML, the
> > > > > > resulting rm-cfg.bin may match a different SoC, and we end up with
> > > > > > the following error:
> > > > > >
> > > > > > k3_system_controller sysctrler: k3_sysctrler_start:
> > > > > > Boot Notification response failed. ret = -110
> > > > > >
> > > > > > Move the board directory ahead of the srctree root so that the
> > > > > > most-specific match wins.
> > > > > >
> > > > > > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > > > > > ---
> > > > > > Makefile | 2 +-
> > > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/Makefile b/Makefile
> > > > > > index 552328f9f2c..1ec29dfe0be 100644
> > > > > > --- a/Makefile
> > > > > > +++ b/Makefile
> > > > > > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > > > > > build -u -d $(binman_dtb) -O . -m \
> > > > > > --allow-missing --fake-ext-blobs \
> > > > > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > > > > > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > > > > > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > > > > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > > > > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > > > > > -a atf-bl1-path=${BL1} \
> > > > >
> > > > > Why do we need to look in $(srctree) itself?
> > > >
> > > > See for example:
> > > >
> > > > arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
> > > > "arch/arm/mach-k3/keys/custMpk.pem";
> > >
> > > That's not great, I'm sorry I missed it at the time. I wonder how easy
> > > replacing that key is with a non-dummy key. Hopefully it's done in a way
> > > that doesn't encourage checking private keys in to repositories..
> >
> > Typically we would use an environment var passed in from the Makefile,
> > as we do with BL31, TEE, TI_DM, etc.
> >
> > >
> > > > Also, people sometimes put files in the source tree, e.g. BL31 images,
> > > > in the hope that they will be found.
> > >
> > > That's also a bad practice and what BINMAN_INDIRS is for.
> >
> > Yes, but that came quite a bit later with the bintool stuff (2021).
> >
> > Anyway, with a bit of work I believe we could drop the source dir.
> > Would you like to look at it, or should I?
>
> Well, the first step would be getting some more feedback on how people
> override some of these files for example. Even more environment files
> seems like a bad idea and I'm not sure what BINMAN_INDIRS can't cover
> today.
Assuming you mean 'environment variables', we do need the actual
filename, not just the directory. We could have default filenames for
each entry type, I suppose. Some do already.
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Makefile: binman: Search board directory before srctree
2026-05-15 18:32 ` Simon Glass
@ 2026-05-15 18:44 ` Tom Rini
0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2026-05-15 18:44 UTC (permalink / raw)
To: Simon Glass
Cc: nm, Wadim Egorov, ilias.apalodimas, marek.vasut+renesas,
sughosh.ganu, u-boot, upstream
[-- Attachment #1: Type: text/plain, Size: 3943 bytes --]
On Fri, May 15, 2026 at 12:32:30PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 15 May 2026 at 12:24, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, May 15, 2026 at 12:13:50PM -0600, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Fri, 15 May 2026 at 10:03, Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Fri, May 15, 2026 at 09:35:10AM -0600, Simon Glass wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Fri, 15 May 2026 at 08:54, Tom Rini <trini@konsulko.com> wrote:
> > > > > >
> > > > > > On Fri, May 15, 2026 at 07:43:27AM +0200, Wadim Egorov wrote:
> > > > > >
> > > > > > > A file like rm-cfg.yaml accidentally left in the source tree root
> > > > > > > shadows the board-specific copy. binman builds the wrong YAML, the
> > > > > > > resulting rm-cfg.bin may match a different SoC, and we end up with
> > > > > > > the following error:
> > > > > > >
> > > > > > > k3_system_controller sysctrler: k3_sysctrler_start:
> > > > > > > Boot Notification response failed. ret = -110
> > > > > > >
> > > > > > > Move the board directory ahead of the srctree root so that the
> > > > > > > most-specific match wins.
> > > > > > >
> > > > > > > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> > > > > > > ---
> > > > > > > Makefile | 2 +-
> > > > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/Makefile b/Makefile
> > > > > > > index 552328f9f2c..1ec29dfe0be 100644
> > > > > > > --- a/Makefile
> > > > > > > +++ b/Makefile
> > > > > > > @@ -1682,7 +1682,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
> > > > > > > build -u -d $(binman_dtb) -O . -m \
> > > > > > > --allow-missing --fake-ext-blobs \
> > > > > > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
> > > > > > > - -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
> > > > > > > + -I . -I $(srctree)/board/$(BOARDDIR) -I $(srctree) \
> > > > > > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
> > > > > > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
> > > > > > > -a atf-bl1-path=${BL1} \
> > > > > >
> > > > > > Why do we need to look in $(srctree) itself?
> > > > >
> > > > > See for example:
> > > > >
> > > > > arch/arm/dts/k3-j721e-binman.dtsi:308: private-key =
> > > > > "arch/arm/mach-k3/keys/custMpk.pem";
> > > >
> > > > That's not great, I'm sorry I missed it at the time. I wonder how easy
> > > > replacing that key is with a non-dummy key. Hopefully it's done in a way
> > > > that doesn't encourage checking private keys in to repositories..
> > >
> > > Typically we would use an environment var passed in from the Makefile,
> > > as we do with BL31, TEE, TI_DM, etc.
> > >
> > > >
> > > > > Also, people sometimes put files in the source tree, e.g. BL31 images,
> > > > > in the hope that they will be found.
> > > >
> > > > That's also a bad practice and what BINMAN_INDIRS is for.
> > >
> > > Yes, but that came quite a bit later with the bintool stuff (2021).
> > >
> > > Anyway, with a bit of work I believe we could drop the source dir.
> > > Would you like to look at it, or should I?
> >
> > Well, the first step would be getting some more feedback on how people
> > override some of these files for example. Even more environment files
> > seems like a bad idea and I'm not sure what BINMAN_INDIRS can't cover
> > today.
>
> Assuming you mean 'environment variables', we do need the actual
> filename, not just the directory. We could have default filenames for
> each entry type, I suppose. Some do already.
Yes, I think moving that way is the right direction. I was going to use
-scp-path=$(SCP) as an example of something to move away from, but it
looks like that's already being done in a way BINMAN_INDIRS should
handle.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-05-15 18:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 5:43 [PATCH] Makefile: binman: Search board directory before srctree Wadim Egorov
2026-05-15 14:01 ` Simon Glass
2026-05-15 14:54 ` Tom Rini
2026-05-15 15:35 ` Simon Glass
2026-05-15 16:02 ` Tom Rini
2026-05-15 18:13 ` Simon Glass
2026-05-15 18:24 ` Tom Rini
2026-05-15 18:32 ` Simon Glass
2026-05-15 18:44 ` Tom Rini
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.