2020-09-29 01:05 AM
I have generated a project with cubemx and tried all the instructions from this article..
https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package
My layer.conf look like this
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-my-demo-layer"
BBFILE_PATTERN_meta-my-demo-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-my-demo-layer = "6"
EULA_FILE_ST_stm32mpmydemo = "${LAYERDIR}/conf/eula/${MACHINE}"
EULA_FILE_ST_MD5SUM_stm32mpmydemo = "8b505090fb679839cefbcc784afe8ce9"
LICENSE_PATH += "${LAYERDIR}/files/licenses"
STM32MP_MY_DEMO_BASE = "${LAYERDIR}"
LAYERVERSION_meta-my-demo-layer = "1"
LAYERDEPENDS_meta-my-demo-layer = "stm-st-stm32mp-mx"
LAYERVERSION_meta-my-demo-layer = "1"
LAYERDEPENDS_meta-my-demo-layer = "core"
LAYERSERIES_COMPAT_meta-my-demo-layer = "dunfell"
My machine configurations look 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 layers/meta-st/meta-st-stm32mp-addons
include conf/machine/include/st-machine-common-stm32mp.inc
include conf/machine/include/st-machine-providers-stm32mp.inc
MACHINEOVERRIDES .= ":stm32mpmydemo"
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
include conf/machine/include/tune-cortexa7.inc
STM32MP_DEVICETREE = "${CUBEMX_DTB}"
MACHINE_FEATURES += "splashscreen"
MACHINE_FEATURES += "watchdog"
MACHINE_FEATURES += "wifi"
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
MACHINE_FEATURES += "m4copro"
DEVICE_BOARD_ENABLE_SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"
FLASHLAYOUT_TYPE_LABELS_sdcard = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"
FLASHLAYOUT_CONFIG_LABELS_deleteall = "cubemx"
FLASHLAYOUT_TYPE_LABELS_deleteall_cubemx = "${CUBEMX_DTB}"
FLASHLAYOUT_TYPE_LABELS_extensible = "${CUBEMX_DTB}"
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"
BOOTSCHEME_LABELS += "trusted"
UBOOT_CONFIG += "basic"
BOOTDEVICE_LABELS += "sdcard"
MACHINE_FEATURES += "wifi"
#KERNEL_MODULE_AUTOLOAD += ""
# Set Wifi related package list needed when 'wifi' feature is enabled
WIFI_LIST += "linux-firmware-bcm43430"
CUBEMX_DTB = "stm32mp153c-my_stm-mx"
CUBEMX_PROJECT = "mx/MY_STM/CA7/DeviceTree/MY_STM"
But all the packages tf-a,kernel,u-boot are unable to compile.
Can anybody please help if my yocto configurations are correct or not?
Errors are ..
ERROR: tf-a-stm32mp-2.2.r1-r0 do_compile: oe_runmake failed
ERROR: tf-a-stm32mp-2.2.r1-r0 do_compile: Execution of '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/run.do_compile.6449' failed with exit code 1:
make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
Including bl32/sp_min/sp_min.mk
HOSTCC stm32image.c
make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
make: *** Waiting for unfinished jobs....
HOSTLD stm32image
Built stm32image successfully
make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/log.do_compile.6449
Log data follows:
| DEBUG: Executing python function tfaconfig_env
| DEBUG: Python function tfaconfig_env finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 CROSS_COMPILE=arm-ostl-linux-gnueabi- DEBUG=1 LOG_LEVEL=40 PLAT=stm32mp1 ARCH=aarch32 ARM_ARCH_MAJOR=7 STM32MP_SDMMC=1 STM32MP_EMMC=1 STM32MP_SPI_NOR=1 STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 -C /home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/git DTB_FILE_NAME=stm32mp153c-my_stm-mx.dtb BUILD_PLAT=/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted AARCH32_SP=sp_min
| make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| Including bl32/sp_min/sp_min.mk
| HOSTCC stm32image.c
| make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
| make: *** Waiting for unfinished jobs....
| HOSTLD stm32image
|
| Built stm32image successfully
|
| make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/run.do_compile.6449' failed with exit code 1:
| make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| Including bl32/sp_min/sp_min.mk
| HOSTCC stm32image.c
| make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
| make: *** Waiting for unfinished jobs....
| HOSTLD stm32image
|
| Built stm32image successfully
|
| make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/user/layers/meta-st/meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_2.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 720 tasks of which 650 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds
Thanks in advance.
2020-09-29 04:39 AM
Hi @Hsn ,
It look like ENABLE_CUBEMX_DTB ?= "1" is missing in your machine .conf in order to tell system to get dts file in mx sub-folder. ( still expect it in tf-a source folder)
Olivier
2020-09-29 05:20 AM
Hi @Community member Thanks for your reply. I compiled it by adding the recipes and class from addons to my demo layer. kernel & tf-a compiled successfully but u-boot still not able to compile.
ENABLE_CUBEMX_DTB ?= "1" is now already in the cubemx-stm32mp.bbclass
The error log is quite big, pasting the tail of error here..
| arm-ostl-linux-gnueabi-ld.bfd -pie --gc-sections -Bstatic --no-dynamic-linker -Ttext 0xC0100000 -o u-boot -T u-boot.lds arch/arm/cpu/armv7/start.o --start-group arch/arm/cpu/built-in.o arch/arm/cpu/armv7/built-in.o arch/arm/lib/built-in.o arch/arm/mach-stm32mp/built-in.o board/st/common/built-in.o board/st/stm32mp1/built-in.o cmd/built-in.o common/built-in.o disk/built-in.o drivers/built-in.o drivers/dma/built-in.o drivers/gpio/built-in.o drivers/i2c/built-in.o drivers/net/built-in.o drivers/net/phy/built-in.o drivers/power/built-in.o drivers/power/battery/built-in.o drivers/power/domain/built-in.o drivers/power/fuel_gauge/built-in.o drivers/power/mfd/built-in.o drivers/power/pmic/built-in.o drivers/power/regulator/built-in.o drivers/serial/built-in.o drivers/spi/built-in.o drivers/usb/cdns3/built-in.o drivers/usb/common/built-in.o drivers/usb/dwc3/built-in.o drivers/usb/emul/built-in.o drivers/usb/eth/built-in.o drivers/usb/gadget/built-in.o drivers/usb/gadget/udc/built-in.o drivers/usb/host/built-in.o drivers/usb/musb-new/built-in.o drivers/usb/musb/built-in.o drivers/usb/phy/built-in.o drivers/usb/ulpi/built-in.o env/built-in.o fs/built-in.o lib/built-in.o net/built-in.o --end-group arch/arm/lib/eabi_compat.o arch/arm/lib/lib.a -Map u-boot.map; true
| arm-ostl-linux-gnueabi-objcopy --gap-fill=0xff -j .text -j .secure_text -j .secure_data -j .rodata -j .hash -j .data -j .got -j .got.plt -j .u_boot_list -j .rel.dyn -j .binman_sym_table -j .text_rest -j .dtb.init.rodata -j .efi_runtime -j .efi_runtime_rel -O srec u-boot u-boot.srec
| make -f /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/scripts/Makefile.build obj=dts dtbs
| arm-ostl-linux-gnueabi-objcopy --gap-fill=0xff -j .text -j .secure_text -j .secure_data -j .rodata -j .hash -j .data -j .got -j .got.plt -j .u_boot_list -j .rel.dyn -j .binman_sym_table -j .text_rest -j .dtb.init.rodata -j .efi_runtime -j .efi_runtime_rel -O binary u-boot u-boot-nodtb.bin
| arm-ostl-linux-gnueabi-objdump -t u-boot > u-boot.sym
| make -f /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/scripts/Makefile.build obj=arch/arm/dts dtbs
| mkdir -p arch/arm/dts/ ; (cat /home/user/user1/build-openstlinux_distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts/stm32mp153c-s4_m4-mx.dts; echo '#include "stm32mp153c-s4_m4-mx-u-boot.dtsi"') > arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.pre.tmp; arm-ostl-linux-gnueabi-gcc --sysroot=/home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/u-boot-stm32mp/2020.01-r0/recipe-sysroot -E -Wp,-MD,arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d.pre.tmp -nostdinc -I/home/user/user1/build-lopenstlinux_distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts -I/home/user/user1/build-openstlinux_distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts/include -Iinclude -I/home/user/user1/build-openstlinux_distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/include -I/home/user/user1/build-openstlinux_distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/include -include /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/include/linux/kconfig.h -D__ASSEMBLY__ -undef -D__DTS__ -x assembler-with-cpp -o arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.dts.tmp arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.pre.tmp ; ./scripts/dtc/dtc -O dtb -o arch/arm/dts/stm32mp153c-s4_m4-mx.dtb -b 0 -i /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts/ -Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format -Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -d arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d.dtc.tmp arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.dts.tmp ; cat arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d.pre.tmp arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d.dtc.tmp > arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d ; sed -i "s:arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.pre.tmp:/home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts/stm32mp153c-s4_m4-mx.dts:" arch/arm/dts/.stm32mp153c-s4_m4-mx.dtb.d
| Error: /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/arch/arm/dts/stm32mp15-no-scmi.dtsi:103.1-5 Label or path dsi not found
| FATAL ERROR: Syntax error parsing input tree
| scripts/Makefile.lib:308: recipe for target 'arch/arm/dts/stm32mp153c-s4_m4-mx.dtb' failed
| make[3]: *** [arch/arm/dts/stm32mp153c-s4_m4-mx.dtb] Error 1
| /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/dts/Makefile:38: recipe for target 'arch-dtbs' failed
| make[2]: *** [arch-dtbs] Error 2
| /home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source/Makefile:1087: recipe for target 'dts/dt.dtb' failed
| make[1]: *** [dts/dt.dtb] Error 2
| make[1]: Leaving directory '/home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/u-boot-stm32mp/2020.01-r0/build/stm32mp15_basic_defconfig'
| Makefile:167: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/user/user1/build-openstlinux-distro/tmp-openstlinux_distro-glibc/work-shared/stm32mp1-demo/uboot-source'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/user/user1/layers/meta-st/meta-st-stm32mp/recipes-bsp/u-boot/u-boot-stm32mp_2020.01.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 753 tasks of which 745 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds
Summary: 1 task failed:
/home/user/user1/layers/meta-st/meta-st-stm32mp/recipes-bsp/u-boot/u-boot-stm32mp_2020.01.bb:do_compile
2020-10-06 01:27 PM
Hi @Hsn
I noticed this error in log during u-boot compile :
"Label or path dsi not found"
Please have a look to :
Olivier