Short manual how to prepare Linux Qt5 image in ST Yocto
The tutorial is dedicated to Linux users
NOTE: The Following description based on description from the manufacturer webpage
1. Create main directory for Yocto purposes
2. Go to created folder
4. Initialize repo
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-4.19-thud-mp1-19-02-20
and synchronize repo
In this place some modification in Yocto are necessary.
First open file
and remove from line 141
next remove from line 149
Note: Removed “openocd due to some problem with the package itself. For this purposes application “openocd” is not necessary.
and finally remove from line 150
Store file after deletion.
Next open file
Add two lines after “export QT_QPA_PLATFORM=eglfs”
After modification store the file. Modifed file should look like below
if [ -e /usr/share/qt5/cursor.json ];
5. Choose DISTRO. Valid DISTRO for QT5 purpose is
DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
NOTE: Accept all necessary agreements
6. When DISTRO is choosen it is good time to start compile QT5 image for STM32MP1
7. After couple of hours 😉 image should be ready
8. Create image for SD-Card using dedicated script. So go to
folder and execute following command to generate *.raw file for SD-Card
9. After image generation script suggest how to write an image to SD-Card.
sudo dd if=../flashlayout_st-example-image-qt/../flashlayout_st-example-image-qt_FlashLayout_sdcard_stm32mp157c-dk2-optee.raw of=/dev/mmcblk0 bs=8M conv=fdatasync status=progress
NOTE: Only thing to do is replace if necessary of=/dev/mmcblk0 to of=/dev/sdx for instance. Be aware wrong specification of “of=/dev/..” can damage Your local system, check twice !. To check where the SD-Card is connected “df -h” command can be useful
10. Insert SD-Card in to SD-Card slot in development board and check if boot pins are configured as follow
11. Connect USB C wire located near distance of SD-CARD slot. System should start
12. Connect ethernet wire to ethernet connector and check it IP address.
13. Using ssh log in on to board
ssh 192.168.x.y -l root
NOTE: Accept key
14. Remove “psplash-drm service permanently to be able run QT5 application. To do this issue following commands
systemctl stop psplash-drm-start
systemctl disable psplash-drm-start
15. Next compile QT5 toolchain in Yocto. Go back again to main Yocto build folder
and execute toolchain generation. This process can take a lot of hours.
NOTE: During compilation some WARNINGS can appears
16. Next step is install sdk into system. Go to directory
Note: Accept all agreements and choose default proposed installation place
17. When installation finished created on Your desktop two files
activator stm32_qtcreator and stm32_qtcreator.sh
Use activator stm32_qtcreator to open QTCreator application. This process is necessary because “. /opt/st/stm32mp1/2.6-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi” set all necessary export, path etc. demanded by QTCreator to proper make a cross-compilation.
18. Last thing to do is create Kit for STM32 into QTCreator application