Cannot build working r24.1 kernel

I can compile the r24.1 kernel, but when the TX1 boots with it it kernel panics immediately. I’ve tried using the standard aarch compiler provided by ubuntu as well as the linaro compiler. Below is the result after the boot (this was with the linaro compiler):

Retrieving file: /boot/Image
19038936 bytes read in 501 ms (36.2 MiB/s)
append: console=ttyS0,115200n8 fbcon=map:0 androidboot.modem=none androidboot.se
rialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 d
dr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_por
t_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_c
onsole_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 m
axcpus=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 andro
idboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature
=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 root=/dev/mmcblk0p1 rw roo
twait
Retrieving file: /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
266645 bytes read in 107 ms (2.4 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 0000000082044194

Starting kernel …

[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.96-g2357b13-dirty (cdb@eorl) (gcc version 5.3.
1 20160113 (Linaro GCC 5.3-2016.02) ) #1 SMP PREEMPT Sat May 28 13:25:50 MST 201
6
[ 0.000000] CPU: Cortex A57 Processor [411fd071] revision 1
[ 0.000000] alternative: enabling workaround for ARM erratum 832075
[ 0.000000] Machine: jetson_tx1
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Reserved memory: initialized node iram-carveout, compatible id nv
idia,iram-carveout
[ 0.000000] swapper[0]: undefined instruction: pc=ffffffc000000004
[ 0.000000] Code: bad PC value
[ 0.000000] Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.96-g2357b13-dirty #1
[ 0.000000] task: ffffffc001101870 ti: ffffffc0010f4000 task.ti: ffffffc0010f
4000
[ 0.000000] PC is at 0xffffffc000000004
[ 0.000000] LR is at 0xffffffc000000000
[ 0.000000] pc : [] lr : [] pstate: 60000
3c5
[ 0.000000] sp : ffffffc0010f7f90
[ 0.000000] x29: 0000000000000000 x28: 0000004080000000
[ 0.000000] x27: ffffffc0000803f8 x26: 000000008007d000
[ 0.000000] x25: 000000008007b000 x24: 0000000080000000
[ 0.000000] x23: 0000000081103090 x22: 00000000411fd071
[ 0.000000] x21: ffffffc001349000 x20: ffffffc0012a8648
[ 0.000000] x19: ffffffc002000058 x18: 00000000fcc29df8
[ 0.000000] x17: 0000000000010000 x16: 0000000000000074
[ 0.000000] x15: 0000000000000075 x14: 000000000000006f
[ 0.000000] x13: 0000000000000061 x12: 0000000000000063
[ 0.000000] x11: 000000000000002d x10: 000000000000006d
[ 0.000000] x9 : 0000000000000061 x8 : 0000000000000005
[ 0.000000] x7 : ffffffc0002e38b8 x6 : ffffffc0002e38e0
[ 0.000000] x5 : ffffffc0010f7be8 x4 : 0000000000000030
[ 0.000000] x3 : ffffffc000093a30 x2 : 0000000000000000
[ 0.000000] x1 : ffffffc0010f4000 x0 : 0000000000000001
[ 0.000000]
[ 0.000000] SP: 0xffffffc0010f7f10:
[ 0.000000] 7f10 012a8648 ffffffc0 01349000 ffffffc0 411fd071 00000000 81103
090 00000000
[ 0.000000] 7f30 80000000 00000000 8007b000 00000000 8007d000 00000000 00080
3f8 ffffffc0
[ 0.000000] 7f50 80000000 00000040 00000000 00000000 00000000 ffffffc0 010f7
f90 ffffffc0
[ 0.000000] 7f70 00000004 ffffffc0 600003c5 00000000 00000000 ffffffc0 411fd
071 00000000
[ 0.000000] 7f90 010c7000 ffffffc0 010f7fe8 ffffffc0 82000000 00000000 0107a
328 ffffffc0
[ 0.000000] 7fb0 012a8300 ffffffc0 00000e12 00000000 01076624 ffffffc0 002e3
8b8 ffffffc0
[ 0.000000] 7fd0 ff199aa0 00000000 80080210 00000000 00000000 00000000 010c4
f50 ffffffc0
[ 0.000000] 7ff0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000]
[ 0.000000] X1: 0xffffffc0010f3f80:
[ 0.000000] 3f80 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 3fa0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 3fc0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 3fe0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 4000 00000000 00000000 ffffffff ffffffff 01101870 ffffffc0 000ba
f38 ffffffc0
[ 0.000000] 4020 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 4040 00000000 00000000 40000003 00000000 00000100 00000000 00000
000 00000000
[ 0.000000] 4060 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000]
[ 0.000000] X3: 0xffffffc0000939b0:
[ 0.000000] 39b0 b9476e80 b9476e61 6b00003f 540000c0 6b1f001f 1a9f17e2 52800
001 52800200
[ 0.000000] 39d0 97fffcb6 b9477280 b9477261 6b00003f 540000c0 6b1f001f 1a9f1
7e2 52800001
[ 0.000000] 39f0 52800600 97fffcad f9400bfe a8c253f3 d65f03c0 d65f03c0 52800
000 d65f03c0
[ 0.000000] 3a10 d10043ff 910043e2 381ffc40 aa0203e1 d2800060 d45e0000 91004
3ff d65f03c0
[ 0.000000] 3a30 34000342 a9bd53f3 a9015bf5 f90013fe aa0103f3 51000440 2a000
3f4 91000694
[ 0.000000] 3a50 8b140034 b00090b5 528001b6 39400260 7100281f 54000081 f9430
6a1 2a1603e0
[ 0.000000] 3a70 d63f0020 f94306a1 38401660 d63f0020 eb14027f 54fffec1 a9415
bf5 f94013fe
[ 0.000000] 3a90 a8c353f3 d65f03c0 d65f03c0 a9be53f3 a9017bf5 53001c15 b0009
0b4 91182294
[ 0.000000]
[ 0.000000] X5: 0xffffffc0010f7b68:
[ 0.000000] 7b68 00ee80f8 ffffffc0 00000004 00000000 00000001 00000000 000a7
070 ffffffc0
[ 0.000000] 7b88 012a8f35 ffffffc0 000a6b70 ffffffc0 000a6b58 00000001 010f7
c50 ffffffc0
[ 0.000000] 7ba8 010f7c50 ffffffc0 010f7c10 ffffffc0 ffffffc8 00000000 00086
520 ffffffc0
[ 0.000000] 7bc8 00ee8132 ffffffc0 010f7c50 ffffffc0 010f7c50 ffffffc0 010f7
c10 ffffffc0
[ 0.000000] 7be8 ffffffc8 00000000 010f7c50 ffffffc0 010f7c50 ffffffc0 010f7
c10 ffffffc0
[ 0.000000] 7c08 ffffffc8 00000000 000803f8 ffffffc0 ffffffc0 00000000 00000
004 00000000
[ 0.000000] 7c28 00093a30 ffffffc0 00000008 00000000 010f7c38 ffffffc0 00086
4cc ffffffc0
[ 0.000000] 7c48 002e38b8 ffffffc0 00000005 00000000 00000100 00000000 00ee8
130 ffffffc0
[ 0.000000]
[ 0.000000] X6: 0xffffffc0002e3860:
[ 0.000000] 3860 f100205f 54fffd8a b50001a2 d65f03c0 f100205f 5400014d d1002
042 f9400029
[ 0.000000] 3880 f9000069 91002021 91002063 f100205f 54ffff4a b5000042 d65f0
3c0 b40002e2
[ 0.000000] 38a0 92400c46 100000a7 d2800108 cb060108 8b080ce6 d61f00c0 38401
429 38001469
[ 0.000000] 38c0 3840142a 3800146a 3840142b 3800146b 3840142c 3800146c 38401
42d 3800146d
[ 0.000000] 38e0 3840142e 3800146e 3840142f 3800146f 38401430 38001470 d65f0
3c0 cb0103e6
[ 0.000000] 3900 f24008c6 54000100 cb060042 38401429 38001469 f10004c6 54fff
fac f101005f
[ 0.000000] 3920 54fff76b f2400866 54000561 f102005f 540001ea d1010042 a9402
829 a941302b
[ 0.000000] 3940 a942382d a943402f 91010021 f101005f a9002869 a901306b a9023
86d a903406f
[ 0.000000]
[ 0.000000] X7: 0xffffffc0002e3838:
[ 0.000000] 3838 39000069 3900046a 3900086b 39000c6c 3900106d 3900146e 39001
86f 39001c70
[ 0.000000] 3858 91002021 91002063 f100205f 54fffd8a b50001a2 d65f03c0 f1002
05f 5400014d
[ 0.000000] 3878 d1002042 f9400029 f9000069 91002021 91002063 f100205f 54fff
f4a b5000042
[ 0.000000] 3898 d65f03c0 b40002e2 92400c46 100000a7 d2800108 cb060108 8b080
ce6 d61f00c0
[ 0.000000] 38b8 38401429 38001469 3840142a 3800146a 3840142b 3800146b 38401
42c 3800146c
[ 0.000000] 38d8 3840142d 3800146d 3840142e 3800146e 3840142f 3800146f 38401
430 38001470
[ 0.000000] 38f8 d65f03c0 cb0103e6 f24008c6 54000100 cb060042 38401429 38001
469 f10004c6
[ 0.000000] 3918 54ffffac f101005f 54fff76b f2400866 54000561 f102005f 54000
1ea d1010042
[ 0.000000]
[ 0.000000] X19: 0xffffffc001ffffd8:
[ 0.000000] ffd8 ******** ******** ******** ******** ******** ******** *****


[ 0.000000] fff8 ******** ******** edfe0dd0 00200400 58000000 0cde0300 28000
000 11000000
[ 0.000000] 0018 10000000 00000000 bf380000 b4dd0300 00000000 00000080 00000
000 00000200
[ 0.000000] 0038 00000000 00000082 00000000 00200400 00000000 00000000 00000
000 00000000
[ 0.000000] 0058 01000000 00000000 03000000 21000000 00000000 6469766e 6a2c6
169 6f737465
[ 0.000000] 0078 76632d6e 69766e00 2c616964 72676574 30313261 00000000 03000
000 04000000
[ 0.000000] 0098 0b000000 01000000 03000000 04000000 1c000000 02000000 03000
000 04000000
[ 0.000000] 00b8 2b000000 02000000 03000000 15000000 37000000 2079614d 32203
832 00363130
[ 0.000000]
[ 0.000000] X20: 0xffffffc0012a85c8:
[ 0.000000] 85c8 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 85e8 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8608 00093b98 ffffffc0 fbc06000 ffffffbf 00000000 00000000 00000
000 00000000
[ 0.000000] 8628 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8648 00000000 00000000 80000000 00000000 00000711 00000000 00000
713 00000000
[ 0.000000] 8668 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8688 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 86a8 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000]
[ 0.000000] X21: 0xffffffc001348f80:
[ 0.000000] 8f80 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8fa0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8fc0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 8fe0 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 9000 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 9020 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 9040 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000] 9060 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.000000]
[ 0.000000] X27: 0xffffffc000080378:
[ 0.000000] 0378 f8267b47 d65f03c0 01101480 ffffffc0 0000000f 00000000 012a8
598 ffffffc0
[ 0.000000] 0398 00080200 ffffffc0 00084000 ffffffc0 00000711 00000000 0137d
487 ffffffc0
[ 0.000000] 03b8 fbc00000 ffffffbf 000803f8 ffffffc0 012a82d8 ffffffc0 0137d
488 ffffffc0
[ 0.000000] 03d8 012a8478 ffffffc0 010c7ae8 ffffffc0 012a8650 ffffffc0 010f7
ff0 ffffffc0
[ 0.000000] 03f8 10fffe83 a8c11c66 eb0700df 54000062 f80084df 17fffffd a8c11
464 f8408466
[ 0.000000] 0418 f9400070 9100021f f9000096 f90000b5 f90000d8 d280001d 143fd
86c d503201f
[ 0.000000] 0438 17ffffff d503201f 100001c1 a9400c22 cb020021 8b010063 29401
865 340000c5
[ 0.000000] 0458 0a0000c6 6b0600bf 54000080 91006063 17fffffa d2800003 aa030
3e0 d65f03c0
[ 0.000000]
[ 0.000000] Process swapper (pid: 0, stack limit = 0xffffffc0010f4058)
[ 0.000000] Stack: (0xffffffc0010f7f90 to 0xffffffc0010f8000)
[ 0.000000] 7f80: 010c7000 ffffffc0 010f7
fe8 ffffffc0
[ 0.000000] 7fa0: 82000000 00000000 0107a328 ffffffc0 012a8300 ffffffc0 00000
e12 00000000
[ 0.000000] 7fc0: 01076624 ffffffc0 002e38b8 ffffffc0 ff199aa0 00000000 80080
210 00000000
[ 0.000000] 7fe0: 00000000 00000000 010c4f50 ffffffc0 00000000 00000000 00000
000 00000000
[ 0.000000] Call trace:
[ 0.000000] Code: bad PC value
[ 0.000000] —[ end trace 1b75b31a2719ed1c ]—
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!

Knowing what the .config file content was for the kernel during compile would be useful. What was the source of your .config? Was it tegra21_defconfig? Or “/boot/config.gz”? Were there any modifications to this?

I discovered that I had to build new compilers for the kernel. They’re available in the r24.1 documentation. There’s a bjzip file jetson-tx1-toolchain-build.tbz2 which has the build.

Once I used that compiler it worked fine.