cancel
Showing results for 
Search instead for 
Did you mean: 

Location of generated dtb file.

NPal.2
Senior

Hi,

I am trying to develop something around the STM32MP1.

For that I have made some changes in the dts file via cubeMx and followed the process of building it given here.

What is the location where the dtb file generated ? My arch/arm/boot/dts folder looks empty.

Is there something i am missing?

executing make dtbs seperately also exits cleanly but does not generated the dtb file.

3 REPLIES 3
PatrickF
ST Employee

Hi,

Once generated, .dtb should be in $WORKDIR/kernel/build/arch/arm/boot/dts/ .

Assuming custom kernel .dts files has been copied in $WORKDIR/kernel/kernel-sources/arch/arm/boot/dts/ .

Here is the commands I use (which are aligned with https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package#Updating_the_kernel_device_tree)

export WORKDIR=$HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0
pushd $WORKDIR/Developer-Package
source SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
popd
 
pushd $WORKDIR/kernel/kernel-sources
make ARCH=arm O="$PWD/../build" multi_v7_defconfig fragment*.config
for f in `ls -1 ../../sources/arm-ostl-linux-gnueabi/linux-stm32mp-*/fragment*.config`; do scripts/kconfig/merge_config.sh -m -r -O $PWD/../build $PWD/../build/.config $f; done
yes "" | make ARCH=arm oldconfig O="$PWD/../build"
make stm32mp157f-custom-mx.dtb LOADADDR=0xC2000040 O="$PWD/../build"
popd
ls -l $WORKDIR/kernel/build/arch/arm/boot/dts/stm32mp157f-custom-mx.dtb

If not working as expected, please carefully double check if you have followed :

Then, if no .dtb is generated, there is maybe an error messages issued during one process.

.dtb make should output something like (if .dts has been touch):

make[1]: Entering directory '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/kernel/build'
  SYNC    include/config/auto.conf.cmd
  GEN     Makefile
  DTC     arch/arm/boot/dts/stm32mp157f-custom-mx.dtb
make[1]: Leaving directory '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/kernel/build'

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Olivier GALLIEN
ST Employee

Hi @NPal.2​ 

If you are following https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Modifying_the_Linux_kernel_device_tree this section assume you are using the "Inside kernel source tree directory" methods .. to the opposite of the "outside kernel source tree" which generate all build artefacts in a specific "build" directory.

Please check which configuration is active when calling "make dtbs".

refer to https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt for full details procedure of kernel build .

Hope it help

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
NPal.2
Senior

@Community member​ @PatrickF​  :Thanks for the response let me try this and get back.