2025-09-23 2:07 AM - edited 2025-09-23 2:08 AM
I have an STM32MP257F-DK and attempting to build STM32 Distro using docker as it requires an older Ubuntu version.
After creating docker images and installing all requires packages, enter container as non-root:
Following steps
uild@916e5975cf9f:~/yocto$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11
repo: reusing existing repo client checkout in /home/build/yocto
repo has been initialized in /home/build/yocto
build@916e5975cf9f:~/yocto$ repo sync
Syncing: 85% (6/7), done in 2.957s
Syncing: 100% (7/7) 0:05 | 1 job | 0:02 bitbake @ layers/openembedded-core/bitbakerepo sync has finished successfully.
build@916e5975cf9f:~/yocto$ DISTRO=openstlinux-weston MACHINE=stm32mp25-disco source layers/meta-st/scripts/envsetup.sh IMAGE=st-image-weston
[ERROR] 'IMAGE=st-image-weston' : please provide BUILD_DIR with 'build' prefix.
build@916e5975cf9f:~/yocto$ ^C
build@916e5975cf9f:~/yocto$
Tried:
export BUILD_DIR="${TOPDIR}/build-${PN}"
results in.:
[ERROR] BUILD_DIR is already defined to '/build-'. Please clarify if you really want to set it to 'IMAGE=st-image-weston'
then
DISTRO=openstlinux-weston MACHINE=stm32mp25-disco source layers/meta-st/scripts/envsetup.sh
results in:
HOST DISTRIB check]
Linux Distrib: Ubuntu
Linux Release: 20.04
Required packages for Linux Distrib:
bsdmainutils build-essential chrpath cpio debianutils diffstat gawk gcc-multilib git git-lfs iputils-ping libegl1-mesa libgmp-dev libmpc-dev libsdl1.2-dev libssl-dev lz4 pylint python3 python3-git python3-jinja2 python3-pexpect python3-pip socat texinfo unzip wget xterm xz-utils zstd
Check OK: all required packages are installed on host.
[source layers/openembedded-core/oe-init-build-env][from nothing]
mkdir: cannot create directory '/build-': Permission denied
Error: The build directory (/build-) does not exist!