Yocto: Getting Started with the STM32MP157

Introduction

wip:

mkdir $HOME/yocto-labs/
cd $HOME/yocto-labs/

Required packages (Debian)

sudo apt install bc build-essential chrpath cpio diffstat gawk git libssl-dev texinfo wget gdisk python3-distutils zstd

Use bash…

sudo dpkg-reconfigure dash
#select no

Download Yocto (Dunfell 3.1)

https://git.yoctoproject.org/poky/refs/

cd $HOME/yocto-labs/
git clone -b dunfell-23.0.25 git://git.yoctoproject.org/poky.git

Add stm32mp layers

git clone -b dunfell git://git.openembedded.org/meta-openembedded
git clone -b dunfell https://github.com/STMicroelectronics/meta-st-stm32mp.git

Set up the build environment

cd $HOME/yocto-labs/
source poky/oe-init-build-env

Update conf/bblayers.conf:

BBLAYERS ?= " \
  /home/<username>/yocto-labs/poky/meta \
  /home/<username>/yocto-labs/poky/meta-poky \
  /home/<username>/yocto-labs/poky/meta-yocto-bsp \
  "
BBLAYERS ?= " \
  /home/<username>/yocto-labs/poky/meta \
  /home/<username>/yocto-labs/poky/meta-poky \
  /home/<username>/yocto-labs/poky/meta-yocto-bsp \
  /home/<username>/yocto-labs/meta-openembedded/meta-oe \
  /home/<username>/yocto-labs/meta-openembedded/meta-python \
  /home/<username>/yocto-labs/meta-st-stm32mp \
  "

Build

MACHINE=stm32mp1 bitbake core-image-minimal

Download Yocto (Kirkstone 4.0)

https://git.yoctoproject.org/poky/refs/

cd $HOME/yocto-labs/
git clone -b kirkstone-4.0.10 git://git.yoctoproject.org/poky.git

Add stm32mp layers

git clone -b kirkstone git://git.openembedded.org/meta-openembedded
git clone -b kirkstone https://github.com/STMicroelectronics/meta-st-stm32mp.git

Set up the build environment

cd $HOME/yocto-labs/
source poky/oe-init-build-env

Update conf/bblayers.conf:

BBLAYERS ?= " \
  /home/<username>/yocto-labs/poky/meta \
  /home/<username>/yocto-labs/poky/meta-poky \
  /home/<username>/yocto-labs/poky/meta-yocto-bsp \
  "
BBLAYERS ?= " \
  /home/<username>/yocto-labs/poky/meta \
  /home/<username>/yocto-labs/poky/meta-poky \
  /home/<username>/yocto-labs/poky/meta-yocto-bsp \
  /home/<username>/yocto-labs/meta-openembedded/meta-oe \
  /home/<username>/yocto-labs/meta-openembedded/meta-python \
  /home/<username>/yocto-labs/meta-st-stm32mp \
  "

Build

MACHINE=stm32mp1 bitbake core-image-minimal

A post was split to a new topic: Yocto: STM32MP157