FDT creation failed! Can't get new kernel compiled from source to boot.

Hello,

I’ve compiled a new kernel from source following the direction in Tegra Linux Driver Package
Developer Guide 24.2.1. After installation the boot fails with FDT_ERR_NOSPACE. I’ve checked that I’ve installed the new tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb into the /boot/dtb/ folder, and I’ve copied all of the freshly generated .dtb files to /boot/

I’m using JetPack-2.3 with kernel tag tegra-l4t-r24.2.1, and I have not changed any kernel settings, except to run make O=$TEGRA_KERNEL_OUT tegra21_defconfig

Here is the output on the debug serial port:

p2371-2180 eMMC boot options
1:	primary kernel
Enter choice: 1:	primary kernel
Retrieving file: /boot/initrd
6902654 bytes read in 323 ms (20.4 MiB/s)
Retrieving file: /boot/Image
19367320 bytes read in 486 ms (38 MiB/s)
append: fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff2bf000 nvdumper_reserved=0xff23f000 core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait
Retrieving file: /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
304942 bytes read in 524 ms (567.4 KiB/s)
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   reserving fdt memory region: addr=80000000 size=20000
   Using Device Tree in place at 0000000082000000, end 000000008204d72d
Can't create DT prop nvidia,emc-save-restore-mod-regs to copy
Can't create DT node emc-table@102000 to copy
Can't create DT prop reg to copy
ERROR: could not update sku property FDT_ERR_NOSPACE.
ERROR: board-specific fdt fixup failed: FDT_ERR_NOSPACE
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

Thanks for your help

I see this, which implies the dtb file was found:

Retrieving file: /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb

I would assume something in the dtb file is not valid. You might want to reverse compile this dtb file and verify its contents are what you expect; and additionally, if there are modifications versus the original “tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb”, you might post the modifications. Reverse compile can be done via (this won’t preserve comments):

dtc -I dtb -O dts -o /tmp/extracted.dts /boot/the_firmware_in_extlinux.dtb

Additionally, did any of your changes have any effect on what might be in “/lib/firmware/”? If so, starting at L4T R24.2, the initrd file is used. Changes to firmware there which is used during initial boot would also require updating the initrd file.

Hi @linuxdev
I didn’t change anything from sources_r24.2.1 but still same problem. If I copy only kernel Image file, everything still be OK. So I can confirm that this’s because device tree problem.
When I try to compare bin between prebuilt tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb with my file, there are some differences.
Any advices ?
Thanks

If you copy a kernel image, and if CONFIG_LOCALVERSION was not set to match (and the entire config), then I would expect issues. So the first question is did you exactly copy the previous running config, and did you set CONFIG_LOCALVERSION? If set, then “uname -r” should be the same regardless of which kernel is used.

Normally you’d just re-use the dtb files. Should the drivers change such that the dtb is now incorrect you’d have to change the dtb…but…do you have a reason to build and install not just a kernel, but also dtb? What are the particular hardware devices which are misbehaving after the changes?

Hi @linuxdev,
I just flash board with Jetpack v2.3 and rebuild kernel from sources_r24.2.1 then copy my Image and dtb to /boot folder. I didn’t change anything from the kernel source.
I don’t know how to set CONFIG_LOCALVERSION.
Last time, I made our camera driver working well on kernel 24.1. Now I want to update to kernel 24.2 so I need modify dtb file.
Thanks

Hi,

I figured out by myself. Because I used Jetpack 2.3 with kernel 24.2.1 then caused a missmatch.
After that, I use latest Jetpack as 2.3.1 so everything work well.