My custom board is based on stm32mp157a-dk1,remove the pmic and usb type c circuit,
My porting steps are as follows:
1. porting u-boot, verify that u-boot functions properly, compile the uboot trusted image, copy u-boot.dtb to FIP_artifacts/u-boot/ and rename it to u-boot-stm32mp157a-custom-trusted.dtb, copy u-boot- nodtb.bin to FIP_artifacts/u-boot/ and rename it to u-boot-nodtb-stm32mp15.bin
2. modify optie-os-stm32mp-3.12.0.r1-r0 source code, add custom dtsi and dts file, modify dtsi and dts file, add custom board in Makefile.sdk file CFG_EMBED_DTB_SOURCE_FILE, use make -f $PWD/ ... /Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=stm32mp157a-custom all command to generate tee-header_v2-stm32mp157a-custom.bin, tee-pageable_v2-stm32mp157a -custom.bin, tee-pager_v2-stm32mp157a-custom.bin three files and copied to the FIP_artifacts/optee/ directory, in the use of the command is an error prompt can not find other custom board related files in the FIP_artifacts/ directory, but can generate corresponding .bin files
3. Modify the tf-a source code, add custom device tree and custom-fw-config.dts, modify the corresponding device tree file, add custom board define in Makefile.sdk ,use make -f $PWD/... /Makefile.sdk -j8 TFA_DEVICETREE=stm32mp157a-custom TF_A_CONFIG=trusted ELF_DEBUG_ENABLE='1' all command to generate bl32 fwconfig folder and Copy the bl32 fwconfig folder to the FIP_artifacts/arm-trusted-firmware folder , use the command to generate the bl32 fwconfig folder with the error that some files under FIP_artifacts/ cannot be found, but it does not affect the generation of the bl32 fwconfig folder and corresponding files. fwconfig folder and the corresponding files
4. Use make -f $PWD/... /Makefile.sdk -j8 fip command to generate the fip-stm32mp157a-custom-trusted.bin and tf-a-stm32mp157a-custom-sdcard.stm32 firmware, using
sudo dd if=tf-a-stm32mp157a-custom-sdcard.stm32 of=/dev/sdb1 conv=fdatasync
sudo dd if=tf-a-stm32mp157a-custom-sdcard.stm32 of=/dev/sdb2 conv=fdatasync
sudo dd if=fip-stm32mp157a-custom-trusted.bin of=/dev/sdb3 conv=fdatasync
Synchronize the firmware and select the sd card to boot
As a result the serial port prints the following message.
PANIC at PC : 0x2fff2d17
Exception mode=0x00000016 at: 0x2fff2d17
The only thing I can guarantee is that u-boot has been successfully ported and working, other parts of the port only modify the device tree file, each part of the device tree are referred to the u-boot device tree to do cut, I hope someone can solve my problem!
Thank you very much!
Hi @ZYong.2 ,
Just starting to look at your post.
Nothing obvious so far.
Did you progress your side ?
Please confirm what you have shared is the TF-A dts ?
Can you share the complete boot log trace.
Thank you for your reply, I have not solved this problem at the moment, the file I shared is the device tree file that needs to be modified to generate the custom TF-A, the file is referenced to the stm32mp157a-dk1 development board and modified according to the steps I mentioned.
maybe a classic pitfall: our boards DTs are defining HSE in bypass for external oscillator. If you use a crystal, you need to adapt DT.
Could be also linked to issue during DDR initialization (which involve PMIC on our board to start related supplies).
You should first focus on HW related changes Vs STM32MP157A-DK1 which might need DT changes.