Forums › Devices › OSD32MP15x › ST Distribution Image on OSD32MP1-BRK board
Hello,
I am new to the embedded Linux world, I was working on a project on STM32mp157c-DK2 board and I found an example on ST wiki that helped me quite a lot. I was able to modify the Linux user space application and the firmware of the example to suit my needs. Then I wanted access to more GPIO pins, so I got the OSD32MP1-BRK board but I now am having difficulties to run the system on the OSD32MP1-BRK board (which is already running on the STM32mp157c-DK2).
I used to flash the image using the STM32CubeProgrammer using the .tsv file from the distribution package, this doesn’t seem to be the case with the OSD32MP1-BRK as it is recommended in the getting started page to use balenaEtcher application to flash a provided image directly on the SDcard, the provided image is a .zip file and doesn’t have a .tsv file like ST distribution package ones.
I tried to use the SDcard flashed by STM32CubeProgrammer with the ST starter package on the OSD32MP1-BRK but that didn’t work (the log file is attached). The boot loader stops and doesn’t load the kernel from the SDcard and tries to boot over usb. Another interesting line in the log is “Fastboot key pressed, STM32Programmer key pressed, entering download mode…”, please consider that I have set the boot mode switches correctly and everything is working just fine if I am using the image provided by OCTAVO.
My question is how to run an image that is running on another st board on the OSD32MP1-BRK, what exactly should I change?, or is there a distribution package based also on yocto project that can generate an image configured for the OSD32MP1-BRK board?
Best regards,
ELhawy
ELhawy,
There are multiple ways to run images from other development boards on the BRK. But, before doing that, there are important changes you need to make to the board configuration as the hardware is not the same on the DK2 and the BRK.
Notably, the BRK does not have the USB-C configuration of the DK-2. The error you are experiencing is because on the DK2, U-Boot(second stage bootloader) performs checks for the USB-C configuration and stops because it cannot verify the configuration.
Ideally, you would need to change the device trees for TF-A, U-Boot and the Kernel to modify the image to boot from the BRK. Because the BRK has the same SD-card configuration as the DK2 (minus the card detect pin), it is possible to run DK2 images with minor modifications. Mainly, you will need to change the following configurations:
Get rid of the ADC configuration here:Â https://github.com/STMicroelectronics/u-boot/blob/v2020.01-stm32mp/arch/arm/dts/stm32mp15xx-dkx.dtsi#L100
Get rid of fastboot and adc configuration here:Â https://github.com/STMicroelectronics/u-boot/blob/v2020.01-stm32mp/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi#L21.
Altering or recompiling can be done by use of Developer Package:Â https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package.
Please make sure you are working on the appropriate kernel version as ST has recently updated the BSP. The current BRK device tree image and device tree is for 4.19 Kernel, while work on support for Kernel 5.4 is on the way.
Best,
Neeraj
Thanks Neeraj,
Your reply was quite clear and helpful, but applying only these modifications to u-boot device tree wasn’t enough to get the Kernel to be booted, the second stage boot loader (u-boot) still checks for Stm32CubeProgrammer pin and if it is active the boot loader doesn’t load the Kernel. I found some solutions to overcome this problem for any image that is configured for DK2 board.
1 2 3 4 5 6 7 8 9 10 11 12 13 | if (gpio_request_by_name_nodev(node, "st,stm32prog-gpios", 0, &gpio, GPIOD_IS_IN)) { debug("%s: could not find a /config/st,stm32prog-gpios\n", __func__); } else { if (dm_gpio_get_value(&gpio)) { puts("STM32Programmer key pressed, "); boot_mode = BOOT_STM32PROG; } dm_gpio_free(NULL, &gpio); } I have also attached the modified file with these lines commented (lines 147 to 159) |
Best regards,
Elhawy
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields