Cube MX + ecosystem 5 + custom stm32mp153 board results in missing dtb needed for optee build
Hi all.
I'm working through the lab material for the STM32MP1 workshop and have run into a snag after following the "extra hands on" presentation "Lab-MP15_FromPartNumber_To_BasicDeviceTree_with_CubeMx.pdf". My high level goal is to get binaries (TF-A, FIP) to enable production eMMC programming via USB DFU.
While we've got working eMMC images produced by buildroot (based on an earlier version of the ecosystem) we've discovered that the versions of the boot chain we're using don't support USB DFU (specifically TF-A).
To remedy I've gone through the lab materials and Cube MX for ecosystem 5 along with modifications for our custom board and have the resulting input DTS files for building the boot chain binaries:
├── kernel
│ └── stm32mp153c-som-dfu-mx.dts
├── optee-os
│ └── stm32mp153c-som-dfu-mx.dts
├── tf-a
│ ├── stm32mp15-mx.dtsi
│ ├── stm32mp153c-som-dfu-mx-fw-config.dts
│ └── stm32mp153c-som-dfu-mx.dts
└── u-boot
├── stm32mp153c-som-dfu-mx-u-boot.dtsi
└── stm32mp153c-som-dfu-mx.dts
I've muddled my way through building TF-A with the following make command:
$ make -f $PWD/../Makefile.sdk TF_A_CONFIG="usb" TF_A_DEVICETREE=stm32mp153c-som-dfu-mx all
This results in a binary that I can load up with via USB DFU which boots up to the point where optee loads and then fails during execution as its built-in DTB does not match our custom board (I'm starting with DK2 binaries and replacing them as I go).
Next I try building optee:
$ CFG_STM32MP_PROFILE=system_services CFG_DRAM_SIZE=0x20000000 make -f $PWD/../Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=stm32mp153c-som-dfu-mx all
This builds fine until fiptool is called:
FIP_DEPLOYDIR_OPTEE=/home/user/<snip>/sources/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../deploy FIP_DEVICETREE="stm32mp153c-som-dfu-mx" FIP_CONFIG="optee" FIP_BL32_CONF="optee" fiptool-stm32mp
fiptool-stm32mp config:
optee:
bl32 config value: optee
devicetree config: stm32mp153c-som-dfu-mx
Switch configuration:
FIP_BL31_ENABLE :
Output folders:
FIP_DEPLOYDIR_ROOT :
FIP_DEPLOYDIR_FIP : /fip
FIP_DEPLOYDIR_TFA : /arm-trusted-firmware/bl32
FIP_DEPLOYDIR_BL31 : /arm-trusted-firmware/bl31
FIP_DEPLOYDIR_FWCONF: /arm-trusted-firmware/fwconfig
FIP_DEPLOYDIR_OPTEE : /home/user/<snip>/sources/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../deploy
FIP_DEPLOYDIR_UBOOT : /u-boot
Missing stm32mp153c-som-dfu-mx-fw-config-optee.dtb file in folder: $FIP_DEPLOYDIR_FWCONF or '$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/fwconfig'
This DTB is nowhere to be found in the source code tree. How is it to be made? I'm assuming I've skipped a step or two.
