Occurred kernel panic after flashing

Hi

I have a problem. I’m flashing binary using flash.sh script for the first time. below command
sudo ./flash.sh jetson-tx2 mmcblk0p1

And I could see “The target t186ref has been flashed successfully” log
But my tx2 board has kernel panic with follows logs.
What is problems. i flashed binary according to your quick start guide.
Plz tell me the reasons.

Thanks,
doohan93

[ 01:32:16 ] L4T initrd starts from here…
[ 01:32:16 ] L4T-INITRD Build DATE: Sat Jan 1 01:32:16 UTC 2000
[ 01:32:16 ] Root device found: mmcblk0p1
Rootdevice found: /dev/mmcblk0p1
[ 5.733913] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. O pts: (null)
[ 01:32:16 ] Rootfs mounted over mmcblk0p1
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/dev does not exist
cp: cannot create regular file ‘etc/resolv.conf’: No such file or directory
[ 01:32:16 ] Switching from initrd to actual rootfs
chroot: failed to run command ‘/sbin/init’: No such file or directory
[ 5.780227] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00 007f00
[ 5.780227]
[ 5.791874] CPU3: stopping
[ 5.795412] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.15-tegra #1
[ 5.802686] Hardware name: quill (DT)
[ 5.807160] Call trace:
[ 5.810405] [] dump_backtrace+0x0/0x100
[ 5.816620] [] show_stack+0x14/0x1c
[ 5.822501] [] dump_stack+0x90/0xb4
[ 5.828372] [] handle_IPI+0x300/0x30c
[ 5.834394] [] gic_handle_irq+0x9c/0xb4
[ 5.840574] [] el1_irq+0x68/0xd8
[ 5.846142] [] cpuidle_enter+0x18/0x20
[ 5.852227] [] call_cpuidle+0x28/0x50
[ 5.858200] [] cpu_startup_entry+0x17c/0x340
[ 5.864772] [] secondary_start_kernel+0x130/0x168
[ 5.871766] [<000000008008192c>] 0x8008192c
[ 5.876650] CPU5: stopping
[ 5.880037] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.4.15-tegra #1
[ 5.887158] Hardware name: quill (DT)
[ 5.891479] Call trace:
[ 5.894555] [] dump_backtrace+0x0/0x100
[ 5.900584] [] show_stack+0x14/0x1c
[ 5.906241] [] dump_stack+0x90/0xb4
[ 5.911867] [] handle_IPI+0x300/0x30c
[ 5.917644] [] gic_handle_irq+0x9c/0xb4
[ 5.923605] [] el1_irq+0x68/0xd8
[ 5.928962] [] cpuidle_enter+0x18/0x20
[ 5.934831] [] call_cpuidle+0x28/0x50
[ 5.940595] [] cpu_startup_entry+0x17c/0x340
[ 5.946972] [] secondary_start_kernel+0x130/0x168
[ 5.953779] [<000000008008192c>] 0x8008192c
[ 5.958501] CPU0: stopping
[ 5.961755] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.15-tegra #1
[ 5.968770] Hardware name: quill (DT)
[ 5.973007] Call trace:
[ 5.976024] [] dump_backtrace+0x0/0x100
[ 5.982014] [] show_stack+0x14/0x1c
[ 5.987656] [] dump_stack+0x90/0xb4
[ 5.993288] [] handle_IPI+0x300/0x30c
[ 5.999089] [] gic_handle_irq+0x9c/0xb4
[ 6.005053] [] el1_irq+0x68/0xd8
[ 6.010407] [] cpuidle_enter+0x18/0x20
[ 6.016272] [] call_cpuidle+0x28/0x50
[ 6.022036] [] cpu_startup_entry+0x17c/0x340
[ 6.028416] [] rest_init+0x84/0x8c
[ 6.033915] [] start_kernel+0x39c/0x3b0
[ 6.039845] [<0000000080a63000>] 0x80a63000
[ 6.044574] CPU2: stopping
[ 6.047668] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.4.15-tegra #1
[ 6.054463] Hardware name: quill (DT)
[ 6.058484] Call trace:
[ 6.061296] [] dump_backtrace+0x0/0x100
[ 6.067062] [] show_stack+0x14/0x1c
[ 6.072478] [] dump_stack+0x90/0xb4
[ 6.077885] [] handle_IPI+0x300/0x30c
[ 6.083463] [] gic_handle_irq+0x9c/0xb4
[ 6.089211] [] el1_irq+0x68/0xd8
[ 6.094343] [] cpuidle_enter+0x18/0x20
[ 6.099991] [] call_cpuidle+0x28/0x50
[ 6.105548] [] cpu_startup_entry+0x17c/0x340
[ 6.111714] [] secondary_start_kernel+0x130/0x168
[ 6.118314] [<000000008008192c>] 0x8008192c
[ 6.122837] CPU1: stopping
[ 6.125902] CPU: 1 PID: 101 Comm: kworker/u12:3 Not tainted 4.4.15-tegra #1
[ 6.133221] Hardware name: quill (DT)
[ 6.137246] Workqueue: kmmcd mmc_rescan
[ 6.141453] Call trace:
[ 6.144260] [] dump_backtrace+0x0/0x100
[ 6.150028] [] show_stack+0x14/0x1c
[ 6.155448] [] dump_stack+0x90/0xb4
[ 6.160857] [] handle_IPI+0x300/0x30c
[ 6.166435] [] gic_handle_irq+0x9c/0xb4
[ 6.172193] [] el1_irq+0x68/0xd8
[ 6.177332] [] irq_exit+0x84/0xdc
[ 6.182552] [] __handle_domain_irq+0x6c/0xb4
[ 6.188728] [] gic_handle_irq+0x5c/0xb4
[ 6.194460] [] el1_irq+0x68/0xd8
[ 6.199585] [] sdhci_execute_tuning+0x33c/0x7bc
[ 6.206021] [] mmc_execute_tuning+0x40/0xb0
[ 6.212115] [] mmc_sdio_init_card+0x740/0x9e0
[ 6.218383] [] mmc_attach_sdio+0xa0/0x358
[ 6.224308] [] mmc_rescan+0x284/0x2f4
[ 6.229881] [] process_one_work+0x154/0x434
[ 6.235978] [] worker_thread+0x134/0x40c
[ 6.241812] [] kthread+0xe0/0xf4
[ 6.246949] [] ret_from_fork+0x10/0x40
[ 6.256798] Rebooting in 5 seconds…

Were you adding swap space, or is there any customization? If not, could you try flashing again making the whole eMMC available? Try:

sudo ./flash.sh -S 29318MiB jetson-tx2 mmcblk0p1

Swapper is complaining, and several meta file systems are not there…I am thinking perhaps it didn’t have space, so flashing with a larger partition might be a good test.

Additional note: Be sure your host had enough disk space (“df -H”). Default flash uses about 25GB, using full partition size will use about 35GB on the host.

  1. Were you adding swap space, or is there any customization?
    There was no any customization, i just used pure binary that decompress Tegra186_Linux_R27.1.0_aarch64.tbz2

  2. i tried to flash followed by below command, but result is same, happen kernel panic
    sudo ./flash.sh -S 29318MiB jetson-tx2 mmcblk0p1

How much free space do you have on the host disK?
(Run “df” on the host)

  1. host means ubuntu server? if my thoughts is correct, belows is result of df command

Filesystem 1K-blocks Used Available Use% Mounted on
udev 1999936 0 1999936 0% /dev
tmpfs 404440 6432 398008 2% /run
/dev/sda1 97920668 36870604 56052944 40% /
tmpfs 2022188 132 2022056 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 2022188 0 2022188 0% /sys/fs/cgroup
tmpfs 404440 56 404384 1% /run/user/1000
/dev/sdb1 15181780 37984 14349556 1% /media/doohan93/35a99421-cad1-4357-8668-06d82344562f

  1. And i tried to test rootfs on sd card method belows
    $ sudo mkfs.ext4 /dev/sdb1
    $ mount /dev/sdb1 /media/doohan93
    $ cd <your_L4T_root>/Linux_for_Tegra/rootfs
    $ sudo cp -a * && sync
    $sudo ./flash.sh jetson-tx2 mmcblk1p1

And i got kernel panic…what is a wrong with my procedure?

Thanks,
Doohan93

[ 5.822723] mmc1: tuning_window[5]: 0x0
[ 5.826957] mmc1: tuning_window[6]: 0x0
[ 5.831177] mmc1: tuning_window[7]: 0x0
[ 5.835381] sdhci: Tap value: 20 | Trim value: 5
[ 5.840379] sdhci: SDMMC_VENDOR_INTR_STATUS[0x108]: 0x40000
[ 5.851880] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[ 5.857821] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[ 6.194251] mmc2: new high speed SDHC card at address dafb
[ 6.200663] mmcblk1: mmc2:dafb SU16G 14.8 GiB
[ 6.212905] mmcblk1: p1
Rootdevice found: /dev/mmcblk1p1
[ 6.446011] EXT4-fs (mmcblk1p1): recovery complete
[ 6.451459] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[ 01:01:46 ] Rootfs mounted over mmcblk1p1
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/dev does not exist
cp: cannot create regular file ‘etc/resolv.conf’: No such file or directory
[ 01:01:46 ] Switching from initrd to actual rootfs
chroot: failed to run command ‘/sbin/init’: No such file or directory
[ 6.500378] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[ 6.500378]
[ 6.511251] CPU3: stopping
[ 6.514484] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.15-tegra #1
[ 6.521464] Hardware name: quill (DT)
[ 6.525666] Call trace:
[ 6.528651] [] dump_backtrace+0x0/0x100
[ 6.534621] [] show_stack+0x14/0x1c
[ 6.540258] [] dump_stack+0x90/0xb4
[ 6.545901] [] handle_IPI+0x300/0x30c
[ 6.551723] [] gic_handle_irq+0x9c/0xb4
[ 6.557733] [] el1_irq+0x68/0xd8
[ 6.563150] [] cpuidle_enter+0x18/0x20
[ 6.569106] [] call_cpuidle+0x28/0x50
[ 6.574968] [] cpu_startup_entry+0x17c/0x340
[ 6.581434] [] secondary_start_kernel+0x130/0x168
[ 6.588333] [<000000008008192c>] 0x8008192c
[ 6.593134] CPU5: stopping
[ 6.596446] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.4.15-tegra #1
[ 6.603507] Hardware name: quill (DT)

“Host” is the desktop PC controlling the flash. Looks like you have enough disk space.

Question: Did you have an SD card in the Jetson during the flash?

When flashing for use with an SD card as root partition there are some details you may need to be aware of…

The eMMC is mmcblk0p1, the SD card is mmcblk1p1. When you flash to eMMC you can simply edit the extlinux.conf file and set to boot with SD card as root partition. The boot loader and configuration will remain on eMMC and the system can function without SD card (you might need a serial console if you are going to switch between optional boot entries, e.g., you might have a boot entry for eMMC and another for SD card…if one fails the other can rescue). Flashing to mmcblk0p1 will accomplish this with an edit to extlinux.conf. You can essentially boot to either SD or eMMC in this case (so long as the “/boot” of eMMC remains intact both SD and eMMC can boot…losing everything outside of “/boot” of eMMC would still allow SD card boot…losing the SD card would still allow eMMC boot).

If you flash to SD card, then configuration is going to all be on the SD card. eMMC will no longer be bootable without an SD card (you can put a new file system on the SD card, but if it fails there is no rescue via eMMC boot…flash would be required). In the case of SD card you can prepare an SD card separately, but I think you need to have the SD card formatted and in the Jetson as you enter recovery mode if you want flash to add a file system to the SD. Losing the SD card (such as removal from the socket or SD card losing its “/boot”) disables booting and rescue.

Are you interested in putting all boot configuration on the SD card, or do you want to keep eMMC functional and simply edit an alternate entry to boot to SD?

1 Like

What file system is this device using? Is it a FAT or NTFS device, or using ext4?
Is this where you keep the jetpack install on the host?

Specifically, the Jetpack install/prepare/build/flash scripts do not work on non-Linux file systems; FAT and NTFS do not work.

Hi,

I have resolved this issue.

I used virtualbox that installed ubuntu 16.04 in my home. even though i tried any falshing mothods, the result was failed.

So i have tested real linux machine not virtualbox. and then falshing and booting succeed.

I guess my configuration of virtualbox install ubuntu was wrong.

I’m grateful for your kind response.

Thanks,
Doohan93