Android | U-boot dtc generates dtbs of different size for dt source files with same content.

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

Android | U-boot dtc generates dtbs of different size for dt source files with same content.

286 Views
thisisprateek
Contributor I

I'm working on porting Android to a custom I.MX8MP based SoC which already has a working yocto based image. I'm still stuck with trusty OS related problem described in my previous post Porting u-boot from yocto to Android.

Anyway, I'm focusing on getting Android running without trusty OS configuration for now. The problem I'm facing now is with the device tree. I prepared the device tree as described below:

1. I created a copy of EVK's device-tree in Android u-boot source, renamed it to imx8mp_<myboard>.dts and merged only the changes by comparing evk's dts and myboard's dts in yocto's u-boot source.

2. In all of my defconfigs, I set CONFIG_DEFAULT_DEVICE_TREE="imx8mp_<myboard>".

When I try to boot, the board throws below on the console:

 

U-Boot SPL 2022.04-dirty (Nov 02 2022 - 17:54:37 +0530)
Failed to find clock node. Check device tree
### ERROR ### Please RESET the board ###

 

I then changed CONFIG_DEFAULT_DEVICE_TREE to "imx8mp_evk" in all defconfigs and the board boots with some errors about the missing/different peripherals which should be fine because my board's peripherals are different from evk.

I checked the dts and couldn't find anything out of ordinary.  As an experiment, I copied all content of imx8mp_evk.dts into my board's dts, set  CONFIG_DEFAULT_DEVICE_TREE="imx8mp_<myboard>" again and built the images. I still get the same, "Failed to find clock node. Check device tree"

As another experiment, I copied the contents of my board's dts with all my changes into evk's dts and set CONFIG_DEFAULT_DEVICE_TREE = "imx8mp_evk". This time, the board boots up and there are no errors about missing/different peripherals.

I deduced that there is some missing link between the file name "imx8mp_evk" and the dtc. The content in both evk's and myboard's dts' is same so I checked the file sizes of the compiled dtbs. To my surprise, the file sizes are different too. EVK's dtb is roughly 3KB larger than my board's DTB. Again, both of them have the same content, i.e., content of my boards's dts.

How's that possible?

Labels (1)
Tags (3)
0 Kudos
0 Replies