Real-time kernel for NVIDIA AGX Xavier

  • Cross-compilation will happen inside docker on your laptop.
  • Kernel update do not require full re-flashing, so Jetson filesystem will be preserved (kittens are safe). Done with Nvidia OTA update service.

Short version

To build RT kernel for Xavier execute following commands on your x86_64 laptop

git clone https://github.com/r7vme/xavier-base-docker-images
cd xavier-base-docker-images/realtime-kernel
docker build -t xavier-rt-kernel:32.2.1 -f Dockerfile.l4t_32_2_1 .

Description

Make sure you have successfully flashed your Xavier with Jetpack 4.2.1 (later one should also work) and already have ssh access to the board. No need for any USB cables, only one reboot will be required, because NVIDIA OTA (over-the-air-update) service will be used.

Compile kernel

Make sure you have at least 20GB of free space and docker installed.

git clone https://github.com/r7vme/xavier-base-docker-images
cd xavier-base-docker-images/realtime-kernel
docker build -t xavier-rt-kernel:32.2.1 -f Dockerfile.l4t_32_2_1 .
docker run --rm -v $(pwd):/host xavier-rt-kernel:32.2.1 \
cp /Linux_for_Tegra/kernel/kernel_supplements.tbz2 /Linux_for_Tegra/bootloader/payloads_t19x/bl_update_payload /Linux_for_Tegra/bootloader/payloads_t19x/bl_update_payload_default /host

Update Xavier

WARN: Make sure to have backups in case something will go wrong! Did not go for me, but anyway.

scp kernel_supplements.tbz2 <host>:/tmp
scp bl_update_payload bl_update_payload_default <host>:/tmp
sudo -i
tar -C / -xf /tmp/kernel_supplements.tbz2
cp /tmp/bl_update_payload* /opt
mkdir /opt/ota_package
nv_update_engine --enable-ab
cp /opt/bl_update_payload /opt/ota_package/
nv_update_engine --install
uname -r
4.9.140-rt93+
sudo cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0

To switch back to default kernel

cp /opt/bl_update_payload_default /opt/ota_package/bl_update_payload
nv_update_engine --install

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store