Skip to main content
Associate
Aug 11, 2026 5:54 PM UTC
Solved

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

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

Kevin HUBER
Kevin HUBERBest answer
ST Employee
Sep 25, 2026 10:22 AM UTC

Hello ​@ThienBui ,

I hope you found the answer since the creation of your post.

The “README.HOW_TO.txt.stm32mp1” is made to build device tree delivered in the Linux folder of the Developer Package or one of the External-DT folder, but you can’t follow it to build a custom device tree.

To use a custom Device Tree generated with CubeMX, you have to follow this wiki page: https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package

BR,
Kevin

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.

3 replies

PatrickF
ST Employee
Aug 19, 2026 6:32 AM UTC

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
Aug 22, 2026 7:00 PM UTC

Hi ​@PatrickF,

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

Best regards,

 

Kevin HUBER
Kevin HUBERBest answer
ST Employee
Sep 25, 2026 10:22 AM UTC

Hello ​@ThienBui ,

I hope you found the answer since the creation of your post.

The “README.HOW_TO.txt.stm32mp1” is made to build device tree delivered in the Linux folder of the Developer Package or one of the External-DT folder, but you can’t follow it to build a custom device tree.

To use a custom Device Tree generated with CubeMX, you have to follow this wiki page: https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package

BR,
Kevin

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.