Skip to content

stm32-hotspot/STM32MPU-OSTL-DEV-helper

Repository files navigation

SDK_helper

OpenSTLinux SDK tools for OpenSTLinux v6.1
(File SOURCES-stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz)
##############################

Starting from OpenSTLinux v6.1 Developer Package, the archive file "SOURCES-stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz" includes a tool called: "sdk-infos-1.0". This tool is a good alternative to OSTL-DEV-helper, and we suggest using it for your next builds.
Current release of "sdk-infos-1.0-r0" contains some bugs; for this reason, in the folder "sdk-infos-1.0-r3" we propose in this git a patched version of this useful tool.

Usage:

  • copy the content of folder sdk-infos-1.0-r3/ to overwrite sdk-infos-1.0-r0/ files
    • cp -v STM32MPU-OSTL-DEV-helper/sdk-infos-1.0-r3/* sdk-infos-1.0-r0/
  • enter in sdk-infos-1.0-r0 folder
    • cd sdk-infos-1.0-r0
  • launch ./generated_build_script-stm32mpx.sh stm32mp2 [or stm32mp2]
    • ./generated_build_script-stm32mpx.sh stm32mp2
  • Return to previous folder
    • cd ../
  • edit the generated file sdk_compilation-stm32mp2-my-custom-board.sh
    • vim sdk_compilation-stm32mp2-my-custom-board.sh
  • run the build script:
    • ./sdk_compilation-stm32mp2-my-custom-board.sh

HELPER SCRIPTs:

  • unpack.sh: Run this script one to unpack tar.xz archives or to cleanup the environment;
  • make_mp1_FIP.sh, make_mp1_KERNEL.sh: Run theese scripts to generate TF-A, FIP and Linux kernel + modules for STM32MP1 boards;
  • make_mp2_FIP.sh, make_mp2_KERNEL.sh: Run theese scripts to generate TF-A, FIP and Linux kernel + modules for STM32MP2 boards;

CONFIGURATION VARIABLEs in make_ scripts:

  • EXTDT_WORKING_DIR: Defines the DEVICETREE path. (CubeMX project path is a valid value);
  • CUSTOM_DTS_NAME: Defines the name of the custom devicetree;

OTHER CONTENTs:

  • folder FLASH_LAYOUT: flashlayout configurations for writing tfa and FIP partitions;
  • folder KERNEL: minimal Linux KERNEL example configuration for STM32MP2;
  • folder YOCTO: a simple example of meta-layer that defines mymachine, myboard and external custom dts files;
  • folder DEVICETREE: External DEVICETREE examples;

HOW TO USE the BUILD scripts::
Prerequisites:
- Download and extract STM32MP2Dev (or STM32MP1Dev) OpenSTLinux Developer Package
   [Rif. https://www.st.com/en/embedded-software/stm32mp2dev.html]
   [Rif. https://www.st.com/en/embedded-software/stm32mp1dev.html]
   [Rif. https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package]

Enter inside the folder where "SOURCES-stm32mp-" package has been extracted
(For example: "cd stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sources/ostl-linux")

Clone this git "gir clone https://github.com/stm32-hotspot/STM32MPU-OSTL-DEV-helper.git -b OpenSTLinux_v61"
- Configure ./STM32MPU-OSTL-DEV-helper/make_mp2_FIP.sh (or ./STM32MPU-OSTL-DEV-helper/make_mp1_FIP.sh ) and run it
- Configure ./STM32MPU-OSTL-DEV-helper/make_mp2_KERNEL.sh (or ./STM32MPU-OSTL-DEV-helper/make_mp1_KERNEL.sh) and run it


HOW TO update uSDCard from Linux HOST PC::
- u-boot (FIP):
dd if=BUILD_OUTPUT/fip/fip.bin of=/dev/ conv=sync
dd if=BUILD_OUTPUT/fip/fip.bin of=/dev/ conv=sync
  • Arm-Trusted-Firmware (TF-A):
    dd if=BUILD_OUTPUT/tfa/tfa_sdcard.stm32 of=/dev/<PARTITION_1_OF_SDCARD_DEVICE> conv=sync
    dd if=BUILD_OUTPUT/tfa/tfa_sdcard.stm32 of=/dev/<PARTITION_2_OF_SDCARD_DEVICE> conv=sync

Update eMMC from target board using the serial console command line:

  • u-boot (FIP):
    dd if=BUILD_OUTPUT/fip/fip.bin of=/dev/mmcblk0p3 conv=sync
    dd if=BUILD_OUTPUT/fip/fip.bin of=/dev/mmcblk0p4 conv=sync

  • Arm-Trusted-Firmware (TF-A):
    echo 0 > /sys/block/mmcblk0boot0/force_ro
    dd if=BUILD_OUTPUT/tfa/tfa_emmc.stm32 of=/dev/mmcblk0boot0 conv=sync
    echo 1 > /sys/block/mmcblk0boot0/force_ro

    echo 0 > /sys/block/mmcblk0boot1/force_ro
    dd if=BUILD_OUTPUT/tfa/tfa_emmc.stm32 of=/dev/mmcblk0boot1 conv=sync
    echo 1 > /sys/block/mmcblk0boot1/force_ro


Update Linux kernel and devicetree DTS file from target board using the serial console command line:
- Overwrite files in the /boot/ and /lib/modules/ folders on the target board.

About

Set of tools that allow users to build their own Yocto image

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published