hi can any one mention the steps to image for stm32mp135d-odyssey using yocto
You can check here: ODYSSEY- STM32MP135D with eMMC - STMicroelectronics Community
The above mentioned is for buildroot, can you provide steps with building using yocto.
Hello,
I have the same need as you: I’d like to prepare a Yocto image for the board. I’ve gone through the entire ST document, but I’m not sure whether using OpenSTLinux with MACHINE=stm32mp1 is sufficient, or if a dedicated BSP is required for the ODYSSEY board.
I just found this SDU GitHub layer, which seems to be the correct layer for the ODYSSEY-STM32MP135D board, on Github Seed Studio I found meta-st-odyssey ? is it ?
Thanks!
Hi, can you provide the link to that GitHub repository? I think the Seeed Studio meta-st-odyssey repository provides support for the STM32MP157C-Odyssey, but I’m not sure if it supports the STM32MP135D-Odyssey.
Unfortunately, you’re right, the repository on GitHub is for the 157 and not for the 153. However, I read on the ST forum that some users managed to use the OpenSTLinux image by adapting the Device Tree, so I need to give it a try. The board arrived today, and right now I can’t even connect via USB to the debug pins.
Hi @amatteo78 did you manage to get Yocto image built for STM32MP153 ?
Please share your insights.
Thanks!
Hi there,
So I see the process is around 3-4 steps and since we sort of know the SDU layer. I like what yocto brings to the board if successful.
AFAIK , To build a Yocto image for the:
, you should use the official OpenSTLinux Distribution Package provided by STMicroelectronics, which is based on the Yocto Project.
The process involves setting up your host machine, fetching the source code with the repo tool, and then using bitbake to build the image.
Prerequisites
- A powerful Linux host machine with at least 8 GB of RAM and 120 GB of disk space. Ubuntu 18.04 or later is recommended.
- Install the required software packages for the Yocto build environment, including
repo. - Ensure a stable internet connection, as the process downloads a large amount of source data.
Step 1: Initialize the build environment
- Create a working directory and use the
repotool to fetch the OpenSTLinux manifest file. This example uses a recent stable release, but you can choose another from the official STMicroelectronics manifest repository.
mkdir st-yocto
cd st-yocto
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23
Step2. Synchronize the repositories: Download all necessary source code and Yocto layers. This step can take a significant amount of time.
repo sync
Step 2: Configure and build the image
- Set up the Yocto environment by sourcing the
envsetup.shscript. You must specify theDISTROandMACHINE. For the STM32MP153, theMACHINEisstm32mp1. This step automatically creates and enters abuilddirectory.
DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
- Build the target image using
bitbake. For a minimal image, usecore-image-minimal. The build process can take several hours depending on your host machine’s performance.
bitbake st-image-weston
- 1. Note: For a basic image without a graphical interface, you can substitute
st-image-westonwithst-image-core.
Step 3: Deploy the image
- Generate the SD card image after the build completes. This involves using a script located in your build directory.
cd tmp-glibc/deploy/images/stm32mp1/scripts
./create_sdcard_from_flashlayout.sh ../flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp1-trusted.tsv
- Write the image to an SD card . The raw image file (
FlashLayout_sdcard_stm32mp1-trusted.raw) will be in thetmp-glibc/deploy/images/stm32mp1/directory. Be extremely careful to replace/dev/sdXwith the correct device node for your SD card reader.
sudo dd if=../FlashLayout_sdcard_stm32mp1-trusted.raw of=/dev/sdX bs=1M status=progress
- Boot your board . Insert the SD card, configure the boot switches on your STM32MP153 board to boot from the SD card, and power it on.
I saw this work on an older board too, when they first showed up. I had the original order wrong but the AI straightened the path.
for Seeed Odyssey
The meta-st-odyssey layer from Seeed Studio is the official Board Support Package (BSP) for the ODYSSEY-STM32MP135D. You should add this layer to a standard OpenSTLinux build to create a Yocto image for your specific board.
Here is how to modify the standard build process from the previous response to incorporate the meta-st-odyssey layer:
Prerequisites
- A powerful Linux host machine with at least 8 GB of RAM and 120 GB of disk space.
- The
repotool and other Yocto build dependencies are installed.
Step 1: Fetch the core layers and your board layer
- Create a working directory and fetch the OpenSTLinux manifest using
repo, along with themeta-st-odysseylayer. It is important to use a compatible branch for both, such asopenstlinux-6.1-yocto-mickledore.
sh
mkdir odyssey-yocto
cd odyssey-yocto
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
git clone https://github.com/Seeed-Studio/meta-st-odyssey.git -b openstlinux-6.1-yocto-mickledore
repo sync
Step 2: Configure the build environment
- Source the environment setup script. For the ODYSSEY board, the machine is still based on
stm32mp1.
DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
Use code with caution.
- Add the
meta-st-odysseylayer to your build configuration. Thebitbake-layers add-layercommand will update yourbblayers.conffile automatically.
bitbake-layers add-layer ../meta-st-odyssey
Step 3: Build and deploy the image
- Build the target image using the
bitbakecommand.
bitbake st-image-weston
Use code with caution.
- After the build completes, the output images for the SD card will be available in your
build/tmp/deploy/images/stm32mp1directory. - Deploy the image to an SD card using the standard OpenSTLinux process.
To generate the SD card image for your ODYSSEY-STM32MP135D board, follow these steps after your bitbake build is complete.
Generate the raw image file
Navigate to the scripts directory and run the create_sdcard_from_flashlayout.sh script, specifying the correct flash layout file.
- Change directory to the scripts location within your build folder:
cd build/tmp/deploy/images/stm32mp1/scripts/
Use code with caution.
- Execute the script to generate the raw image. The exact path to the flash layout file depends on the image you built, but for the
st-image-westonwith a trusted boot chain, the path is typically as follows:
./create_sdcard_from_flashlayout.sh ../flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp1-trusted.tsv
Use code with caution.
This command will create a file named FlashLayout_sdcard_stm32mp1-trusted.raw in the build/tmp/deploy/images/stm32mp1/ directory.
Write the image to your SD card
- Identify your SD card’s device name by first running
lsblkbefore inserting the card. - Insert your SD card and run
lsblkagain to identify the new device (e.g.,/dev/sdXor/dev/mmcblkX). - Unmount any partitions that were automatically mounted from the SD card.
- Use the
ddcommand to write the raw image to the SD card. Be extremely careful to replace/dev/sdXwith the correct device name to avoid overwriting your system disk.
sh
sudo dd if=../FlashLayout_sdcard_stm32mp1-trusted.raw of=/dev/sdX bs=1M status=progress
Use code with caution.
- Note: Using
status=progresswill show you the progress of the write operation.
Boot your board
- Safely eject the SD card from your computer after the
ddcommand finishes. - Adjust the boot switches on your ODYSSEY-STM32MP135D board to select SD card boot mode.
- Insert the SD card and power on the board.
With some Luck it will boot and Yocto will be there. ![]()
HTH
GL
PJ ![]()
the Ubuntu 18.04 host is what was used, then a later one known to work with the nvidia updater as well. 18.21 or 22? not sure you can look on the seeed wiki.
keep us posted of any progress, I don’t have one anymore so I can’t go back and try it. Fire Sale… for a DGX Spark acquisition ![]()