NVIDIA Jetson UEFI/ACPI Experimental Firmware Version 1.1.0
These instructions explain how to install and boot Linux on NVIDIA Jetson platforms using UEFI firmware.
This software is intended for use with the mainline Linux kernel. It is not currently compatible with the L4T kernel.
This software is experimental. It may be incompatible with standard JetPack functionality including online software update functionality for boot firmware. This software is provided for experimental purposes, and can be reverted by following standard flashing instructions for JetPack software provided with the Jetson Developer Kit.
Download the following software from the Jetson Download Center
L4T Jetson Driver Package, version 32.4.4
L4T Sample Root File System, version 32.4.4
Extract the driver package tarball.
$ tar xjf Tegra186_Linux_R32.4.4_aarch64.tbz2
Extract the nvidia-l4t-jetson-uefi-R32.4.4-20210316074928.tbz2 package provided over the top of the extracted driver package and navigate to the Linux_for_Tegra subdirectory.
$ tar xpf nvidia-l4t-jetson-uefi-R32.4.4-20210316074928.tbz2
$ cd Linux_for_Tegra
Note that if you are not planning to use the L4T root filesystem you may skip
this step. Extract the root filesystem to the rootfs subdirectory and run the
apply_binaries.sh script. Please ensure that you have installed the
qemu-user-static
package before running the apply_binaries.sh
script.
$ cd rootfs/
$ sudo tar xjf /path/to/Tegra_Linux_Sample-Root-Filesystem_R32.4.4_aarch64.tbz2
$ cd ..
$ sudo ./apply_binaries.sh
For the Jetson AGX Xavier platform, the Linux serial console is accessible via the micro-USB connector J501. When you connect a USB cable to the micro-USB connector, you should see four serial USB devices, and the Linux serial console is available on the 3rd of the four.
For the Jetson Xavier NX platform, the Linux serial console is accessible via pins 8 (UART TX) and 10 (UART RX) on the 40-pin expansion header J12.
When you boot Linux, add the following to the Linux kernel command line to direct the kernel output to the serial console.
console=ttyS0,115200n8
You can enable Linux early console support by adding the 'earlycon' parameter to the Linux kernel command line. For Jetson AGX Xavier add:
earlycon=uart8250,mmio32,0x3110000
For Jetson Xavier NX add:
earlycon=uart8250,mmio32,0x3100000
For booting Linux with ACPI, the Tegra 8250 driver (located in the Linux kernel source file drivers/tty/serial/8250/8250_tegra.c) is required for the serial console.
If you are planning to boot a UEFI-bootable Linux distribution from external media, such as a USB drive, place the Jetson Developer Kit in Recovery Mode and execute the following command with the appropriate configuration to flash the UEFI firmware. Otherwise, please refer to the section “Booting L4T with mainline Linux."
$ sudo ./flash.sh <config> external
Where <config>
is:
jetson-xavier-uefi-min
for Jetson AGX Xavier with Device-Treejetson-xavier-uefi-acpi-min
for Jetson AGX Xavier with ACPIjetson-xavier-nx-uefi
for Jetson Xavier NX with Device-Treejetson-xavier-nx-uefi-acpi
for Jetson Xavier NX with ACPIThe OS hardware description can be changed without flashing the device as well, see “Booting Linux with Device-Tree/ACPI”.
Booting L4T with mainline Linux using the UEFI bootloader is currently only supported for Jetson AGX Xavier.
Clone the Linux kernel tree:
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ git checkout v5.9
Configure the Linux kernel:
$ export ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu
$ export KBUILD_OUTPUT=/path/to/kernel/build
$ make defconfig
Adjust the configuration:
$ scripts/config --file $KBUILD_OUTPUT/.config --enable STMMAC_ETH
$ scripts/config --file $KBUILD_OUTPUT/.config --enable STMMAC_PLATFORM
$ scripts/config --file $KBUILD_OUTPUT/.config --enable DWMAC_DWC_QOS_ETH
$ scripts/config --file $KBUILD_OUTPUT/.config --enable MARVELL_PHY
$ scripts/config --file $KBUILD_OUTPUT/.config --set-val CMA_SIZE_MBYTES 256
Build the kernel:
$ make
Install the modules:
$ sudo make INSTALL_MOD_PATH=/path/to/l4t-rootfs/ modules_install
Update the L4T serial console for booting with the EDK2 firmware:
$ cd Linux_for_Tegra
$ sudo sed -i 's/^CHIP=.*/CHIP="tegra194"/' "rootfs/etc/systemd/nv-oem-config.sh"
$ sudo sed -i 's/ttyTCU0/ttyS0/' "rootfs/etc/systemd/nv-oem-config.sh"
To boot Linux with Device-Tree, put the device into Recovery Mode and run the following command to flash.
$ sudo ./flash.sh -K $KBUILD_OUTPUT/arch/arm64/boot/Image \
-d $KBUILD_OUTPUT/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dtb \
jetson-xavier-uefi internal
To boot Linux with ACPI, put the device into Recovery Mode and run the following command to flash.
$ sudo ./flash.sh -K $KBUILD_OUTPUT/arch/arm64/boot/Image \
-d $KBUILD_OUTPUT/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dtb \
jetson-xavier-uefi-acpi internal
To change between device tree and ACPI at boot the following steps can be used:
PCIe support is disabled by default because when you boot Linux with ACPI, out-of-tree patches are required for the Linux PCIe driver. If these patches are not present, Linux may be unable to boot.
Please note that for the Jetson AGX Xavier Developer Kit, the SATA interface is a PCIe device and so to use this interface, it is also necessary to enable PCIe support.
PCIe support can be enabled with the following steps:
The out-of-tree patches are required for PCIe when booting Linux with ACPI can be found below. Please note that these may require updating for the latest Linux kernel.
https://patchwork.kernel.org/project/linux-pci/list/?series=226733&state=*