Solved
STM32MP1 - How to start the coprocessor from the bootloader
I am working on a STM32MP157D-DK1 board, and I am trying to follow the guide from the wiki to start the coprocessor from u-boot:
I have pulled the u-boot source code:
devtool modify u-boot-stm32mp
And modified include/configs/stm32mp15_st_common.h to contain:
#define CONFIG_EXTRA_ENV_SETTINGS \
STM32MP_MEM_LAYOUT \
STM32MP_BOOTCMD \
STM32MP_PARTS_DEFAULT \
BOOTENV \
"m4fw_name=my-m4-fw.elf\0" \
"m4fw_addr=${kernel_addr_r}\0" \
"boot_m4fw=rproc init; rproc load 0 ${m4fw_addr} ${filesize}; rproc start 0\0" \
"boot_m4_mmc0=if load mmc 0#bootfs ${m4fw_addr} ${m4fw_name} ; then run boot_m4fw; fi;\0"\
"bootcmd=echo \"Loading the firmware!\"; echo \"ELF files is: ${m4fw_name}\"; run boot_m4_mmc0; run bootcmd_mmc0\0"
I have rebuild the distribution as:
bitbake st-image-weston
(No issues or erros)
and uploaded all image files via CubeProgrammer using the FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv file.
I have copied the my-m4-fw.elf to the bootfs partition, but when u-boot launches and I type in:
STM32MP> env print bootcmd
I still get:
bootcmd=run bootcmd_stm32mp
instead of the command I manually configured from the wiki example.
What am I doing wrong?
