cancel
Showing results for 
Search instead for 
Did you mean: 

stm32mp257f-EV1 yocto

raimondas
Associate II

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions
raimondas
Associate II

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.

 

 

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
raimondas
Associate II

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.