cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create u-boot-spl.stm32 by OpenSTLinux4.1 Distribution Package

jasonj2
Associate II

HI,

I am working on a custom STM32MP151AAC3 board, and working on OpenSTLinux 4.10 distribution package.

Now I can connect to the board through UART4(PB2 and PG11) by STM32CubeProgrammer, and I want to tune the DDR3 to verify the design. I need the u-boot-spl.stm32 binary file.

Firstly, I create a custom layers for the custom board following the instruction from https://wiki.stmicroelectronics.cn/stm32mpu-ecosystem-v4/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package , and I can built the system image successfully. But I cannot find u-boot-spl.stm32 or u-boot.stm32 in the **/deploy/images/customboard/u-boot directory.

Then I find a wiki page said that “The ouput file u-boot.stm32' is only generated for stm32mp15_trusted_defconfig with CONFIG_STM32MP15x_STM32IMAGE; it is not more used for ecosystem release ≥ v4.0.0”. So, I adjust the machine.conf and append "UBOOT_CONFIG[trusted] = "stm32mp15_trusted_defconfig,,u-boot.dtb", still cannot get the u-boot stm32image.

I have attached the custom layer conf files. It would be very helpful if someone can give me some advice. Thanks in advance.

Regards.

 

layer.conf

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
            ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-customboard-layer"
BBFILE_PATTERN_meta-customboard-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-customboard-layer = "7"

LAYERDEPENDS_meta-customboard-layer = "core"
#LAYERSERIES_COMPAT_meta-customboard-layer = "kirkstone"



EULA_FILE_ST:stm32mp1customboard = "${LAYERDIR}/conf/eula/${MACHINE}"
EULA_FILE_ST_MD5SUM:stm32mp1customboard = "8b505090fb679839cefbcc784afe8ce9"

#Inform bitbake for adding another location to search for licenses
LICENSE_PATH += "${LAYERDIR}/files/licenses"

# Set a variable to get the STM32MP MX BSP location
STM32MP_customboard_BASE = "${LAYERDIR}"

# This should only be incremented on significant changes that may
# cause compatibility issues with other layers
LAYERVERSION_meta-customboard-layer = "1"

LAYERDEPENDS_meta-customboard-layer = "stm-st-stm32mp-mx"

# OpenEmbedded compatibility information
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_meta-customboard-layer = "1"
LAYERSERIES_COMPAT_meta-customboard-layer = "kirkstone"

 

stm32mp1-customboard.conf

#@TYPE: Machine
#@NAME: stm32mp1-customboard
#@DESCRIPTION: Configuration for STM32CubeMX generated project
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python layers/meta-st/meta-st-stm32mp-addons

###########################################################################
#
# Default machine configuration sections
#
###########################################################################

include conf/machine/include/st-machine-common-stm32mp.inc
include conf/machine/include/st-machine-providers-stm32mp.inc

# Define specific common machine name
MACHINEOVERRIDES .= ":stm32mpcommonmx:stm32mp15commonmx"
MACHINEOVERRIDES .= ":stm32mp1common:stm32mp15common"
MACHINEOVERRIDES .= ":stm32mp1customboard"

# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
include conf/machine/include/arm/armv7a/tune-cortexa7.inc

# =========================================================================
# boot scheme
# =========================================================================
# BOOTSCHEME_LABELS ?=

# =========================================================================
# boot device
# =========================================================================
BOOTDEVICE_LABELS ?= "emmc"

# =========================================================================
# Machine settings
# =========================================================================
STM32MP_DEVICETREE = "${CUBEMX_DTB}"

# =========================================================================
# Machine features (default for stm32mp1 like)
# =========================================================================
MACHINE_FEATURES += "splashscreen"
MACHINE_FEATURES += "watchdog"
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
MACHINE_FEATURES += "m4copro"

# =========================================================================
# Device Storage
# =========================================================================
# Enable the board device storage support with CUBEMX_DTB according to BOOTDEVICE_LABELS
DEVICE_BOARD_ENABLE:NAND    += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', '${CUBEMX_DTB}', '', d)}"
DEVICE_BOARD_ENABLE:NOR     += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard' , '${CUBEMX_DTB}', '', d)}"
DEVICE_BOARD_ENABLE:EMMC    += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', '${CUBEMX_DTB}', '', d)}"
DEVICE_BOARD_ENABLE:SDCARD  += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"

# =========================================================================
# Flashlayout
# =========================================================================
# Set the FLASHLAYOUT_TYPE_LABELS to CUBEMX_DTB according to BOOTDEVICE_LABELS
FLASHLAYOUT_TYPE_LABELS:emmc        = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', '${CUBEMX_DTB}', '', d)}"
FLASHLAYOUT_TYPE_LABELS:nand-4-256  = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', '${CUBEMX_DTB}', '', d)}"
FLASHLAYOUT_TYPE_LABELS:nor-sdcard  = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard' , '${CUBEMX_DTB}', '', d)}"
FLASHLAYOUT_TYPE_LABELS:sdcard      = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"

# Specific settings for 'extensible' and 'deleteall' configurations
FLASHLAYOUT_CONFIG_LABELS:deleteall = "cubemx"
FLASHLAYOUT_TYPE_LABELS:deleteall:cubemx = "${CUBEMX_DTB}"
FLASHLAYOUT_TYPE_LABELS:extensible = "${CUBEMX_DTB}"

# =========================================================================
# CubeMX extra config
# =========================================================================
ENABLE_CUBEMX_DTB ?= "1"

###########################################################################
#
# User machine customization sections
#
###########################################################################

# Boot Scheme
# =========================================================================
# BOOTSCHEME_LABELS += "basic"
BOOTSCHEME_LABELS += "trusted"
#BOOTSCHEME_LABELS += "optee"
#
UBOOT_CONFIG += "trusted"
# UBOOT_CONFIG[basic]   = "stm32mp15_basic_defconfig,,u-boot.dtb"
UBOOT_CONFIG[trusted] = "stm32mp15_trusted_defconfig,,u-boot.dtb"
# UBOOT_CONFIG[optee]   = "stm32mp15_trusted_defconfig,,u-boot.dtb"

# Boot Device Choice
# =========================================================================
# Define the boot device supported
#BOOTDEVICE_LABELS += "sdcard"
BOOTDEVICE_LABELS += "emmc"
#BOOTDEVICE_LABELS += "nand-4-256"
#BOOTDEVICE_LABELS += "nor-sdcard"

# Support Feature Choice
# =========================================================================
# Define the features to enable on board
#MACHINE_FEATURES += "bluetooth"
#MACHINE_FEATURES += "wifi"

# Specific firmwares and kernel modules configuration
# =========================================================================
# Set the list of kernel module to be auto-loaded during boot
#KERNEL_MODULE_AUTOLOAD += ""

# Set Bluetooth related package list needed when 'bluetooth' feature is enabled
#BLUETOOTH_LIST += ""

# Set Wifi related package list needed when 'wifi' feature is enabled
#WIFI_LIST += ""

# CubeMX Project Config
# =========================================================================
# Assign CubeMX Board devicetree and project path name
CUBEMX_DTB = "stm32mp151a-customboard-mx"
CUBEMX_PROJECT = "mx/customboard"

# Indicate which STM32MP package are used: 'A', 'C', 'D' or 'F'
CUBEMX_SOC_PACKAGE = "A"

# Indicate the size of DDR available on BOARD: 512 or 1024 (size in MB unit)
CUBEMX_BOARD_DDR_SIZE = "512"

# Indicate if you like to disable the DVFS which are activated by default
#CUBEMX_SOC_DVFS_OFF = "0"

 

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @jasonj2 ,

uBoot is now embedded inside a fip.bin package (https://wiki.st.com/stm32mpu/wiki/STM32MP15_U-Boot#U-Boot_integration_in_FIP).

As there is no more support of uBoot SPL, for DDR tests, you should now use https://wiki.st.com/stm32mpu/wiki/STM32DDRFW-UTIL

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi @jasonj2 ,

uBoot is now embedded inside a fip.bin package (https://wiki.st.com/stm32mpu/wiki/STM32MP15_U-Boot#U-Boot_integration_in_FIP).

As there is no more support of uBoot SPL, for DDR tests, you should now use https://wiki.st.com/stm32mpu/wiki/STM32DDRFW-UTIL

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

The STM32DDRFW-UTIL is what I need.

Thank you very much!

Regards.