cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP15 ECO 5.0.0 unable to generate FIP bin files due to TF-A / Optee build tool issues

debugging
Senior III

After building the TF-A from ECU 5.0.0 download (not the git). found the FIP folder and bin files. Deleted the FIP folder (export FIP_DEPLOYDIR_ROOT=$PWD/../../FIP_artifacts 

After running $ make -f $PWD/../Makefile.sdk all again the FIP folder and files are not generated anymore.Also tried make clean but no resolve.

Deleted the tf-a folder, restarted everything again (untar the tar etc...and followed all from the readme again ) but still not FIP folder or  files are generated, even the build does report the files were generate (see below output)

# for some reason this does not create the FIP folder and files  after the 1st time run ! it also delets the FIP_artifacts /arm... folder if run for a 2nd time ! this is the same with optee. Why is this designed this way ? the solution might be never ever run this:

$ make -f $PWD/../Makefile.sdk all

# for some reason this creates the FIP folder and output files but does not create default binaries

$ make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware all

How to regenerate FIP bin files to flash ?????

fiptool-stm32mp config:
optee:
bl32 config value: optee
devicetree config: stm32mp157c-ed1 stm32mp157f-ed1 stm32mp157a-ev1 stm32mp157c-ev1 stm32mp157d-ev1 stm32mp157f-ev1 stm32mp135f-dk stm32mp157a-dk1 stm32mp157d-dk1 stm32mp157c-dk2 stm32mp157f-dk2

Switch configuration:
FIP_BL31_ENABLE :

Output folders:
FIP_DEPLOYDIR_ROOT : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts
FIP_DEPLOYDIR_FIP : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/fip
FIP_DEPLOYDIR_TFA : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../deploy/bl32
FIP_DEPLOYDIR_BL31 : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../deploy/bl31
FIP_DEPLOYDIR_FWCONF: /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../deploy/fwconfig
FIP_DEPLOYDIR_OPTEE : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/optee
FIP_DEPLOYDIR_UBOOT : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/u-boot

 

24 REPLIES 24

/media/<partition> is a mounted hard drive. I have developed with this for over 12 years. Build uncountable kernels... never had issues.  why  would the scripts care if it only look at an output folder of ../.. ?

And there is a folder named  /fip wth binary files ? (.bin files) ? could you list the .bin files ?

 

@debugging ,
I try to understand the differentiate factor between you and me. Following wiki and README I have no issue, so I take each possibility into consideration to help you.

Rgs,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@debugging ,
Yes, please find below the tree of my FIP_artifacts folder:

 /media/szymanse/ESZ/test/FIP_artifacts> tree
.
├── arm-trusted-firmware
│   ├── fwconfig
│   │   ├── stm32mp135f-dk-fw-config-optee.dtb
│   │   ├── stm32mp157a-dk1-fw-config-optee.dtb
│   │   ├── stm32mp157a-ev1-fw-config-optee.dtb
│   │   ├── stm32mp157c-dk2-fw-config-optee.dtb
│   │   ├── stm32mp157c-ed1-fw-config-optee.dtb
│   │   ├── stm32mp157c-ev1-fw-config-optee.dtb
│   │   ├── stm32mp157d-dk1-fw-config-optee.dtb
│   │   ├── stm32mp157d-ev1-fw-config-optee.dtb
│   │   ├── stm32mp157f-dk2-fw-config-optee.dtb
│   │   ├── stm32mp157f-ed1-fw-config-optee.dtb
│   │   └── stm32mp157f-ev1-fw-config-optee.dtb
│   ├── metadata.bin
│   ├── tf-a-stm32mp135f-dk-sdcard.stm32
│   ├── tf-a-stm32mp135f-dk-uart.stm32
│   ├── tf-a-stm32mp135f-dk-usb.stm32
│   ├── tf-a-stm32mp157a-dk1-sdcard.stm32
│   ├── tf-a-stm32mp157a-dk1-uart.stm32
│   ├── tf-a-stm32mp157a-dk1-usb.stm32
│   ├── tf-a-stm32mp157a-ev1-emmc.stm32
│   ├── tf-a-stm32mp157a-ev1-nand.stm32
│   ├── tf-a-stm32mp157a-ev1-nor.stm32
│   ├── tf-a-stm32mp157a-ev1-sdcard.stm32
│   ├── tf-a-stm32mp157a-ev1-uart.stm32
│   ├── tf-a-stm32mp157a-ev1-usb.stm32
│   ├── tf-a-stm32mp157c-dk2-sdcard.stm32
│   ├── tf-a-stm32mp157c-dk2-uart.stm32
│   ├── tf-a-stm32mp157c-dk2-usb.stm32
│   ├── tf-a-stm32mp157c-ed1-emmc.stm32
│   ├── tf-a-stm32mp157c-ed1-sdcard.stm32
│   ├── tf-a-stm32mp157c-ed1-uart.stm32
│   ├── tf-a-stm32mp157c-ed1-usb.stm32
│   ├── tf-a-stm32mp157c-ev1-emmc.stm32
│   ├── tf-a-stm32mp157c-ev1-nand.stm32
│   ├── tf-a-stm32mp157c-ev1-nor.stm32
│   ├── tf-a-stm32mp157c-ev1-sdcard.stm32
│   ├── tf-a-stm32mp157c-ev1-uart.stm32
│   ├── tf-a-stm32mp157c-ev1-usb.stm32
│   ├── tf-a-stm32mp157d-dk1-sdcard.stm32
│   ├── tf-a-stm32mp157d-dk1-uart.stm32
│   ├── tf-a-stm32mp157d-dk1-usb.stm32
│   ├── tf-a-stm32mp157d-ev1-emmc.stm32
│   ├── tf-a-stm32mp157d-ev1-nand.stm32
│   ├── tf-a-stm32mp157d-ev1-nor.stm32
│   ├── tf-a-stm32mp157d-ev1-sdcard.stm32
│   ├── tf-a-stm32mp157d-ev1-uart.stm32
│   ├── tf-a-stm32mp157d-ev1-usb.stm32
│   ├── tf-a-stm32mp157f-dk2-sdcard.stm32
│   ├── tf-a-stm32mp157f-dk2-uart.stm32
│   ├── tf-a-stm32mp157f-dk2-usb.stm32
│   ├── tf-a-stm32mp157f-ed1-emmc.stm32
│   ├── tf-a-stm32mp157f-ed1-sdcard.stm32
│   ├── tf-a-stm32mp157f-ed1-uart.stm32
│   ├── tf-a-stm32mp157f-ed1-usb.stm32
│   ├── tf-a-stm32mp157f-ev1-emmc.stm32
│   ├── tf-a-stm32mp157f-ev1-nand.stm32
│   ├── tf-a-stm32mp157f-ev1-nor.stm32
│   ├── tf-a-stm32mp157f-ev1-sdcard.stm32
│   ├── tf-a-stm32mp157f-ev1-uart.stm32
│   └── tf-a-stm32mp157f-ev1-usb.stm32
├── fip
│   ├── fip-stm32mp135f-dk-optee.bin
│   ├── fip-stm32mp157a-dk1-optee.bin
│   ├── fip-stm32mp157a-ev1-optee.bin
│   ├── fip-stm32mp157c-dk2-optee.bin
│   ├── fip-stm32mp157c-ed1-optee.bin
│   ├── fip-stm32mp157c-ev1-optee.bin
│   ├── fip-stm32mp157d-dk1-optee.bin
│   ├── fip-stm32mp157d-ev1-optee.bin
│   ├── fip-stm32mp157f-dk2-optee.bin
│   ├── fip-stm32mp157f-ed1-optee.bin
│   └── fip-stm32mp157f-ev1-optee.bin
├── optee
│   ├── tee-header_v2-stm32mp135f-dk.bin
│   ├── tee-header_v2-stm32mp157a-dk1.bin
│   ├── tee-header_v2-stm32mp157a-ev1.bin
│   ├── tee-header_v2-stm32mp157c-dk2.bin
│   ├── tee-header_v2-stm32mp157c-ed1.bin
│   ├── tee-header_v2-stm32mp157c-ev1.bin
│   ├── tee-header_v2-stm32mp157d-dk1.bin
│   ├── tee-header_v2-stm32mp157d-ev1.bin
│   ├── tee-header_v2-stm32mp157f-dk2.bin
│   ├── tee-header_v2-stm32mp157f-ed1.bin
│   ├── tee-header_v2-stm32mp157f-ev1.bin
│   ├── tee-pageable_v2-stm32mp135f-dk.bin
│   ├── tee-pageable_v2-stm32mp157a-dk1.bin
│   ├── tee-pageable_v2-stm32mp157a-ev1.bin
│   ├── tee-pageable_v2-stm32mp157c-dk2.bin
│   ├── tee-pageable_v2-stm32mp157c-ed1.bin
│   ├── tee-pageable_v2-stm32mp157c-ev1.bin
│   ├── tee-pageable_v2-stm32mp157d-dk1.bin
│   ├── tee-pageable_v2-stm32mp157d-ev1.bin
│   ├── tee-pageable_v2-stm32mp157f-dk2.bin
│   ├── tee-pageable_v2-stm32mp157f-ed1.bin
│   ├── tee-pageable_v2-stm32mp157f-ev1.bin
│   ├── tee-pager_v2-stm32mp135f-dk.bin
│   ├── tee-pager_v2-stm32mp157a-dk1.bin
│   ├── tee-pager_v2-stm32mp157a-ev1.bin
│   ├── tee-pager_v2-stm32mp157c-dk2.bin
│   ├── tee-pager_v2-stm32mp157c-ed1.bin
│   ├── tee-pager_v2-stm32mp157c-ev1.bin
│   ├── tee-pager_v2-stm32mp157d-dk1.bin
│   ├── tee-pager_v2-stm32mp157d-ev1.bin
│   ├── tee-pager_v2-stm32mp157f-dk2.bin
│   ├── tee-pager_v2-stm32mp157f-ed1.bin
│   └── tee-pager_v2-stm32mp157f-ev1.bin
└── u-boot
├── u-boot-nodtb-stm32mp13.bin
├── u-boot-nodtb-stm32mp15.bin
├── u-boot-stm32mp135f-dk.dtb
├── u-boot-stm32mp157a-dk1.dtb
├── u-boot-stm32mp157a-ev1.dtb
├── u-boot-stm32mp157c-dk2.dtb
├── u-boot-stm32mp157c-ed1.dtb
├── u-boot-stm32mp157c-ev1.dtb
├── u-boot-stm32mp157d-dk1.dtb
├── u-boot-stm32mp157d-ev1.dtb
├── u-boot-stm32mp157f-dk2.dtb
├── u-boot-stm32mp157f-ed1.dtb
└── u-boot-stm32mp157f-ev1.dtb

5 directories, 116 files

 

Rgs,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Here you go.

I had all of that the 1st time I ran the scripts, but runs after that it disappeared.  I have the .stm32 files and the fwconfig, but the rest is missing. Did you try to delete the FIP root folder and run it the build again ? Can't get my head around it.

@debugging ,
The issue you are facing is due to the last error appearing in your logs, last line. The fiptool generation step is made after, but you are blocked because of the following line:

Missing u-boot-stm32mp157c-ed1.dtb file in folder: '$FIP_DEPLOYDIR_UBOOT' or '$FIP_DEPLOYDIR_ROOT/u-boot' ...
 
Are you sure that the original files present in FIP_artifacts are still present ? Did you erase it ? The Makefile.sdk needs to find them to generate everything well, this is not only a deploy folder, but also an artifacts source folder.
Kind regards,
Erwan.
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I extracted the tar again applied the patches and ran the script again in a new folder. exactly the same result. and this error must be from the original  Why does this error occur ? I did not modify anything or removed that file

BTW I also tried this using the git repo directly from github and the same thing happens. + the readme does not define $FIP_DEPLOYDIR_UBOOT , Is this set in your environment. Why is the script looking for that path ?

 

The Makefile.sdk file is here to provide an upper stack to the classical Makefile, and then combine make operations + fiptool operations instead of doing it one after the other. It is supposed to simplify the process.

Can you confirm me that you can see the u-boot-stm32mp157c-ed1.dtb that is present by default in FIP_artifacts, with doing:

 ls /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/u-boot

?

Thx
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I have the .stm32 files and the fwconfig, but the rest is missing. as shown in the tree dumps. BUT only when I use make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware all to specify the output folder . Without that the FIP_artifacts folder isn't created at all.

ser@H3:/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm 32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0$ls /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/u-boot
ls: cannot access '/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/u-boot': No such file or directory
user@H3:/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0$ls /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/
ls: cannot access '/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../../FIP_artifacts/': No such file or directory
user@H3:/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0$ls /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0/tf-a-stm32mp-v2.8.6-stm32mp-r1/../..
artifacts.txt linux-stm32mp-6.1.28-stm32mp-r1-r0 test u-boot-stm32mp-v2022.10-stm32mp-r1-r0
gcnano-driver-stm32mp-6.4.13-stm32mp-r1-r0 optee-os-stm32mp-3.19.0-stm32mp-r1-r0 tf-a-stm32mp-v2.8.6-stm32mp-r1-r0
user@H3:/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/linux/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/tf-a-stm32mp-v2.8.6-stm32mp-r1-r0$