Yocto: Getting Started with the STM32MP157

Introduction

wip:

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

Required packages (Debian 10)

sudo apt install bc build-essential chrpath cpio diffstat gawk git python texinfo wget gdisk

Download Yocto

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

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

Add stm32mp layers

cd $HOME/yocto-labs/
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