Add custom device tree to image in IMX8MPLUS using devtool

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add custom device tree to image in IMX8MPLUS using devtool

1,666 Views
vignesh_r
Contributor III

Hi Team,
I try to integrate MAX98357A with IMX8MPEVK.
I have own custom dts.
1.created own meta layer.
2.devtool modify linux-imx and workspace is created.
3.Copied dts file to build/workspace/sources/linux-imx/arch/arm64/boot/dts/freescale/imx8mp-evk-max98357a.dts
4.dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-max98357a.dtb is added in build/workspace/sources/linux-imx/arch/arm64/boot/dts/freescale/Makefile.
5.Created patch by devtool update-recipe linux-imx -a imx-yocto-bsp/sources/meta-test .
0001-dts-added-for-max98357a.patch to imx-yocto-bsp/sources/meta-test/recipes-kernel/linux/linux-imx/0001-dts-added-for-max98357a.patch
6.Build kernel - bitbake linux-imx

I could not see my dtb in build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.36+git999-r0/linux-imx-6.1.36+git999/arch/arm64/boot/dts/freescale and also in my image.

Labels (1)
0 Kudos
Reply
9 Replies

1,636 Views
vignesh_r
Contributor III
Hi,
Any help here?
0 Kudos
Reply

1,614 Views
joanxie
NXP TechSupport
NXP TechSupport

I've already mailed to you, pls check it

0 Kudos
Reply

1,575 Views
vignesh_r
Contributor III

Hi,

how to create a cutomized camera on yocto - NXP Community 
How to use Devshell to compile device tree files. - NXP Community

Thanks for the links, I can refer. I am trying build dts where I am facing syntax errors.
Once it is resolved, I will check that dtb in image.
Kindly close this thread.

0 Kudos
Reply

1,567 Views
joanxie
NXP TechSupport
NXP TechSupport

good to hear this, I will close it

0 Kudos
Reply

1,546 Views
vignesh_r
Contributor III

Hi Joanxie,

I have copied dts to build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/boot/dts/freescale/imx8mp-evk-max98357a.dts.
then bitbake -c devshell virtual/kernel & make dtbs. Now it is build successfully.
I can see dtb in /build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.36+gitAUTOINC+04b05c5527-r0/build/arch/arm64/boot/dts/freescale.
Then I exit from devshell.
bitbake -c compile virtual/kernel
bitbake -c deploy virtual/kernel
bitbake linux-imx
bitbake myreceipe
bitbake myimage

I could not find my dtb in imx-yocto-bsp/build/tmp/deploy/images/imx8mp-lpddr4-evk folder.
I copied wic image & flashed in sd card, just connected to pc & checked boot folder there also dtb is not available.
Anyway try to boot with fdtfile variable in uboot,dtb is not available.
So Build image that doesnt have dtb. Is dtb should be added in machine config or some place? Can you please help here?

0 Kudos
Reply

1,526 Views
joanxie
NXP TechSupport
NXP TechSupport

I haven't imx8mp board right now, if I remember it correctly, for  the bsp 6.1.36, you can find dtb file and image under /run/media/bootxxxx folder, you also can check this detailed path from your boot up logfile, then you just put your new dtb file there, then reboot the board, use the "setenv fdtfile <your own dtb>" to set your own dtb file, you don't need build the new image and flash to the board again, which too waste time

0 Kudos
Reply

1,484 Views
vignesh_r
Contributor III

Hi,

Thanks for the input.
 It is core-image minimal. So how can we place the dtb file in run/media/bootxxxx folder?
Could you please share any reference thread or steps to place the dtb file directly into that path.
Are you referring that copy file from pc to sd card path when it is connected to pc?

0 Kudos
Reply

1,479 Views
vignesh_r
Contributor III

Hi,

I have copied dtb from pc to SDCARD . i.e in boot folder.
I have set fdtfile as my dtb.
Then exectued run loadfdt. So it is properly loaded.
But unfortunately, after booting kernel, panic is happened. Let me check and come back.

0 Kudos
Reply

1,476 Views
joanxie
NXP TechSupport
NXP TechSupport

if you already put your own dtb in the sd card, when you reboot board, you can use "setenv fdtfile xxx" xxx is your new dtb file, use "saveenv" to save it, then use bootcmd to boot the board again

0 Kudos
Reply