diff mbox series

[v1] imx: mkimage_fit_atf: replace @ with hyphen

Message ID 20210505120053.9466-1-oliver.graute@kococonnector.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series [v1] imx: mkimage_fit_atf: replace @ with hyphen | expand

Commit Message

Oliver Graute May 5, 2021, noon UTC
Unit addresses are not allowed anymore in a FIT image since

commit 3f04db891a35 ("image: Check for unit addresses in FITs")

This caused this error on mkimage creation:

./tools/mkimage: verify_header failed for FIT Image support with exit code 1
Makefile:1393: recipe for target 'u-boot.itb' failed
make: *** [u-boot.itb] Error 1

replacing @ with hyphen solved the issue

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: uboot-imx <uboot-imx@nxp.com>
---
 arch/arm/mach-imx/mkimage_fit_atf.sh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

ZHIZHIKIN Andrey May 5, 2021, 1:30 p.m. UTC | #1
Hello Oliver,

> -----Original Message-----
> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Oliver Graute
> Sent: Wednesday, May 5, 2021 2:01 PM
> To: sbabic@denx.de
> Cc: festevam@gmail.com; peng.fan@nxp.com;
> oliver.graute@kococonnector.com; u-boot@lists.denx.de; Simon Glass
> <sjg@chromium.org>; uboot-imx <uboot-imx@nxp.com>
> Subject: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> 
> 
> Unit addresses are not allowed anymore in a FIT image since
> 
> commit 3f04db891a35 ("image: Check for unit addresses in FITs")
> 
> This caused this error on mkimage creation:
> 
> ./tools/mkimage: verify_header failed for FIT Image support with exit code 1
> Makefile:1393: recipe for target 'u-boot.itb' failed
> make: *** [u-boot.itb] Error 1

IIRC, this error comes from the derivatives which are not (yet) migrated to use 'binman' and have CONFIG_SPL_FIT_GENERATOR set.

It is triggered by 79af75f777 ("fit: Don't allow verification of images with @ nodes"), which is totally correct behavior and should be
corrected on the FIT generator end, so the patch itself solves the problem.

TBH, I had introduced the same change to NXP U-Boot fork that is built for NXP Yocto BSP [1], and was not sure it is relevant for the
master since it uses 'binman' instead of FIT generator.

From the other point of view, which imx8m board do you experience this build problem with?

Currently, there are following boards that need to be migrated from FIT generator to 'binman':
configs/imx8mm_beacon_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8mm_venice_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8mn_beacon_2g_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8mn_beacon_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8mq_evk_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8mq_phanbell_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/imx8qm_rom7720_a1_4G_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/phycore-imx8mm_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/phycore-imx8mp_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/pico-imx8mq_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
configs/verdin-imx8mm_defconfig:CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"

I know it's a long shot, but the question is: should the FIT generator be adapted here, or maybe those boards that are
still using it - to be migrated to binman directly?

There is already a warning in root Makefile regarding usage of FIT generator:
"===================== WARNING ======================"
"This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
"to binman instead, to avoid the proliferation of"
"arch-specific scripts with no tests."
"===================================================="

So maybe it makes sense to adapt affected boards instead?

> 
> replacing @ with hyphen solved the issue
> 
> Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: uboot-imx <uboot-imx@nxp.com>
> ---
>  arch/arm/mach-imx/mkimage_fit_atf.sh | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-
> imx/mkimage_fit_atf.sh
> index fe12b7bb4b..c5fb9b0fc3 100755
> --- a/arch/arm/mach-imx/mkimage_fit_atf.sh
> +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh
> @@ -53,7 +53,7 @@ cat << __HEADER_EOF
>         description = "Configuration to load ATF before U-Boot";
> 
>         images {
> -               uboot@1 {
> +               uboot-1 {
>                         description = "U-Boot (64-bit)";
>                         os = "u-boot";
>                         data = /incbin/("$BL33"); @@ -68,7 +68,7 @@ cnt=1  for dtname in $*
> do
>         cat << __FDT_IMAGE_EOF
> -               fdt@$cnt {
> +               fdt-$cnt {
>                         description = "$(basename $dtname .dtb)";
>                         data = /incbin/("$dtname");
>                         type = "flat_dt"; @@ -79,7 +79,7 @@ cnt=$((cnt+1))  done
> 
>  cat << __HEADER_EOF
> -               atf@1 {
> +               atf-1 {
>                         description = "ARM Trusted Firmware";
>                         os = "arm-trusted-firmware";
>                         data = /incbin/("$BL31"); @@ -93,7 +93,7 @@ __HEADER_EOF
> 
>  if [ -f $BL32 ]; then
>  cat << __HEADER_EOF
> -               tee@1 {
> +               tee-1 {
>                         description = "TEE firmware";
>                         data = /incbin/("$BL32");
>                         type = "firmware"; @@ -108,7 +108,7 @@ fi  cat <<
> __CONF_HEADER_EOF
>         };
>         configurations {
> -               default = "config@1";
> +               default = "config-1";
> 
>  __CONF_HEADER_EOF
> 
> @@ -117,20 +117,20 @@ for dtname in $*
>  do
>  if [ -f $BL32 ]; then
>  cat << __CONF_SECTION_EOF
> -               config@$cnt {
> +               config-$cnt {
>                         description = "$(basename $dtname .dtb)";
> -                       firmware = "uboot@1";
> -                       loadables = "atf@1", "tee@1";
> +                       firmware = "uboot-1";
> +                       loadables = "atf-1", "tee-1";
>                         fdt = "fdt@$cnt";
>                 };
>  __CONF_SECTION_EOF
>  else
>  cat << __CONF_SECTION1_EOF
> -               config@$cnt {
> +               config-$cnt {
>                         description = "$(basename $dtname .dtb)";
> -                       firmware = "uboot@1";
> -                       loadables = "atf@1";
> -                       fdt = "fdt@$cnt";
> +                       firmware = "uboot-1";
> +                       loadables = "atf-1";
> +                       fdt = "fdt-$cnt";
>                 };
>  __CONF_SECTION1_EOF
>  fi
> --
> 2.17.1

-- andrey

Link: [1] https://github.com/Freescale/meta-freescale/blob/master/recipes-bsp/imx-mkimage/files/0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch
Heiko Thiery July 27, 2021, 7:17 p.m. UTC | #2
Hi all,

Am Mi., 5. Mai 2021 um 15:30 Uhr schrieb ZHIZHIKIN Andrey
<andrey.zhizhikin@leica-geosystems.com>:
>
> Hello Oliver,
>
> > -----Original Message-----
> > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Oliver Graute
> > Sent: Wednesday, May 5, 2021 2:01 PM
> > To: sbabic@denx.de
> > Cc: festevam@gmail.com; peng.fan@nxp.com;
> > oliver.graute@kococonnector.com; u-boot@lists.denx.de; Simon Glass
> > <sjg@chromium.org>; uboot-imx <uboot-imx@nxp.com>
> > Subject: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> >
> >
> > Unit addresses are not allowed anymore in a FIT image since
> >
> > commit 3f04db891a35 ("image: Check for unit addresses in FITs")
> >
> > This caused this error on mkimage creation:
> >
> > ./tools/mkimage: verify_header failed for FIT Image support with exit code 1
> > Makefile:1393: recipe for target 'u-boot.itb' failed
> > make: *** [u-boot.itb] Error 1

This error is still present in the current master branch and the
target "flash.bin" does not not build anymore for the
imx8mq_evk_defconfig.

Any thoughts to apply this patch to master?


--
Heiko
Tim Harvey July 27, 2021, 9:53 p.m. UTC | #3
On Tue, Jul 27, 2021 at 12:17 PM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> Hi all,
>
> Am Mi., 5. Mai 2021 um 15:30 Uhr schrieb ZHIZHIKIN Andrey
> <andrey.zhizhikin@leica-geosystems.com>:
> >
> > Hello Oliver,
> >
> > > -----Original Message-----
> > > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Oliver Graute
> > > Sent: Wednesday, May 5, 2021 2:01 PM
> > > To: sbabic@denx.de
> > > Cc: festevam@gmail.com; peng.fan@nxp.com;
> > > oliver.graute@kococonnector.com; u-boot@lists.denx.de; Simon Glass
> > > <sjg@chromium.org>; uboot-imx <uboot-imx@nxp.com>
> > > Subject: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> > >
> > >
> > > Unit addresses are not allowed anymore in a FIT image since
> > >
> > > commit 3f04db891a35 ("image: Check for unit addresses in FITs")
> > >
> > > This caused this error on mkimage creation:
> > >
> > > ./tools/mkimage: verify_header failed for FIT Image support with exit code 1
> > > Makefile:1393: recipe for target 'u-boot.itb' failed
> > > make: *** [u-boot.itb] Error 1
>
> This error is still present in the current master branch and the
> target "flash.bin" does not not build anymore for the
> imx8mq_evk_defconfig.
>
> Any thoughts to apply this patch to master?
>

Heiko,

I just ran into this failure as well with imx8mm_venice_defconfig
which I haven't moved to binman yet.

With respect to moving to binman, I'm all for it but I'm wondering why
other boards have elected to move from a monolithic flash.bin
including the SPL and u-boot.itb pre-binman to post-binman where
flash.bin is just the SPL. I'm not sure why users should be hit with a
change like that... why are people not having binman produce a
flash.bin that was equivalent to pre-binman?

Best regards,

Tim
Peng Fan (OSS) Aug. 2, 2021, 9:57 a.m. UTC | #4
Hi Tim,

> Subject: Re: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> 
> On Tue, Jul 27, 2021 at 12:17 PM Heiko Thiery <heiko.thiery@gmail.com>
> wrote:
> >
> > Hi all,
> >
> > Am Mi., 5. Mai 2021 um 15:30 Uhr schrieb ZHIZHIKIN Andrey
> > <andrey.zhizhikin@leica-geosystems.com>:
> > >
> > > Hello Oliver,
> > >
> > > > -----Original Message-----
> > > > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Oliver
> > > > Graute
> > > > Sent: Wednesday, May 5, 2021 2:01 PM
> > > > To: sbabic@denx.de
> > > > Cc: festevam@gmail.com; peng.fan@nxp.com;
> > > > oliver.graute@kococonnector.com; u-boot@lists.denx.de; Simon Glass
> > > > <sjg@chromium.org>; uboot-imx <uboot-imx@nxp.com>
> > > > Subject: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> > > >
> > > >
> > > > Unit addresses are not allowed anymore in a FIT image since
> > > >
> > > > commit 3f04db891a35 ("image: Check for unit addresses in FITs")
> > > >
> > > > This caused this error on mkimage creation:
> > > >
> > > > ./tools/mkimage: verify_header failed for FIT Image support with
> > > > exit code 1
> > > > Makefile:1393: recipe for target 'u-boot.itb' failed
> > > > make: *** [u-boot.itb] Error 1
> >
> > This error is still present in the current master branch and the
> > target "flash.bin" does not not build anymore for the
> > imx8mq_evk_defconfig.
> >
> > Any thoughts to apply this patch to master?
> >
> 
> Heiko,
> 
> I just ran into this failure as well with imx8mm_venice_defconfig which I
> haven't moved to binman yet.
> 
> With respect to moving to binman, I'm all for it but I'm wondering why other
> boards have elected to move from a monolithic flash.bin including the SPL and
> u-boot.itb pre-binman to post-binman where flash.bin is just the SPL. I'm not
> sure why users should be hit with a change like that... why are people not
> having binman produce a flash.bin that was equivalent to pre-binman?

You mean flash.bin not contain u-boot.bin when using binman here?

Regards,
Peng.

> 
> Best regards,
> 
> Tim
Heiko Thiery Aug. 8, 2021, 3:48 p.m. UTC | #5
Hi all,

Am Mo., 2. Aug. 2021 um 11:57 Uhr schrieb Peng Fan (OSS) <peng.fan@oss.nxp.com>:
>
> Hi Tim,
>
> > Subject: Re: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> >
> > On Tue, Jul 27, 2021 at 12:17 PM Heiko Thiery <heiko.thiery@gmail.com>
> > wrote:
> > >
> > > Hi all,
> > >
> > > Am Mi., 5. Mai 2021 um 15:30 Uhr schrieb ZHIZHIKIN Andrey
> > > <andrey.zhizhikin@leica-geosystems.com>:
> > > >
> > > > Hello Oliver,
> > > >
> > > > > -----Original Message-----
> > > > > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Oliver
> > > > > Graute
> > > > > Sent: Wednesday, May 5, 2021 2:01 PM
> > > > > To: sbabic@denx.de
> > > > > Cc: festevam@gmail.com; peng.fan@nxp.com;
> > > > > oliver.graute@kococonnector.com; u-boot@lists.denx.de; Simon Glass
> > > > > <sjg@chromium.org>; uboot-imx <uboot-imx@nxp.com>
> > > > > Subject: [PATCH v1] imx: mkimage_fit_atf: replace @ with hyphen
> > > > >
> > > > >
> > > > > Unit addresses are not allowed anymore in a FIT image since
> > > > >
> > > > > commit 3f04db891a35 ("image: Check for unit addresses in FITs")
> > > > >
> > > > > This caused this error on mkimage creation:
> > > > >
> > > > > ./tools/mkimage: verify_header failed for FIT Image support with
> > > > > exit code 1
> > > > > Makefile:1393: recipe for target 'u-boot.itb' failed
> > > > > make: *** [u-boot.itb] Error 1
> > >
> > > This error is still present in the current master branch and the
> > > target "flash.bin" does not not build anymore for the
> > > imx8mq_evk_defconfig.
> > >
> > > Any thoughts to apply this patch to master?
> > >
> >
> > Heiko,
> >
> > I just ran into this failure as well with imx8mm_venice_defconfig which I
> > haven't moved to binman yet.
> >
> > With respect to moving to binman, I'm all for it but I'm wondering why other
> > boards have elected to move from a monolithic flash.bin including the SPL and
> > u-boot.itb pre-binman to post-binman where flash.bin is just the SPL. I'm not
> > sure why users should be hit with a change like that... why are people not
> > having binman produce a flash.bin that was equivalent to pre-binman?
>
> You mean flash.bin not contain u-boot.bin when using binman here?

Any news on that? I just see that in the current master it is not
possible to create a working flash.bin for e.g. the imx8mq_evk board.
Fabio Estevam Aug. 13, 2021, 12:34 p.m. UTC | #6
Hi Tim,

[Adding Marek]

On Tue, Jul 27, 2021 at 6:53 PM Tim Harvey <tharvey@gateworks.com> wrote:

> With respect to moving to binman, I'm all for it but I'm wondering why
> other boards have elected to move from a monolithic flash.bin
> including the SPL and u-boot.itb pre-binman to post-binman where
> flash.bin is just the SPL. I'm not sure why users should be hit with a
> change like that... why are people not having binman produce a
> flash.bin that was equivalent to pre-binman?

Yes, fully agree.

Peng,

After the adoption of binman, both flash.bin and u-boot.itb need to be
flashed to the boot media.

This breaks user experience, distro integration, etc, which is not good.

Can we have binman generate a single bootable flash.bin binary (which
contains flash.bin + u-boot.itb) again
to keep compatibility and avoid breakage?

Thanks,

Fabio Estevam



>
> Best regards,
>
> Tim
Heiko Thiery Aug. 13, 2021, 12:52 p.m. UTC | #7
Hi,

Am Fr., 13. Aug. 2021 um 14:34 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Tim,
>
> [Adding Marek]
>
> On Tue, Jul 27, 2021 at 6:53 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> > With respect to moving to binman, I'm all for it but I'm wondering why
> > other boards have elected to move from a monolithic flash.bin
> > including the SPL and u-boot.itb pre-binman to post-binman where
> > flash.bin is just the SPL. I'm not sure why users should be hit with a
> > change like that... why are people not having binman produce a
> > flash.bin that was equivalent to pre-binman?
>
> Yes, fully agree.
>
> Peng,
>
> After the adoption of binman, both flash.bin and u-boot.itb need to be
> flashed to the boot media.
>
> This breaks user experience, distro integration, etc, which is not good.
>
> Can we have binman generate a single bootable flash.bin binary (which
> contains flash.bin + u-boot.itb) again
> to keep compatibility and avoid breakage?

Maybe I'm wrong or I do not fully understand the limitation you're
talking about, but as far as I understand the output (flash.bin) from
the ronetix board [1] was generated using binman and includes all
necessary parts. Is this right?

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx8mq-cm-u-boot.dtsi
Fabio Estevam Aug. 13, 2021, 1:03 p.m. UTC | #8
Hi Heiko,

On Fri, Aug 13, 2021 at 9:53 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:

> Maybe I'm wrong or I do not fully understand the limitation you're
> talking about, but as far as I understand the output (flash.bin) from
> the ronetix board [1] was generated using binman and includes all
> necessary parts. Is this right?

Building the imx8mq_cm_defconfig generates flash.bin + u-boot.itb.

If you only flash flash.bin, then you don't have a bootable system as
flash.bin contains only the SPL part.

Prior to using binman, we could boot the i.MX8M boards by flashing
only flash.bin.

I would like to preserver the pre-U-Boot 2021.07, where only flash.bin
was needed.




>
> [1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx8mq-cm-u-boot.dtsi
>
>
> --
> Heiko
Heiko Thiery Aug. 13, 2021, 3:12 p.m. UTC | #9
Hi Fabio,

Am Fr., 13. Aug. 2021 um 15:03 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Heiko,
>
> On Fri, Aug 13, 2021 at 9:53 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > Maybe I'm wrong or I do not fully understand the limitation you're
> > talking about, but as far as I understand the output (flash.bin) from
> > the ronetix board [1] was generated using binman and includes all
> > necessary parts. Is this right?
>
> Building the imx8mq_cm_defconfig generates flash.bin + u-boot.itb.
>
> If you only flash flash.bin, then you don't have a bootable system as
> flash.bin contains only the SPL part.
>
> Prior to using binman, we could boot the i.MX8M boards by flashing
> only flash.bin.
>
> I would like to preserver the pre-U-Boot 2021.07, where only flash.bin
> was needed.

I had taken the binman configuration from imx8mq_cm_defconfig and
adapted it for my board (kontron-pitx-imx8m). I had copied the
flash.bin image to my SD card and am of the opinion that this had
started afterwards with the current u-boot. Unfortunately I can test
it only next week again, because I currently have no device at hand.

I must confess that I do not yet fully understand how binman works.

I'll get back to you next week.
Heiko Thiery Aug. 16, 2021, 6:01 a.m. UTC | #10
HI Fabrio and all,

Am Fr., 13. Aug. 2021 um 17:12 Uhr schrieb Heiko Thiery
<heiko.thiery@gmail.com>:
>
> Hi Fabio,
>
> Am Fr., 13. Aug. 2021 um 15:03 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
> >
> > Hi Heiko,
> >
> > On Fri, Aug 13, 2021 at 9:53 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >
> > > Maybe I'm wrong or I do not fully understand the limitation you're
> > > talking about, but as far as I understand the output (flash.bin) from
> > > the ronetix board [1] was generated using binman and includes all
> > > necessary parts. Is this right?
> >
> > Building the imx8mq_cm_defconfig generates flash.bin + u-boot.itb.
> >
> > If you only flash flash.bin, then you don't have a bootable system as
> > flash.bin contains only the SPL part.
> >
> > Prior to using binman, we could boot the i.MX8M boards by flashing
> > only flash.bin.
> >
> > I would like to preserver the pre-U-Boot 2021.07, where only flash.bin
> > was needed.
>
> I had taken the binman configuration from imx8mq_cm_defconfig and
> adapted it for my board (kontron-pitx-imx8m). I had copied the
> flash.bin image to my SD card and am of the opinion that this had
> started afterwards with the current u-boot. Unfortunately I can test
> it only next week again, because I currently have no device at hand.

You were right. I probably still had the old data from u-boot.itb on
the SD card and therefore the board still started correctly.

But I also think that the flash.bin should have the complete content
(spl + u-boot.itb) so that the board starts correctly.

Sorry for the noise.
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh
index fe12b7bb4b..c5fb9b0fc3 100755
--- a/arch/arm/mach-imx/mkimage_fit_atf.sh
+++ b/arch/arm/mach-imx/mkimage_fit_atf.sh
@@ -53,7 +53,7 @@  cat << __HEADER_EOF
 	description = "Configuration to load ATF before U-Boot";
 
 	images {
-		uboot@1 {
+		uboot-1 {
 			description = "U-Boot (64-bit)";
 			os = "u-boot";
 			data = /incbin/("$BL33");
@@ -68,7 +68,7 @@  cnt=1
 for dtname in $*
 do
 	cat << __FDT_IMAGE_EOF
-		fdt@$cnt {
+		fdt-$cnt {
 			description = "$(basename $dtname .dtb)";
 			data = /incbin/("$dtname");
 			type = "flat_dt";
@@ -79,7 +79,7 @@  cnt=$((cnt+1))
 done
 
 cat << __HEADER_EOF
-		atf@1 {
+		atf-1 {
 			description = "ARM Trusted Firmware";
 			os = "arm-trusted-firmware";
 			data = /incbin/("$BL31");
@@ -93,7 +93,7 @@  __HEADER_EOF
 
 if [ -f $BL32 ]; then
 cat << __HEADER_EOF
-		tee@1 {
+		tee-1 {
 			description = "TEE firmware";
 			data = /incbin/("$BL32");
 			type = "firmware";
@@ -108,7 +108,7 @@  fi
 cat << __CONF_HEADER_EOF
 	};
 	configurations {
-		default = "config@1";
+		default = "config-1";
 
 __CONF_HEADER_EOF
 
@@ -117,20 +117,20 @@  for dtname in $*
 do
 if [ -f $BL32 ]; then
 cat << __CONF_SECTION_EOF
-		config@$cnt {
+		config-$cnt {
 			description = "$(basename $dtname .dtb)";
-			firmware = "uboot@1";
-			loadables = "atf@1", "tee@1";
+			firmware = "uboot-1";
+			loadables = "atf-1", "tee-1";
 			fdt = "fdt@$cnt";
 		};
 __CONF_SECTION_EOF
 else
 cat << __CONF_SECTION1_EOF
-		config@$cnt {
+		config-$cnt {
 			description = "$(basename $dtname .dtb)";
-			firmware = "uboot@1";
-			loadables = "atf@1";
-			fdt = "fdt@$cnt";
+			firmware = "uboot-1";
+			loadables = "atf-1";
+			fdt = "fdt-$cnt";
 		};
 __CONF_SECTION1_EOF
 fi