2020-10-23 02:07 AM
I've setup the distribution package, i'm able to build the default image, and have created a custom image that includes some additional recipes.
Now I want to continue with creating my custom machine. I've created a custom device tree with cubeMX and placed it in meta-st-stm32mp-addons/mx/<projectname>. I followed the steps https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine
My .conf looks like this:
#@TYPE: Machine
#@NAME: stm32mp1-mx
#@DESCRIPTION: Configuration for STM32CubeMX generated project
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python
###########################################################################
#
# 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"
# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
include conf/machine/include/tune-cortexa7.inc
# =========================================================================
# 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
# =========================================================================
# Set specific subdir path by components for each device tree file location
# within CUBEMX_PROJECT project folder
CUBEMX_DTB_PATH_TFA = "tf-a"
CUBEMX_DTB_PATH_TFA_SB = "tf-a"
CUBEMX_DTB_PATH_UBOOT = "u-boot"
CUBEMX_DTB_PATH_LINUX = "kernel"
CUBEMX_DTB_PATH_OPTEEOS = "optee-os"
###########################################################################
#
# User machine customization sections
#
###########################################################################
# Boot Scheme
# =========================================================================
BOOTSCHEME_LABELS += "trusted"
#BOOTSCHEME_LABELS += "optee"
# WORKAROUND to generate U-BOOT SPL for DDR Tuning tools usage
UBOOT_CONFIG += "basic"
# 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 = "stm32mp157c-<projname>-mx"
CUBEMX_PROJECT = "mx/<projname>"
Now when I want to bit-bake my custom image OR the st-image-weston image the following error appears:
ERROR: tf-a-stm32mp-2.2.r1-r0 do_configure: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:externalsrc_configure_prefunc(d)
0003:
File: '/home/allard/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-st/meta-st-stm32mp-addons/classes/cubemx-stm32mp.bbclass', lineno: 108, function: externalsrc_configure_prefunc
0104: os.unlink(lnkfile)
0105: elif os.path.exists(lnkfile):
0106: # File/dir exists with same name as link, just leave it alone
0107: continue
*** 0108: os.symlink(target, lnkfile)
0109: newlinks.append(symsplit[0])
0110: # Hide the symlinks from git
0111: try:
0112: git_exclude_file = os.path.join(s_dir, '.git/info/exclude')
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/allard/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-st/meta-st-stm32mp-addons/mx/<projname>/tf-a/stm32mp15-mx.dtsi' -> '/home/allard/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1-<projname>/tmp-glibc/work/stm32mp1_<projname>-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/git/fdts/stm32mp15-mx.dtsi'
ERROR: Logfile of failure stored in: /home/allard/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1-<projname>/tmp-glibc/work/stm32mp1_<projname>-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/log.do_configure.31280
ERROR: Task (/home/allard/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-st/meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_2.2.bb:do_configure) failed with exit code '1'
Any idea's? Did I miss a step?
Solved! Go to Solution.
2020-11-02 08:15 AM
Doing a clean seems to have resolved this error.
2020-11-02 08:15 AM
Doing a clean seems to have resolved this error.