Skip to main content
Associate
August 11, 2026
Question

Compile the device tree with the Developer Package using STM32MP157D-DK1 board

  • August 11, 2026
  • 2 replies
  • 50 views

Hi,

I try to follow the instruction from this link to compile the “device-tree” again. 
First of all, the 3 primary components (FLASH- SOURCE- and SDK-x86 ...) are extracted under the WORKDIR, together with MyDeviceTree generated from the STMCubeMX. 

Next, the dedicated variables EXTDT_DIR, FWDDR_DIR, FIP_DEPLOYDIR_ROOT are set-up.

I did also run the SDK environment to prepare for the next steps.

Regarding “unpack and patch sources”, I follow the instruction line by line and did successfully.

Then for the “regenerate the kernel DTB”, I got stuck at the line “make” the “.dtb” files. For this line, I changed the command as follow:

  • MY_DEMO → MP15 (which is my project name)
  • /linux → /kernel (since I couldn’t find the sub-dir “linux” in the DeviceTree directory)
  • stm32mp135f → stm32mp157d
  • -my_demo- → mp15

→ Hence the file stm32mp135f-my_demo-mx.dtb will become stm32mp157d-mp15-mx.dtb, which matched with the stm32mp157d-mp15-mx.dts from the ../kernel directory.

However I got the following errors and didn’t know how to resolve it:

######################################################################################################

thienbui@thienbui:~/Desktop/WORKDIR/kernel/kernel-sources$ make O="${OUTPUT_BUILD_DIR}" KBUILD_EXTDTS="${EXTDT_DIR}/CA7/DeviceTree/MP15/kernel" stm32mp157d-mp15-mx.dtb
make[1]: Entering directory '/home/thienbui/Desktop/WORKDIR/kernel/build'
make[3]: *** No rule to make target 'arch/arm/boot/dts/stm32mp157d-mp15-mx.dtb'.  Stop.
Looking for stm32mp157d-mp15-mx.dtb into /home/thienbui/Desktop/WORKDIR/MyDeviceTree_fromCubeMX/CA7/DeviceTree/MP15/kernel
make[3]: *** No rule to make target 'arch/arm/boot/dts/stm32mp157d-mp15-mx.dtb'.  Stop.
make[2]: *** [/home/thienbui/Desktop/WORKDIR/kernel/kernel-sources/Makefile:1421: stm32mp157d-mp15-mx.dtb] Error 1
make[1]: *** [/home/thienbui/Desktop/WORKDIR/kernel/kernel-sources/Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/home/thienbui/Desktop/WORKDIR/kernel/build'
make: *** [Makefile:234: __sub-make] Error 2

######################################################################################################

Did I actually miss some steps before going to this part? Please help me to resolve this. Thank you. 

Best regards,

Thien Bui

2 replies

PatrickF
ST Employee
August 19, 2026

Hi ​@ThienBui 

Not expert, just trying to help on basic stuffs.

Have you correctly sourced the SDK environment like it is shown here https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package#Starting_up_the_SDK ?
This ‘source’ should be done every time on any new console. Are the checked listed ok ?

 

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
ThienBuiAuthor
Associate
August 22, 2026

Hi ​@PatrickF,

Yes, I did activate “source” for every new terminal session. 

Best regards,