Is kexec supported on Jetson Nano?

Hi,

When trying to use kexec on the Jetson Nano it causes a full reboot (going through first
and second stage boot loaders) instead of just reloading and restarting the kernel.
No warning messages are printed.

On the Jetson I’m running Ubuntu 18.04 from the provided jetson-nano-sd-card-image-r3221.
In the kernel config both CONFIG_KEXEC and CONFIG_KEXEC_CORE are set to y:

The steps I performed were the following:

  1. Install kexec-tools with ``` sudo apt install kexec-tools ```
  2. Reboot
  3. ``` sudo kexec -l /boot/Image --reuse-cmdline --initrd=/boot/initrd --dtb=/boot/dtb/tegra210-p3448-0002-p3449-0000-b00.dtb ```
  4. ``` sudo systemctl kexec ``` or ``` sudo kexec -e ```

Performing equivalent steps on an x86 machine resulted in loading the kernel directly
without going through grub, as expected.

Regards,
Alexander Hedges

1 Like

hello alexander.hedges,

according to Jetson Nano Boot Flow, there’re bootloaders to load firmware and initializing.
may I know what’s your use-case to enable kexec on Nano?
thanks

Hi JerryChang

Current bootloader designs are not geared towards embedded systems. With those, only manual selection (with a keyboard) of the target or network boot via pxe are supported out of the box. Since we neither expect the users of the system to connect to the device via serial nor install a tftp server in his or her home network, doing the kernel selection with some custom code is necessary (based on some kind of network events). Our specific use case is os recovery into a known state, by allowing the system to be booted into a recovery kernel.

With Kexec, these kinds of things can be implemented in user space making things much more convenient to implement, plus you get a full networking stack and so on.

Regards,
Alexander

1 Like