From: Yannic Moog <Y.Moog@phytec.de>
To: Marek Vasut <marex@nabladev.com>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>,
Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@nxp.com>,
Simon Glass <sjg@chromium.org>,
Stefano Babic <sbabic@nabladev.com>,
Tom Rini <trini@konsulko.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH] arm64: dts: imx8m: Reinstate TEE ifdeffery
Date: Fri, 3 Jul 2026 06:16:13 +0000 [thread overview]
Message-ID: <5147fb9ef450d4a6963b57dbfdd6ee03eb2ae29a.camel@phytec.de> (raw)
In-Reply-To: <3200f8b6-6e5e-4275-8442-03ecb6a48597@nabladev.com>
On Fri, 2026-07-03 at 00:25 +0200, Marek Vasut wrote:
> On 7/2/26 9:04 AM, Yannic Moog wrote:
>
> Hello Yannic,
>
> > On Tue, 2026-06-30 at 18:08 +0200, Marek Vasut wrote:
> > > Since b57ed147939c ("dts: imx8m{m,n,p,q}: Make optee packaging optional")
> > > the TEE node is always present in U-Boot proper fitImage, even if the
> > > CONFIG_OPTEE is disabled because the u-boot.itb should not contain any
> > > tee.bin. This is wasteful, and produces the following warning which is
> > > also confusing to users:
> > >
> > > "
> > > 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
> > > "
> > >
> > > Reinstate the CONFIG_OPTEE ifdeffery to mitigate the problem, but retain the
> > > binman "optional" keyword at tee.bin .
> >
> > I disagree. You are removing a feature and cause further problems with this commit.
>
> I tried to avoid outright reverting the offending commit b57ed147939c
> ("dts: imx8m{m,n,p,q}: Make optee packaging optional") which introduced
> the problem I described above.
>
> > Your initial assumption
> >
> > > even if the
> > > CONFIG_OPTEE is disabled because the u-boot.itb should not contain any
> > > tee.bin
> >
> > is not accurate. You were able to package OP-TEE without needing to enable support in U-Boot.
> > And
> > afaik this is a perfectly valid use-case.
>
> When you include optee-os in the U-Boot fitImage, what do you do with
> that optee-os which U-Boot does not support ? Details please ?
Sure, sorry. OS can/will use it. There is no requirement, that I know, of any bootloader
interfacing with OP-TEE for proper functionality and its purpose is to work with Linux kernel.
I guess the only job bootloader needs to do is load it into memory. I don't know details about
specific uses within the security context and if there are any that require bootloader support.
>
> > With this change you can no longer do that, so this change is a regression.
> >
> > About the warning message. I understand that you find it confusing; binman is designed so that
> > it
> > emits a warning when an optional blob is not found.
>
> Please see above.
>
> > I prefer that approach to no message at all. You may want to package OP-TEE (e.g. you have an
> > tf-a
> > blob which jumps to OP-TEE addr) and being alerted to a possible mistake is important; Let's
> > say
> > tee path was incorrect during build.
>
> Is this some sort of a board-specific configuration ?
kind of. We have tee path set in <soc>-u-boot.dtsi: filename = "tee.bin";
Could happen that TEE=teee.bin is set or file is named tee-raw.bin and then it helps to get a
warning that binman was not able to package the blob.
>
> Why does U-Boot not enable OPTEE-OS support in this case ?
No need to. Maybe to conserve space, or by principle only enable the configs that are actually
needed? I believe PHYTEC boards used to do that before KASLR support.
>
> > Also, keeping optional when using if defs is not a good idea. Binman will still build you an
> > image
> > when no OP-TEE blob is present, but should not since you enabled OPTEE configs. If you enable
> > OPTEE, you should have an OP-TEE blob packaged.
> > We could add ifndef OPTEE around the optional property.
>
> The optional keyword is actually kept in this case, it is not a full revert.
>
> You did however miss one vital point -- the tee node is part of the
> U-boot fitImage, even if the tee.bin binary is not present and OPTEE
> support in U-Boot is disabled. Binman prints a confusing message, and
> generates a bogus empty tee {} node in the fitImage. That is incorrect.
Yes, forgot to address that. I don't think it is confusing, at least content wise. Visually, I can
see how that is confusing. I want to neither agree nor disagree on the correctness part because I
don't really know the fitImage spec. Having the tee node be part of the fitImage is a design
choice, all optional blobs behave that way from my understanding.
I guess it means that there is a bug in binman if you say having empty tee node is incorrect.
And so it should be fixed in binman itself imo, not here for imx8.
Yannic
next prev parent reply other threads:[~2026-07-03 6:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 16:08 [PATCH] arm64: dts: imx8m: Reinstate TEE ifdeffery Marek Vasut
2026-07-01 7:33 ` Peng Fan
2026-07-02 7:04 ` Yannic Moog
2026-07-02 22:25 ` Marek Vasut
2026-07-03 6:16 ` Yannic Moog [this message]
2026-07-04 20:13 ` Marek Vasut
2026-07-06 12:36 ` Yannic Moog
2026-07-06 22:36 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5147fb9ef450d4a6963b57dbfdd6ee03eb2ae29a.camel@phytec.de \
--to=y.moog@phytec.de \
--cc=festevam@gmail.com \
--cc=marex@nabladev.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@nabladev.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox