Selecting specific device tree for 'run update_fdt' while building kernel


I am trying to build a custom kernel to change a few configurations from the default image and adding some changes to the code. I am following this documentation to configure and compile the kernel and I upload it to the target using the Legacy images method where I use an SD to upload the changes. The things I compile are the kernel and a .dtb for Ixora v1.1:

make -j3 uImage LOADADDR=10008000 2>&1 | tee build.log
make imx6q-apalis-ixora-v1.1.dtb

When I get to the point of running the ‘run update_fdt’ on the target the system looks for another .dtb which I didn’t compile. I get the following response:

Apalis iMX6 # run update_fdt  
reading apalis_imx6/imx6q-apalis-eval.dtb

I would expect the system to read the ’ imx6q-apalis-ixora-v1.1.dtb’ instead. Is it correct? how can I assure that the system is using my compiled .dtb file? I suspect it is avoiding my changes.

Best regards, Alex

Hi @AlexPG!

There is a fdt_file environment variable on U-Boot. This variable indicates which device tree to read. You can printenv fdt_file to see which .dtb is being read (which currently is imx6q-apalis-eval.dtb).
Then you can just change it to the one you’d like U-Boot to read like this:

# setenv fdt_file imx6q-apalis-ixora-v1.1.dtb

Then save the variables and try running the update again:

# saveenv
# run setupdate
# run update_fdt

Thanks, it works fine

Perfect. You are welcome.