Flash kernel-dtb not work

Hi,
I follow the step in https://elinux.org/Jetson/TX2_DTB#TX2
I change the contain in “tegra186-quill-p3310-1000-c03-00-base.dtb” and flash device tree with command "sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1 ". The result is success as follow screenshot.


but when I boot into the device, my setting does not apply to device.

I also try dd (https://forums.developer.nvidia.com/t/modifying-jetson-tx2-device-tree-without-having-to-flash-tx2/76961)

but it doesn’t work,either.

hello hankli,

the kernel-dtb binary is loaded from the kernel-dtb partition by default.
once there’s FDT entry specify in the extlinux.conf file, boot scan sequence will load it via rootfs.

so,
could you please check the configuration file, /boot/extlinux/extlinux.conf,
thanks

Hi JerryChang,
my configuration file is as bellow.
image

hello hankli,

okay, it should loads from kernel-dtb partition for the device tree blob binary.
are you customize the dtb file and replace $OUT/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to perform partition update?

hi JerryChang,
Yes, I replaced /Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to perform partition update.
But my dtb is generated by decompile/compile tegra186-quill-p3310-1000-c03-00-base.dtb.
Not build from kernel source.

hello hankli,

I assume you’re using dtc utility to modify dtb content.
may I know how you determine the dtb update without success?
could you please share the modifications and also the steps you’re used for checking.
thanks

Hi JerryChang,
I am trying to disable internal wifi module.
Terefore, I change the wifi-enable setting in gpio@2200000

image

after flash, I type ifconfig to check wifi interface. but wlan0 still exist.

I also try a test that I comment out all usb ports setting except otg-usb in xusb_padctl@3520000 , but all my usb ports are still working.

For update the dtb file, I would suggest you can check /proc/device-tree on your device to see if it is really get updated.

As for wifi, you can also remove the bcmdhd driver or you can disable bcmd specific nodes in your dts.

Hi WayneWWW,
What should I check in /proc/device-tree?
image

I will try to disable bcmd nodes in my dts.
Are these bcmd nodes you mention about?
image

Modify something in your dtb, the final result will be in /proc/device-tree. If it does not appear in /proc/device-tree then your method for update may be wrong. Dump the log from uart should tell the reason.

As for bcmd, yes, disable that wlan one.

it looks like update is wrong.
I set bcmdhd_wlan status as disabled.
but when I cat /proc/device-tree/bcmdhd_wlan/status, it still show okay

Then please dump the boot up log from uart.

Here is my dmesg.
dmesg.log (125.5 KB)
Thank you.

Not dmesg. Dmesg cannot help. You need to dump the bootloader log.

https://www.jetsonhacks.com/2017/03/24/serial-console-nvidia-jetson-tx2/

sorry for misread.
this is the boot up log
putty.log (72.6 KB)

It looks like your dtb is still loaded from partition.

[0001.413] W> No valid slot number is found in scratch register
[0001.419] W> Return default slot: _a
[0001.422] I> A/B: bin_type (21) slot 0
[0001.426] I> Loading partition kernel-dtb at 0x80000000 from device(0x1)
[0001.440] I> Kernel_dtb @0x80000000
[0001.443] I> Bl_dtb @0x8520f400

What if you do the full flash? Will it work?

Also, you can try to remove the tegra186-quill-p3310-1000-c03-00-base.dtb from your Linux_for_Tegra/kernel and run the flash command. Let’s see if there would have error log from flash.sh if the dtb is already gone.

It looks like your dtb is still loaded from partition.

[0001.413] W> No valid slot number is found in scratch register
[0001.419] W> Return default slot: _a
[0001.422] I> A/B: bin_type (21) slot 0
[0001.426] I> Loading partition kernel-dtb at 0x80000000 from device(0x1)
[0001.440] I> Kernel_dtb @0x80000000
[0001.443] I> Bl_dtb @0x8520f400

What if you do the full flash? Will it work?

full flash work fine.
but in my case, we prefer to flash kernel-dtb or any quick solution.
because full flash is time consuming.
btw, we full flash with cloned system.img .

Also, you can try to remove the tegra186-quill-p3310-1000-c03-00-base.dtb from your Linux_for_Tegra/kernel and run the flash command. Let’s see if there would have error log from flash.sh if the dtb is already gone

It will show missing dtbfile

Are you still not able to flash kernel-dtb partition only even after you do the full flash?

Still can’t flash kernel-dtb partition only.
I found a strange thing that full flash mount my additional i2c driver setting, but not change bcmdhd setting.
Therefore, I try to delete i2c driver setting and disable bcmdh setting. Then full flash again. Result is i2c driver disable but bcmdh still enable.
I will try to use default system.img to do full flash, but not my cloned system.img…