A self-compiled kernel boot error occurred.

Hello,
I am using JETSON TX2.
I compiled the kernel in source_release.tbz2 as follows.
1.TEGRA_KERNEL_OUT=
2.export CROSS_COMPILE=/home/gpu/gpu/gcc-src/install/bin/aarch64-unknown-linux-gnu-
3.make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra18_defconfig
4.make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2
I can compile it successfully, but the resulting Image launch will fail.
Below is part of the print message:

Starting kernel …

[ 0.000000] Booting Linux on physical CPU 0x100
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.38 (gpu@ubuntu) (gcc version 4.8.5 (GCC) ) #6 SMP PREEMPT Wed Apr 11 10:22:55 CST 2018
[ 0.000000] Boot CPU: AArch64 Processor [411fd073]
[ 0.000000] earlycon: Early serial console at MMIO32 0x3100000 (options ‘’)
[ 0.000000] bootconsole [uart0] enabled
[ 0.000000] Reserved memory: initialized node ramoops_carveout, compatible id nvidia,ramoops
[ 0.000000] cma: Reserved 64 MiB at 0x00000000f2000000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] PERCPU: Embedded 17 pages/cpu @ffffffc1ffdfa000 s31360 r8192 d30080 u69632
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 2019520
[ 0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait fbcon=map:0 net.ifnames=0 console=tty0 OS=l4t console=ttyS0,115200n8 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0xf7fc0000 gpt androidboot.secureos=none tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 android.kerneltype=normal androidboot.serialno=0420318067328 androidboot.security=non-secure sdhci_tegra.en_boot_part_access=1
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[ 0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.000000] Memory: 7968252K/8206336K available (11124K kernel code, 1792K rwdata, 5720K rodata, 1164K init, 691K bss, 172548K reserved, 65536K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000 ( 246 GB)
[ 0.000000] vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000 ( 8 GB maximum)
[ 0.000000] 0xffffffbdc2000000 - 0xffffffbdca000000 ( 128 MB actual)
[ 0.000000] fixed : 0xffffffbffa7fd000 - 0xffffffbffac00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000 ( 16 MB)
[ 0.000000] modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc200000000 ( 8192 MB)
[ 0.000000] .init : 0xffffffc0010f4000 - 0xffffffc001217000 ( 1164 KB)
[ 0.000000] .text : 0xffffffc000080000 - 0xffffffc0010f4000 ( 16848 KB)
[ 0.000000] .data : 0xffffffc001238000 - 0xffffffc0013f8060 ( 1793 KB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 64.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=6.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=6
[ 0.000000] NR_IRQS:64 nr_irqs:64 0
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] Architected cp15 timer(s) running at 31.25MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xe6a171046, max_idle_ns: 881590405314 ns
[ 0.000002] sched_clock: 56 bits at 31MHz, resolution 32ns, wraps every 4398046511088ns
[ 0.009242] Tegra Chip ID not yet available
[ 0.013589] ------------[ cut here ]------------
[ 0.018371] WARNING: at ffffffc000461064 [verbose debug info unavailable]
[ 0.025404] Modules linked in:
[ 0.028567]
[ 0.030107] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.38 #6
[ 0.036240] Hardware name: quill (DT)
[ 0.040032] task: ffffffc00124a240 ti: ffffffc001238000 task.ti: ffffffc001238000
[ 0.047795] PC is at tegra_read_chipid+0x48/0x54
[ 0.052576] LR is at tegra_read_chipid+0x48/0x54
[ 0.057359] pc : [] lr : [] pstate: 600000c5
[ 0.065023] sp : ffffffc00123be90
[ 0.068453] x29: ffffffc00123be90 x28: ffffffc00148c2a8
[ 0.073960] x27: 0000000000000000 x26: 0000000000000000
[ 0.079466] x25: ffffffc0012409d8 x24: ffffffc001241af0
[ 0.084972] x23: ffffffc00148c000 x22: ffffffc1fff15ee0
[ 0.090476] x21: 0000000000000000 x20: 0000000000000001
[ 0.095984] x19: ffffffc00146ba40 x18: 000000000000000c
[ 0.101491] x17: 000000000000123f x16: 0000000000000001
[ 0.106995] x15: 0000000000000002 x14: 3839333420797265
[ 0.112500] x13: 7665207370617277 x12: ffffffc001259000
[ 0.118007] x11: 0000000000000002 x10: 0000000000000000
[ 0.123514] x9 : 0000000000000029 x8 : 657920746f6e2044
[ 0.129021] x7 : 0000000000000000 x6 : ffffffc001125198
[ 0.134528] x5 : ffffffc0011250bc x4 : 0000000000000000
[ 0.140034] x3 : 0000000000000000 x2 : 0000000000000001
[ 0.145540] x1 : ffffffc001238000 x0 : 000000000000001f
[ 0.151045]
[ 0.152732] —[ end trace cb88537fdc8fa200 ]—
[ 0.157512] Call trace:
[ 0.160043] [] tegra_read_chipid+0x48/0x54
[ 0.165906] [] tegra_get_platform+0xc/0xb8
[ 0.171774] [] tegra186_timer_init+0xf0/0x304
[ 0.177911] [] clocksource_probe+0x60/0xa0
[ 0.183776] [] time_init+0x14/0x44
[ 0.188921] [] start_kernel+0x28c/0x3b4
[ 0.194514] [<0000000080b53000>] 0x80b53000
[ 0.199508] Tegra Chip ID not yet available
[ 0.203851] ------------[ cut here ]------------
[ 0.208631] WARNING: at ffffffc000461064 [verbose debug info unavailable]
[ 0.215668] Modules linked in:
[ 0.218829]
[ 0.220369] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.4.38 #6
[ 0.227764] Hardware name: quill (DT)
[ 0.231555] task: ffffffc00124a240 ti: ffffffc001238000 task.ti: ffffffc001238000
[ 0.239312] PC is at tegra_read_chipid+0x48/0x54
[ 0.244092] LR is at tegra_read_chipid+0x48/0x54
[ 0.248873] pc : [] lr : [] pstate: 600000c5
[ 0.256538] sp : ffffffc00123be90
[ 0.259967] x29: ffffffc00123be90 x28: ffffffc00148c2a8
[ 0.265473] x27: 0000000000000001 x26: 0000000000000001
[ 0.270978] x25: ffffffc0012409d8 x24: ffffffc001241af0
[ 0.276485] x23: ffffffc00148c000 x22: ffffffc1fff15ee0
[ 0.281991] x21: 0000000000000001 x20: 0000000000000002
[ 0.287499] x19: ffffffc00146ba40 x18: 000000000000000c
[ 0.293005] x17: 000000000000123f x16: 0000000000000001
[ 0.298511] x15: 0000000000000002 x14: 3839333420797265
[ 0.304018] x13: 7665207370617277 x12: ffffffc001259000
[ 0.309524] x11: 0000000000000002 x10: 0000000000000000
[ 0.315029] x9 : 000000000000004e x8 : 6f6e204449207069
[ 0.320535] x7 : 0000000000000000 x6 : ffffffc001125198
[ 0.326040] x5 : ffffffc0011250bc x4 : 0000000000000000
[ 0.331547] x3 : 0000000000000000 x2 : 0000000000000001
[ 0.337054] x1 : ffffffc001238000 x0 : 000000000000001f

What might be the reason?

Do you still have the original kernel? If so, then try with the “/proc/config.gz” as your config. Don’t trust tegra18_defconfig.

Also, did you set CONFIG_LOCALVERSION, and are modules correctly installed at:

/lib/modules/$(uname -r)/

CONFIG_LOCALVERSION determines the suffix of “uname -r”, and “uname -r” determines where modules are searched for.

If your method is same as those described in L4T document, also tell us how you updated your kernel.

I downloaded the 27.1 version of the kernel and tried to boot it up.(still use tegra18_defconfig)
Why did I compile the 27.1 version of the kernel and launch it ?
I found that the 28.2 kernel compiled far more DTB files than the 27.1 kernel.
Why are there so many DTB files, which should I use?

My method is to follow the L4T document.
1.TEGRA_KERNEL_OUT=
2.export CROSS_COMPILE=/home/gpu/gpu/gcc-src/install/bin/aarch64-unknown-linux-gnu-
3.make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra18_defconfig
4.make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2
I haven’t updated the kernel at all.So I don’t know why the above problems occur, I don’t know if I have any part of the operation error

Consider that the kernel tends to build device tree files for multiple carrier boards. You’ll only need the one for your carrier (each board/carrier combination may have the same hardware, but at routed differently even when the hardware is the same). The correct one depends on L4T release and carrier board. Is this the dev kit TX2 under R28.2.1?

Don’t mix an R27.1 and R28.x device tree or kernel. Don’t mix a TX1 and TX2 device tree or kernel. The mix would be incompatible.

Are you asking why a kernel and/or device tree combination might not be compatible?

FYI, I still recommend not starting with tegra18_defconfig, but instead starting with the config.gz found in the running system.

I didn’t mix different versions of the device tree with the kernel.
I’m using the tx2 development board now, and the kernel version is 27.1. Which device tree should I use.
After compilation is complete, the following dtb appears in the /boot/dts:
tegra186-quill-p3310-1000-a00-00-ape-cam.dtb tegra186-quill-p3310-1000-a00-00-base.dtb tegra186-quill-p3310-1000-a00-00-base-mods-display.dtb tegra186-quill-p3310-1000-a00-00-dsi-dp.dtb tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb tegra186-quill-p3310-1000-a00-00-edp.dtb tegra186-quill-p3310-1000-a00-00-imx274.dtb tegra186-quill-p3310-1000-a00-00-no-rtcpu.dtb tegra186-quill-p3310-1000-c03-00-base.dtb

Please use tegra186-quill-p3310-1000-c03-00-base.dtb.

BTW, why not move to rel-28.2 kernel?

[b]First of all, thank you very much for your patient reply to my question.
The kernel boot failed at 28.2.At least 27.1 will still boot.
I verify the kernel and device tree by TFTP.
When I’m under uboot, I follow the parameters below.That is, the kernel is started through TFTP and the device tree is not through TFTP.The device can start successfully.
setenv ipaddr 192.168.0.101 && setenv serverip 192.168.0.110 && setenv image Image && setenv bootcmd_tftp ‘dhcp {image};booti {loadaddr} - ${fdt_addr}’ && setenv bootcmd ‘run bootcmd_tftp’

But when I set it as follows,that is, the kernel is started through TFTP and the device tree is also through TFTP.
setenv ipaddr 192.168.0.101 && setenv serverip 192.168.0.110 && setenv image Image && setenv fdt_file tegra186-quill-p3310-1000-c03-00-base.dtb && setenv bootcmd_tftp ‘dhcp {image}; dhcp {fdt_addr_r} {fdt_file}; booti {loadaddr} - ${fdt_addr_r}’ && setenv bootcmd ‘run bootcmd_tftp’

The following error will occur:[/b]
ALSA device list:
[ 4.497148] #0: tegra-hda at 0x3518000 irq 391
[ 4.594400] VFS: Cannot open root device “(null)” or unknown-block(0,0): error -6
[ 4.601890] Please append a correct “root=” boot option; here are the available partitions:
[ 4.610233] b300 30535680 mmcblk0 driver: mmcblk
[ 4.615559] b301 29360128 mmcblk0p1 00000000-0000-0000-0000-000000000000
[ 4.623041] b302 4096 mmcblk0p2 00000000-0000-0000-0000-000000000000
[ 4.630525] b303 256 mmcblk0p3 00000000-0000-0000-0000-000000000000
[ 4.638004] b304 256 mmcblk0p4 00000000-0000-0000-0000-000000000000
[ 4.645482] b305 3072 mmcblk0p5 00000000-0000-0000-0000-000000000000
[ 4.652963] b306 2 mmcblk0p6 00000000-0000-0000-0000-000000000000
[ 4.660440] b307 604 mmcblk0p7 00000000-0000-0000-0000-000000000000
[ 4.667917] 103:00000 500 mmcblk0p8 00000000-0000-0000-0000-000000000000
[ 4.675396] 103:00001 2048 mmcblk0p9 00000000-0000-0000-0000-000000000000
[ 4.682919] 103:00002 6144 mmcblk0p10 00000000-0000-0000-0000-000000000000
[ 4.690554] 103:00003 2048 mmcblk0p11 00000000-0000-0000-0000-000000000000
[ 4.698133] 103:00004 131072 mmcblk0p12 00000000-0000-0000-0000-000000000000
[ 4.705716] 103:00005 32768 mmcblk0p13 00000000-0000-0000-0000-000000000000
[ 4.713289] 103:00006 65536 mmcblk0p14 00000000-0000-0000-0000-000000000000
[ 4.720865] 103:00007 256 mmcblk0p15 00000000-0000-0000-0000-000000000000
[ 4.728444] 103:00008 262144 mmcblk0p16 00000000-0000-0000-0000-000000000000
[ 4.736016] 103:00009 662685 mmcblk0p17 00000000-0000-0000-0000-000000000000
[ 4.743598] b308 4096 mmcblk0rpmb (driver?)
[ 4.748835] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 4.757085] CPU3: stopping
[ 4.759788] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.154.4.15 #6
[ 4.766212] Hardware name: quill (DT)
[ 4.769862] Call trace:
[ 4.772306] [] dump_backtrace+0x0/0x100
[ 4.777692] [] show_stack+0x14/0x1c
[ 4.782732] [] dump_stack+0x90/0xb4
[ 4.787771] [] handle_IPI+0x300/0x30c
[ 4.792982] [] gic_handle_irq+0x9c/0xb4
[ 4.798367] [] el1_irq+0x68/0xd8
[ 4.803148] [] cpuidle_enter+0x18/0x20
[ 4.808448] [] call_cpuidle+0x28/0x50
[ 4.813659] [] cpu_startup_entry+0x17c/0x340
[ 4.819477] [] secondary_start_kernel+0x130/0x168
[ 4.825728] [<000000008008192c>] 0x8008192c
[ 4.829899] CPU4: stopping
[ 4.832597] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 4.4.154.4.15 #6
[ 4.839021] Hardware name: quill (DT)
[ 4.842672] Call trace:
.
.
.
[ 5.133321] Rebooting in 5 seconds…[0000.202] I> Welcome to MB2(TBoot-BPMP)(version: 01.00.160913-t186-M-00.00-mobile-f4c42291)
It will restart later, but with my kernel but not with my device tree.

DHCP client bound to address 192.168.0.100 (252 ms)
Using ethernet@2490000 device
TFTP from server 192.168.0.110; our IP address is 192.168.0.100
Filename ‘Image’.
Load address: 0x80080000
Loading: #################################################################
##########################################################
2.2 MiB/s
done
Bytes transferred = 18980832 (1219fe0 hex)

Flattened Device Tree blob at 92000000

Booting using the fdt blob at 0x92000000
reserving fdt memory region: addr=80000000 size=10000
Using Device Tree in place at 0000000092000000, end 0000000092041873

Starting kernel …

Do I have any errors about the TFTP startup configuration?