2025-04-10 4:33 PM - edited 2025-04-10 4:57 PM
I'm following this guide https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package and I'm stuck at 5.2.3. Building and deploying the Linux kernel for the first time. I followed all ST recommendations for directories names and structures, so everything is exactly how they say.
Following this README: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/scarthgap/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt, I'm stuck at 6.2 Compile External Device tree. When executing this make command with stm32mp257f-ev1-ca35tdcid-ostl.dtb as name of external devicetree:
make ${IMAGE_KERNEL} O="${OUTPUT_BUILD_DIR}" KBUILD_EXTDTS="${EXTDT_DIR}/linux" <name of external devicetree .dtb>
I get these errors:
make[1]: Entering directory '/home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/build'
GEN Makefile
CALL /home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/linux-6.6.48/scripts/checksyscalls.sh
make[3]: *** No rule to make target 'arch/arm64/boot/dts/stm32mp257f-ev1-ca35tdcid-ostl.dtb'. Stop.
Looking for stm32mp257f-ev1-ca35tdcid-ostl.dtb into /home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/external-dt-6.0-r0/external-dt-6.0-r0/external-dt-6.0/linux
make[3]: *** No rule to make target 'arch/arm64/boot/dts/stm32mp257f-ev1-ca35tdcid-ostl.dtb'. Stop.
make[2]: *** [/home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/linux-6.6.48/Makefile:1409: stm32mp257f-ev1-ca35tdcid-ostl.dtb] Error 1
make[1]: *** [/home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/linux-6.6.48/Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/build'
make: *** [Makefile:234: __sub-make] Error 2
EXTDT_DIR is /home/vboxuser/STM32MPU-Dev/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/external-dt-6.0-r0/external-dt-6.0-r0/external-dt-6.0 and it indeed has linux directory inside which has Makefile and the following files:
stm32mp257f-ev1-ca35tdcid-ostl.dts
stm32mp257f-ev1-ca35tdcid-ostl-m33-examples.dts
stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-resmem.dtsi
stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-sram.dts
stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-sram-resmem.dtsi
stm32mp257f-ev1-ca35tdcid-ostl-resmem.dtsi
stm32mp257f-ev1-cm33tdcid-ostl.dts
stm32mp257f-ev1-cm33tdcid-ostl-resmem.dtsi
stm32mp257f-ev1-cm33tdcid-ostl-serial-ca35tdcid.dts
stm32mp257f-ev1-psci-osi.dts
stm32mp257f-ev1-tampers.dts
Also, I'm running the latest Ubuntu version 24.10 on VM if that makes any difference.
I followed everything in ST guide step-by-step, didn't do anything other than what they say, and it still fails. I feel like their guide is definitely missing something, because at the previous steps when they offer to manage source code with git, they tell you to create git repo directly from tarball but never tell you to extract it. They only instruct to extract if you don't want to use git for code management. So, they do make assumptions and I believe this is also the case.
Please, help.
Solved! Go to Solution.
2025-04-23 9:34 AM
I don't know, i just built all instead of specific external device tree and it worked.
2025-04-10 4:50 PM - edited 2025-04-10 4:54 PM
up
2025-04-16 2:30 AM
Probably the same interpretation of the wiki as what I encountered. it seems mandatory to add the dtb to the makefile.
2025-04-23 9:34 AM
I don't know, i just built all instead of specific external device tree and it worked.
2025-06-25 8:44 AM
Same issue, could you share how to "build all", @rossU Thx mate!
2025-06-25 10:31 AM - edited 2025-06-25 10:38 AM
What I meant by building all is that I only executed Step 6.1 Compile kernel image and Devicetree and skipped Step 6.2 Compile External Device tree entirely since it technically was irrelevant for my project at that time. Step 6.1 generated all device tree blobs suitable for my board and I just used one of them.
Also, Step 6.2 output will ONLY be device tree blobs, while Step 6.1 also generates kernel image.
HTH.
2025-06-26 2:15 AM
I used make dtbs O="${OUTPUT_BUILD_DIR}" KBUILD_EXTDTS="${EXTDT_DIR}/linux" to build the external device tree, is this OK? Or I have to build kernal with external device tree? Because step 6.2 only need to compile the external device tree.
Thx
Richknight