R3840 在通过scp copy东西的时候 直接从内核重启了,不从mb1阶段重启

hi:nv

我们遇到一个现象,就是在scp 传输文件的时候遇到直接从内核重启,没有从uefi阶段重启,想知道这个是什么原因呢

new 4.txt (160.5 KB)

Hi mingming,

Are you using the devkit or custom board for Thor?

Do you enable kernel kexec in your case?

hi:

我如何确认这个呢?

Are you using the devkit or custom board for Thor? -----》custom board

Are you using the customized kernel as I don’t see such behavior on the AGX Thor devkit with official r38.4 installed?

Could you simply run the following commands to check?

$ which kexec
$ zcat /proc/config.gz|grep CONFIG_KEXEC
$ cat /sys/kernel/kexec_loaded
agi@tegra-ubuntu:~$ which kexec
/usr/sbin/kexec
agi@tegra-ubuntu:~$ zcat /proc/config.gz|grep CONFIG_KEXEC
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
agi@tegra-ubuntu:~$ cat /sys/kernel/kexec_loaded
0
agi@tegra-ubuntu:~$ 

It seems kexec is not enabled on your board.

Could you reproduce the similar issue on the devkit?
Please share the result of the following command on your board.

$ cat /etc/nv_tegra_release
$ cat /etc/nv_boot_control.conf

@KevinFFF would this work?

sudo kexec -l /boot/Image \
  --initrd=/boot/initrd \
  --reuse-cmdline

cat /sys/kernel/kexec_loaded

#Then to reboot through kexec:
sudo kexec -e

Yes, the steps you shared would trigger kexec to load the new kernel.

I edited /etc/default/kdump-tools to add following. Reduce KDUMP_NUM_DUMPS=# unless you have a large nvme. And insert your PARTUUID

KDUMP_CMDLINE="root=PARTUUID=${your root partuuid} rw rootwait rootfstype=ext4 earlycon=tegra_utc,mmio32,0xc5a0000
  console=ttyUTC0,115200 firmware_class.path=/etc/firmware efi=runtime irqpoll reset_devices systemd.unit=kdump-tools-dump.service nr_cpus=1"

KDUMP_NUM_DUMPS=2

sudo systemctl restart kdump-tools
cat /sys/kernel/kexec_crash_loaded   # confirm still 1
cat /var/crash/kexec_cmd             # verify new cmdline was used


# How to Test (Destructive — crashes and reboots the system)
echo c | sudo tee /proc/sysrq-trigger

# After reboot, check for a timestamped subdirectory in /var/crash/:

  ls -lt /var/crash/