2025-06-07 4:44 AM - edited 2025-06-07 4:46 AM
Can someone explain how to build own custom yocto linux ?
I have experience with raspberry pi, but stm32mp2 have none normal explanation.
I have cloned from git scarthgap branch of poky, meta-openembedded, meta-st-stm32mp and meta-st-openlinux. Also, I have downloaded stm32mp SDK.
I can't understand if cubemx project for the board is needed ?
if needed how to add it if I have generated it ? I have many years of embedded programming of stm32
I can't find any build machine for bitbake for stm32mp257f-ev1 ?
Overall, trying to build default machine="stm32mp2" gives plenty errors, which I cannot understand.
Maybe someone can provide very direct explanation for building image ?
Solved! Go to Solution.
2025-06-11 12:42 PM
Thank You @PatrickF
However provided references not giving any real information on development, just concept. practically documentation is shity.
I have solved in few days but it was to long.
1. Download source code
git clone -b scarthgap https://github.com/yoctoproject/poky.git
git clone -b scarthgap https://git.openembedded.org/meta-openembedded
git clone -b scarthgap https://github.com/STMicroelectronics/meta-st-stm32mp.git
git clone -b scarthgap https://github.com/STMicroelectronics/meta-st-openstlinux.git
2. Make build enviroment
source poky/oe-init-build-env
3. modify local.conf in build → conf
MACHINE = "stm32mp2"
DISTRO ?= "openstlinux-weston"
ACCEPT_EULA_stm32mp2 = "1"
PREFERRED_VERSION_libcamera = "0.3.0"
Here a problems with default libcamera 0.4.0 so it is needed to downgrade
4. modify bblayers.conf in build → conf
BBLAYERS ?= " \
/home/raimondas/poky/meta \
/home/raimondas/poky/meta-poky \
/home/raimondas/poky/meta-yocto-bsp \
/home/raimondas/meta-openembedded/meta-oe \
/home/raimondas/meta-openembedded/meta-multimedia \
/home/raimondas/meta-openembedded/meta-networking \
/home/raimondas/meta-openembedded/meta-python \
/home/raimondas/meta-openembedded/meta-gnome \
/home/raimondas/meta-openembedded/meta-webserver \
/home/raimondas/meta-st-stm32mp \
/home/raimondas/meta-st-openstlinux \
/home/raimondas/build/workspace \
"
5. modify file name
from
/home/raimondas/meta-st-openstlinux/oe-core/recipes-core/systemd/systemd_255.13.bbappend
to
/home/raimondas/meta-st-openstlinux/oe-core/recipes-core/systemd/systemd_255.18.bbappend
6. build
bitbake st-image-weston
or
bitbake st-image-core #this one only using ssh, it's headless.
7. preparing to flash emmc
cd ~/build/tmp-glibc/deploy/images/stm32mp2
and
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-core/optee/FlashLayout_emmc_stm32mp257f-ev1-optee.tsv
Whats all for basic setup.
I wanted something as core-image-base or minimal, with hdmi/dsi output, but this time it is not supported currently.
2025-06-11 4:32 AM
Hi @raimondas
there is many information inside wiki
https://wiki.st.com/stm32mpu/wiki/Which_STM32MPU_Embedded_Software_Package_better_suits_your_needs
https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package
Regards.
2025-06-11 12:42 PM
Thank You @PatrickF
However provided references not giving any real information on development, just concept. practically documentation is shity.
I have solved in few days but it was to long.
1. Download source code
git clone -b scarthgap https://github.com/yoctoproject/poky.git
git clone -b scarthgap https://git.openembedded.org/meta-openembedded
git clone -b scarthgap https://github.com/STMicroelectronics/meta-st-stm32mp.git
git clone -b scarthgap https://github.com/STMicroelectronics/meta-st-openstlinux.git
2. Make build enviroment
source poky/oe-init-build-env
3. modify local.conf in build → conf
MACHINE = "stm32mp2"
DISTRO ?= "openstlinux-weston"
ACCEPT_EULA_stm32mp2 = "1"
PREFERRED_VERSION_libcamera = "0.3.0"
Here a problems with default libcamera 0.4.0 so it is needed to downgrade
4. modify bblayers.conf in build → conf
BBLAYERS ?= " \
/home/raimondas/poky/meta \
/home/raimondas/poky/meta-poky \
/home/raimondas/poky/meta-yocto-bsp \
/home/raimondas/meta-openembedded/meta-oe \
/home/raimondas/meta-openembedded/meta-multimedia \
/home/raimondas/meta-openembedded/meta-networking \
/home/raimondas/meta-openembedded/meta-python \
/home/raimondas/meta-openembedded/meta-gnome \
/home/raimondas/meta-openembedded/meta-webserver \
/home/raimondas/meta-st-stm32mp \
/home/raimondas/meta-st-openstlinux \
/home/raimondas/build/workspace \
"
5. modify file name
from
/home/raimondas/meta-st-openstlinux/oe-core/recipes-core/systemd/systemd_255.13.bbappend
to
/home/raimondas/meta-st-openstlinux/oe-core/recipes-core/systemd/systemd_255.18.bbappend
6. build
bitbake st-image-weston
or
bitbake st-image-core #this one only using ssh, it's headless.
7. preparing to flash emmc
cd ~/build/tmp-glibc/deploy/images/stm32mp2
and
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-core/optee/FlashLayout_emmc_stm32mp257f-ev1-optee.tsv
Whats all for basic setup.
I wanted something as core-image-base or minimal, with hdmi/dsi output, but this time it is not supported currently.