This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: How to compile device tree to get the same as on the Linux sd-card

Part Number: SK-TDA4VM


Hi there,

I need to do changes in the device tree, so I tried to follow the page https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-rt-jacinto7/08_02_00_01/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html to get the same one as original, before I do any changes.

I'm using "ti-processor-sdk-linux-j7-evm-08_02_00_03" and on the board is "08.02.00.02" sdcard Linux image.

My steps

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- tisdk_j7-evm_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ti/k3-j721e-sk.dtb

Then, I have got new device tree:

ll arch/arm64/boot/dts/ti/k3-j721e-sk.dtb

Size of this dt is 73.563 bytes only, where original dt on the sd-card has 100.968, which looks already as different dt. Next. I tried to boot Linux.

Correct boot with original dt:

100968 bytes read in 15 ms (6.4 MiB/s)
10670 bytes read in 8 ms (1.3 MiB/s)
2397 bytes read in 8 ms (292 KiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 000000008fee4000, end 000000008fffffff ... OK

Starting kernel ...

Now, newly compiled dt:

73587 bytes read in 12 ms (5.8 MiB/s)
10670 bytes read in 12 ms (868.2 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
2397 bytes read in 10 ms (233.4 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_BADMAGIC
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree

As seen, my newly compiled dt is not working, so I did disassembly of original and of my dt - the biggest difference is missing  __symbols__ section at the end of the file in my dt, as already uboot reported plus missing or different phandle and other elements.

My question: what I did wrong and how to compile dt to get the same file, as on the sd-card.
Thanks

Best regards,
Tomas

  • Hi,

    in meantime, I rebuilt all DTs  via 

    make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- dtbs

    and now, even when it's still not exactly the same length, it has symbols section and it boots. During diff I found that wkup_vtm0, thermal_zones, cpu_thermal and other are still missing in the dt.

    Regards,
    Tomas

  • Hi Tomas,

    I believe the  wkup_vtm0, thermal_zones, cpu_thermal  changes are uncommitted changes that are added on top of the dts files.
    Can you share DTB that you compiled on your own? Are you now able to boot?

    - Keerthy