NVIDIA Jetson UEFI/ACPI Experimental Firmware Version 1.1.2
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.6.1
L4T Sample Root File System, version 32.6.1
Extract the driver package tarball.
$ tar xjf Jetson_Linux_R32.6.1_aarch64.tbz2
Extract the nvidia-l4t-jetson-uefi-R32.6.1-20211119125725.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.6.1-20211119125725.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.6.1_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”.
Clone the Linux kernel tree:
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ git checkout v5.12
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/nv-oem-config-uart-port=ttyGS0/nv-oem-config-uart-port=ttyS0/' \
"rootfs/etc/nv-oem-config.conf"
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/<dtb> <config> internal
Where <config>
is:
jetson-xavier-uefi
for Jetson AGX Xavierjetson-xavier-nx-uefi-emmc
for Jetson Xavier NX (eMMC)jetson-xavier-nx-uefi-sd
for Jetson Xavier NX (SD-card)Where <dtb>
is:
tegra194-p2972-0000.dtb
for Jetson AGX Xaviertegra194-p3509-0000+p3668-0001.dtb
for Jetson Xavier NX (eMMC)tegra194-p3509-0000+p3668-0000.dtb
for Jetson Xavier NX (SD-card)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 <config> internal
Where <config>
is:
jetson-xavier-uefi-acpi
for Jetson AGX Xavierjetson-xavier-nx-uefi-acpi-emmc
for Jetson Xavier NX (eMMC)jetson-xavier-nx-uefi-acpi-sd
for Jetson Xavier NX (SD-card)To change between device tree and ACPI at boot the following steps can be used:
PCIe support is disabled by default because prior to Linux v5.13, the PCIe driver does not include the necessary changes to enable ACPI support. If these change are not present, then Linux may be unable to boot. The patches required for enabling PCIe with ACPI when booting pre-v5.13 Linux kernels, are found below.
https://lore.kernel.org/linux-acpi/20210416134537.19474-1-vidyas@nvidia.com/ https://lore.kernel.org/linux-pci/20210610064134.336781-1-jonathanh@nvidia.com/
PCIe support for ACPI can be enabled with the following steps: