Jetson TX1 Kernel Development - Rebuilding the Kernel

I have been working for over a week to get a newly built kernel to boot on my Jetson TX1 without success so I am finally turning to this forum for some help.

I have read all there is to read about building a new kernel including:
https://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code#Build_Kernel
http://elinux.org/Jetson/TX1_Upstream_Kernel
https://devtalk.nvidia.com/default/topic/929186/jetson-tx1-kernel-compilation/
https://gist.github.com/chutsu/9bb6abe6f61924c88521adec859c7006

Here is what I did:

  1. I did succeed to rebuild the kernel and to flash it using ‘sudo ./flash.sh jetson-tx1 mmcblk0p1’. The Jetson comes up ok and the response to ‘uname -r’ reflects the newly created kernel.
  2. I then modified a kernel source file with a simple comment to force a new build.
  3. I moved the new ‘Image’ and ‘zImage’ kernel images and renamed them to Image2 and zImage2.
  4. I reset the board and in U-BOOT executed ‘ums 0 mmc 0’. From a Linux host I accessed the jetson flash using a mount command and had access to the root file system on the Jetson.
  5. I manually copied Image2 and zImage2 to /boot on the Jetson.
  6. I edited the file /boot/extlinux/extlinux.conf and copied the primary entry to some secondary entry and changed the Linux image entry to Image2
  7. I then rebooted and chose the secondary image when prompted.
  8. Kernel fails to boot with the following diagnostics messages (see below)

!! Can anyone tell me what I am doing wrong here?? I just want to update the kernel so that I can develop with the kernel.

Many Thanks
Michael Stamler, CTO
Xicore Research Ltd.
michael.s@xicoreresearch.com

U-Boot 2015.07-rc2-gc19a2f8 (May 17 2016 - 16:28:10 -0700)

TEGRA210
Model: NVIDIA P2371-2180
DRAM: 4 GiB
MC: Tegra SD/MMC: 0, Tegra SD/MMC: 1
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x0000000012000000-0x0000000012010000
tegra-pcie: non-prefetchable memory: 0x0000000013000000-0x0000000020000000
tegra-pcie: prefetchable memory: 0x0000000020000000-0x0000000040000000
tegra-pcie: 4x1, 1x1 configuration
tegra-pcie: probing port 0, using 4 lanes
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, ignoring
tegra-pcie: probing port 1, using 1 lanes
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, ignoring
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1…
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1828 bytes read in 207 ms (7.8 KiB/s)
p2371-2180 eMMC boot options
1: primary kernel
2: kernel 2
Enter choice: 2
2: kernel 2
Retrieving file: /boot/Image2
19982676 bytes read in 753 ms (25.3 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 vpr_resize 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 root=/dev/mmcblk0p1 rw rootwait
Retrieving file: /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
305953 bytes read in 178 ms (1.6 MiB/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 000000008204db20

Starting kernel …

“Synchronous Abort” handler, esr 0x02000000
ELR: 80080084
LR: 80080048
x0 : 0000000082000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : 0000000000000000
x4 : ffffffffffffffff x5 : 000000000000001c
x6 : ffffffffffffffff x7 : 0000000000000000
x8 : 000000008204c000 x9 : 0000000001008000
x10: 000000000a200023 x11: 0000000000000002
x12: 0000000000000002 x13: 0000000000000040
x14: 0000000000000001 x15: 00000000ff12c0e4
x16: 00000000ff12c290 x17: 0000000000010000
x18: 00000000fcc28df8 x19: 00000000ff1994a0
x20: 0000000000000000 x21: 0000000082000000
x22: 00000000000000e5 x23: 0000000000000003
x24: 0000000000000000 x25: 00000000fcc22e60
x26: 00000000ff18f130 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000ff12c850

Resetting CPU …

resetting …
[0000.171] [TegraBoot] (version 24.00.2015.42-mobile-f8f04b74)
[0000.176] Processing in cold boot mode Bootloader 2
[0000.181] A02 Bootrom Patch rev = 63
[0000.184] Power-up reason: software reset
[0000.188] No Battery Present
[0000.191] Platform has Ddr4 type ram
[0000.194] max77620 disabling SD1 Remote Sense
[0000.198] Setting Ddr voltage to 1125mv
[0000.203] Serial Number of Pmic Max77663: 0xd07f6
[0000.210] Entering ramdump check
[0000.213] Get RamDum

Note that upstream kernels will not be capable of using the nVidia drivers which are dependent upon older ABIs. This means the video driver will have to be the software-only nouveau, there will be no GPU acceleration…both for video and for CUDA. Any driver which needs particular firmware may also become incompatible, so parts of hardware will stop functioning with use of upstream kernels. Whatever firmware is used in the original extlinux.conf “FDT” will need to be customized for the new kernel and use the values the newer drivers expect.

What is in your extlinux.conf, and have you changed firmware from the original FDT to that used in the newer kernel? Building firmware would be an extra step. When building the kernel this would be the “make dtbs” target, and you may still need to set a kernel config for building firmware. The FDT/dtb file and the content in “/lib/firmware” would need update.

FYI, I do not believe this version of u-boot understands zImage, at least not for 64-bit. This is probably why the uncompressed Image is used.