On Fri, 2024-11-15 at 07:20 -0700, Simon Glass wrote: > Hi Yannic, > > On Thu, 14 Nov 2024 at 00:51, Yannic Moog <y.m...@phytec.de> wrote: > > > > Hi Simon, > > > > On Wed, 2024-11-06 at 08:35 -0700, Simon Glass wrote: > > > This flag was lost by a previous change and has never been > > > restored. > > > Without it, binman cannot fully handle missing blobs which are > > > themselves inputs to mkimage. > > > > > > Discussion on this at [1] indicated that this was necessary but > > > the > > > patch was not updated. > > > > > > Restore the flag so that all missing blobs are reported. > > > > > > Link: > > > https://patchwork.ozlabs.org/project/uboot/patch/20221206020336.315465-1-tr...@konsulko.com/ > > > > sorry I'm picking this up so late; > > As I am working on OP-TEE addition to imx8m boards [1], this patch > > got my interest. > > I applied the patch on top of my patchstack and tried to build > > (phycore-imx8mp) with missing tee.bin > > binary and got unexpected results: > > > > > > Image 'image' has faked external blobs and is non-functional: > > tee.bin > > > > Image 'image' is missing optional external blobs but is still > > functional: tee-os > > > > /binman/section/fit/images/tee/tee-os (tee.bin): > > See the documentation for your board. You may need to build Open > > Portable > > Trusted Execution Environment (OP-TEE) and build with > > TEE=/path/to/tee.bin > > > > Some images are invalid > > > > > > So build fails even though tee.bin is marked as optional. > > Did I miss another patch that must be used in conjunction with this > > one? > > > > Before this patch, I see the following output. > > > > > > Image 'image' is missing optional external blobs but is still > > functional: tee-os > > > > /binman/section/fit/images/tee/tee-os (tee.bin): > > See the documentation for your board. You may need to build Open > > Portable > > Trusted Execution Environment (OP-TEE) and build with > > TEE=/path/to/tee.bin > > > > > > With successful build. > > The previous behaviour was a bug, at least that's what I concluded. > It > was ignored sections within sections, in some cases. > > Do you have tee in there twice? It seems strange to get this case.
No, not as far as I am aware. > > If you can't figure it out, can you send patches or share a tree? Yes, I did supply patches in my previous comment, see [1] (Based on imx tree). Anyway, I did some digging in binman and so far this is what I found: Since in this patch you add --fake-ext-blobs the default False will be overridden in the call to binman. This Truth value is propagated until the following happens: Entry_tee_os.ObtainContents() -> Entry_blob.ObtainContents() (this calls get_input_filename() which return None since tee is missing) -> Entry.check_fake_fname(). check_fake_fname sets faked to True and this causes tee-os to be added to the list of faked entries when control.CheckForProblems() calls Entry_blob.CheckFakedBlobs() leading to the output in my previous message. Yannic [1] https://patchwork.ozlabs.org/project/uboot/list/?series=431695&state=* > > > > > Yannic > > > > [1] > > https://lore.kernel.org/u-boot/20241107-phytec_imx8m_optee-v2-0-bbc3747a6...@phytec.de > > > > > > > > Signed-off-by: Simon Glass <s...@chromium.org> > > > Fixes: 93685d0dcb9 ("Makefile: With BINMAN_ALLOW_MISSING=1 don't > > > error") > > > --- > > > > > > Changes in v2: > > > - Use Link: and avoid a line break > > > > > > Makefile | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/Makefile b/Makefile > > > index 7275a02f24c..f92f46b3ab7 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -1398,7 +1398,8 @@ cmd_binman = $(srctree)/tools/binman/binman > > > $(if $(BINMAN_DEBUG),-D) \ > > > --toolpath $(objtree)/tools \ > > > $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ > > > build -u -d u-boot.dtb -O . -m \ > > > - --allow-missing $(if $(BINMAN_ALLOW_MISSING),-- > > > ignore-missing) \ > > > + --allow-missing --fake-ext-blobs \ > > > + $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ > > > -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) > > > \ > > > $(foreach f,$(of_list_dirs),-I $(f)) -a of- > > > list=$(of_list) \ > > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ > > > > Regards, > Simon