QSMP-1530

Build and flash quick guide

This is a summary of the steps to create images with Yocto and then flash the module with it. Just copy&paste the commands. The whole process usually takes less than 10 minutes.

1. Check System requirements - Supported Linux Distributions

Refer to Yocto Mickledore Reference Manual - System Requirements for details

Ubuntu 22.04

Ubuntu 20.04

Ubuntu 18.04

Debian 12

Debian 11

Debian 10

not supported

not supported

2. Host PC

Use either a Linux PC or Linux on Windows with WSL

3. Install required packages

Refer to Yocto Mickledore Reference Manual - Required Packages for details

sudo apt update
sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio \
python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales
sudo locale-gen en_US.UTF-8
sudo apt install python-is-python3

4. Setup Git

Refer to BSP Setup for details

git config --global user.name "Your Name"
git config --global user.email "Your Email"

5. Setup Repo

Refer to BSP Setup for details

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH

6. Setup BSP

Refer to BSP Setup for details

mkdir karo-bsp;cd karo-bsp
repo init -u https://github.com/karo-electronics/karo-bsp -b mickledore
repo sync

7. Setup Build Directory

Refer to Setup Build Directory for details

KARO_BASEBOARD is optional. Possible values are: qsbase4

KARO_BASEBOARD=qsbase4
DISTRO=karo-minimal MACHINE=qsmp-1530 source karo-setup-release.sh -b build-qsmp-1530

8. Enable sstate cache

Refer to Enable sstate cache for details

echo SSTATE_MIRRORS = '"file://.* http://sstate.karo-electronics.de/mickledore/PATH"' >> conf/local.conf

9. Build

Refer to Build the Image for details

bitbake karo-image-minimal

10. Flash the module

Start fastboot from U-Boot manually.

fastboot usb 0

Only if the above is not possible

U-Boot in fastboot mode can also be started via USB

Close the Bootmode Jumper (Enabling USB-Bootmode) - Reset the Board

sudo apt install dfu-util
pushd tmp/deploy/images/qsmp-1530/karo-image-minimal
dfu-util -a 1 -D tf-a-stm32mp153a-qsmp-1530-usb.stm32
dfu-util -a 3 -D fip-stm32mp153a-qsmp-1530-mfg.bin
dfu-util -a 0 -e
popd

U-Boot starts in STM DFU mode. Cancel this and enable fastboot manually:

<CTRL-C>
fastboot usb 0

Only for Linux on Windows with WSL

Refer to Linux on Windows with WSL -> Connect USB devices

Windows uuu.exe fails. Use WSL and attach the USB device to it.

Open a Windows command shell with administrator permissions. Get the {busid} of the download gadget and attach it.

usbipd list
usbipd bind --busid {busid}
usbipd attach --wsl --busid {busid}
cd tmp/deploy/images/qsmp-1530/karo-image-minimal
wget https://github.com/nxp-imx/mfgtools/releases/download/uuu_1.5.141/uuu
chmod a+x uuu
sudo ./uuu -v

If programming fails, simply retry uuu without resetting the board.