Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
766db87
initrdFlash: Instruct device to create a USB serial port and tee outp…
elliotberman Aug 7, 2025
d41fdef
Uprev tegra-eeprom-tool
elliotberman Sep 26, 2025
d854b3b
kernels: Add noble kernel derivations
elliotberman Sep 30, 2025
8ce48cc
debs-update changes for r38
elliotberman Oct 7, 2025
2d57e30
unpackedDebs: map over debs attributes
elliotberman Sep 26, 2025
9088128
jetpack7: Add initial overlay for JetPack 7.0
elliotberman Sep 30, 2025
e5abb64
uefi-firmware: Add r38 derivations
elliotberman Sep 30, 2025
78a153b
flash-script: uefi-firmware updates for r38
elliotberman Sep 30, 2025
a6c79c5
flash-tools: Updates for r38
elliotberman Sep 30, 2025
a61f135
l4t: debs update for r38
elliotberman Sep 30, 2025
c756acd
optee: r38 updates
elliotberman Sep 30, 2025
c0de621
flash-script: optee updates for r38
elliotberman Sep 30, 2025
4c7b536
board-automation: Updates for r38
elliotberman Sep 30, 2025
9fa9a35
cuda-packages: vpi-firmware updates for r38
elliotberman Oct 7, 2025
4759a97
jetson-udev-rules updates for r38
elliotberman Oct 7, 2025
13a5819
module: Initial thor support
elliotberman Sep 30, 2025
6475496
Move console args to common (internal) nixos option
elliotberman Oct 7, 2025
2397d9d
Add thor firmware
elliotberman Oct 7, 2025
8db90ac
initrdflash-script updates for Thor
elliotberman Oct 7, 2025
596231f
Make initrdFlashScript the default for JetPack 7
elliotberman Oct 7, 2025
c508b35
README: Update for JetPack 7
elliotberman Oct 7, 2025
7722bb7
Add jetpack 7 iso installers
elliotberman Oct 7, 2025
2a6484e
Allow NixOS systems to be built without CUDA configured
elliotberman Oct 11, 2025
536a166
l4t: r38: Add l4t-bootloader-utils
elliotberman Oct 14, 2025
3f7f915
Disable CUDA until 25.11
elliotberman Oct 21, 2025
dd1ce44
Fix arm-trusted-firmware cross-compile
Princemachiavelli Oct 24, 2025
80b57c0
Fix format
Princemachiavelli Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ This repository packages components from NVIDIA's [JetPack SDK](https://develope
- Graphics: Wayland, GBM, EGL, Vulkan
- Power/fan control: nvpmodel, nvfancontrol

This package supports JetPack 5 and 6. It works with NVIDIA's developer kits supported by these versions only:

| Device | JetPack 5 | JetPack 6 |
| ------------------ | --------- | --------- |
| Jetson Orin AGX | ✓ | ✓ |
| Jetson Orin NX | ✓ | ✓ |
| Jetson Orin Nano | ✓ | ✓ |
| Jetson Xavier AGX | ✓ | |
| Jetson Xavier NX | ✓ | |
This package supports JetPack 5, 6, and 7. It works with NVIDIA's developer kits supported by these versions only:

| Device | JetPack 5 | JetPack 6 | JetPack 7 |
| ------------------ | --------- | --------- | --------- |
| Jetson Thor AGX | | | ✓ |
| Jetson Orin AGX | ✓ | ✓ | |
| Jetson Orin NX | ✓ | ✓ | |
| Jetson Orin Nano | ✓ | ✓ | |
| Jetson Xavier AGX | ✓ | | |
| Jetson Xavier NX | ✓ | | |

The Jetson Nano, TX2, and TX1 devices are _not_ supported, since support for them was dropped upstream in JetPack 5.

Expand Down
6 changes: 5 additions & 1 deletion device-pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ let
l4tMajorMinorPatchVersion
;

jetpackAtLeast = lib.versionAtLeast cfg.majorVersion;
jetpackOlder = lib.versionOlder cfg.majorVersion;

# This produces a script where we have already called the ./flash.sh script
# with `--no-flash` and produced a file under bootloader/flashcmd.txt.
# This requires setting various BOARD* environment variables to the exact
Expand Down Expand Up @@ -84,6 +87,7 @@ let

flashArgs =
[ "--rcm-boot" ]
++ lib.optional (jetpackAtLeast "7") "-r"
# A little jank, but don't have the flash script itself actually flash, just produce the flashcmd.txt file
# We need to sign the boot.img file afterwards in this script
++ lib.optional (cfg.firmware.secureBoot.pkcFile != null) "--no-flash"
Expand Down Expand Up @@ -143,4 +147,4 @@ let
meta.platforms = [ "x86_64-linux" ];
};
in
{ inherit flashScript initrdFlashScript fuseScript rcmBoot; }
{ inherit initrdFlashScript fuseScript rcmBoot; flashScript = initrdFlashScript; } // lib.optionalAttrs (jetpackOlder "7") { inherit flashScript; }
12 changes: 10 additions & 2 deletions device-pkgs/flash-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
additionalDtbOverlays ? [ ]
, flash-tools
}:
let
uefi_image = if socType == "t264" then "uefi_t26x_general.bin" else "uefi_jetson.bin";
in
(''
set -euo pipefail

Expand Down Expand Up @@ -45,7 +48,7 @@
${lib.optionalString (partitionTemplate != null) "cp ${partitionTemplate} flash.xml"}
${lib.optionalString (dtbsDir != null) "cp -r ${dtbsDir}/. kernel/dtb/"}
${lib.optionalString (uefi-firmware != null) ''
cp ${uefi-firmware}/uefi_jetson.bin bootloader/uefi_jetson.bin
cp ${uefi-firmware}/uefi_jetson.bin bootloader/${uefi_image}
if [ -e "${uefi-firmware}/uefi_jetson_minimal.bin" ] ; then
cp ${uefi-firmware}/uefi_jetson_minimal.bin bootloader/uefi_jetson_minimal.bin
fi
Expand All @@ -55,10 +58,15 @@
cp ${uefi-firmware}/L4TLauncher.efi bootloader/BOOTAA64.efi

# Replace additional dtbos
cp ${uefi-firmware}/dtbs/*.dtbo kernel/dtb/
if [ -e ${uefi-firmware}/dtbs ]; then
cp ${uefi-firmware}/dtbs/*.dtbo kernel/dtb/
fi
''}
${lib.optionalString (tosImage != null) ''
cp ${tosImage}/tos.img bootloader/tos-optee_${socType}.img
if [ -e ${tosImage}/bl31.fip ]; then
cp ${tosImage}/bl31.fip bootloader/bl31_${socType}.fip
fi
''}
${lib.optionalString (eksFile != null) ''
cp ${eksFile} bootloader/eks_${socType}.img
Expand Down
11 changes: 8 additions & 3 deletions device-pkgs/initrdflash-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ let
forceXusbPeripheralDts =
let
overridePaths = {
"38" = {
thor = {
xudcPadctlPath = "bus@0/padctl@a808680000";
xudcPath = "bus@0/usb@a808670000";
};
};
"36" = {
orin = {
xudcPadctlPath = "bus@0/padctl@3520000";
Expand Down Expand Up @@ -87,10 +93,9 @@ let
rcmScript = mkRcmBootScript {
kernelPath = "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}";
initrdPath = "${flashInitrd}/initrd";
kernelCmdline = lib.concatStringsSep " " [
"console=ttyTCU0,115200"
kernelCmdline = lib.concatStringsSep " " ([
"sdhci_tegra.en_boot_part_access=1"
];
] ++ cfg.console.args);
# During the initrd flash script, we upload two edk2 builds to the
# board, one that is only used temporarily to boot into our
# kernel/initrd to perform the flashing, and another one that is
Expand Down
14 changes: 13 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
jetpack5_config = {
hardware.nvidia-jetpack.majorVersion = "5";
};
jetpack7_config = {
hardware.nvidia-jetpack.majorVersion = "7";
};
in
{
nixosConfigurations = {
Expand All @@ -53,6 +56,12 @@
installer_minimal_cross_jp5 = nixpkgs.lib.nixosSystem {
modules = [ aarch64_cross_config installer_minimal_config jetpack5_config ];
};
installer_minimal_jp7 = nixpkgs.lib.nixosSystem {
modules = [ aarch64_config installer_minimal_config jetpack7_config ];
};
installer_minimal_cross_jp7 = nixpkgs.lib.nixosSystem {
modules = [ aarch64_cross_config installer_minimal_config jetpack7_config ];
};
};

nixosModules.default = import ./modules/default.nix;
Expand All @@ -79,6 +88,7 @@
{ som = "orin-nano"; carrierBoard = "devkit"; majorVersion = "5"; }
{ som = "orin-nx"; carrierBoard = "devkit"; super = true; majorVersion = "5"; }
{ som = "orin-nano"; carrierBoard = "devkit"; super = true; majorVersion = "5"; }
{ som = "thor-agx"; carrierBoard = "devkit"; }
{ som = "xavier-agx"; carrierBoard = "devkit"; }
{ som = "xavier-agx-industrial"; carrierBoard = "devkit"; } # TODO: Entirely untested
{ som = "xavier-nx"; carrierBoard = "devkit"; }
Expand All @@ -105,6 +115,7 @@
{
iso_minimal = self.nixosConfigurations.installer_minimal_cross.config.system.build.isoImage;
iso_minimal_jp5 = self.nixosConfigurations.installer_minimal_cross_jp5.config.system.build.isoImage;
iso_minimal_jp7 = self.nixosConfigurations.installer_minimal_cross_jp7.config.system.build.isoImage;

inherit (self.legacyPackages.x86_64-linux)
board-automation python-jetson;
Expand All @@ -119,6 +130,7 @@
aarch64-linux = {
iso_minimal = self.nixosConfigurations.installer_minimal.config.system.build.isoImage;
iso_minimal_jp5 = self.nixosConfigurations.installer_minimal_jp5.config.system.build.isoImage;
iso_minimal_jp7 = self.nixosConfigurations.installer_minimal_jp7.config.system.build.isoImage;
};
};

Expand Down Expand Up @@ -147,7 +159,7 @@
overlays = [ self.overlays.default ];
});
in
pkgs.nvidia-jetpack // { inherit (pkgs) nvidia-jetpack5 nvidia-jetpack6; }
pkgs.nvidia-jetpack // { inherit (pkgs) nvidia-jetpack5 nvidia-jetpack6 nvidia-jetpack7; }
);
};
}
44 changes: 23 additions & 21 deletions mk-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, cudaMajorMinorPatchVersion
, cudaDriverMajorMinorVersion
, bspHash
, bspPatches ? [ ]
}:
final: _:
let
Expand All @@ -15,7 +16,7 @@ let
callPackageWith
callPackagesWith
composeManyExtensions
concatStringsSep
concatMapAttrsStringSep
extends
filter
makeScope
Expand Down Expand Up @@ -48,35 +49,36 @@ makeScope final.newScope (self: {

callPackages = callPackagesWith (final // self);

bspSrc = final.runCommand "l4t-unpacked"
{
# https://developer.nvidia.com/embedded/jetson-linux-archive
# https://repo.download.nvidia.com/jetson/
src = final.fetchurl {
url = "https://developer.download.nvidia.com/embedded/L4T/r${versions.major l4tMajorMinorPatchVersion}_Release_v${versions.minor l4tMajorMinorPatchVersion}.${versions.patch l4tMajorMinorPatchVersion}/release/Jetson_Linux_R${l4tMajorMinorPatchVersion}_aarch64.tbz2";
hash = bspHash;
};
# We use a more recent version of bzip2 here because we hit this bug
# extracting nvidia's archives:
# https://bugs.launchpad.net/ubuntu/+source/bzip2/+bug/1834494
nativeBuildInputs = [ final.buildPackages.bzip2_1_1 ];
} ''
bzip2 -d -c $src | tar xf -
mv Linux_for_Tegra $out
'';
bspSrc = final.applyPatches {
src = final.runCommand "l4t-unpacked"
{
# https://developer.nvidia.com/embedded/jetson-linux-archive
# https://repo.download.nvidia.com/jetson/
src = final.fetchurl {
url = "https://developer.download.nvidia.com/embedded/L4T/r${versions.major l4tMajorMinorPatchVersion}_Release_v${versions.minor l4tMajorMinorPatchVersion}.${versions.patch l4tMajorMinorPatchVersion}/release/Jetson_Linux_R${l4tMajorMinorPatchVersion}_aarch64.tbz2";
hash = bspHash;
};
# We use a more recent version of bzip2 here because we hit this bug
# extracting nvidia's archives:
# https://bugs.launchpad.net/ubuntu/+source/bzip2/+bug/1834494
nativeBuildInputs = [ final.buildPackages.bzip2_1_1 ];
} ''
bzip2 -d -c $src | tar xf -
mv Linux_for_Tegra $out
'';
patches = bspPatches;
};

# Here for convenience, to see what is in upstream Jetpack
unpackedDebs = final.runCommand "unpackedDebs-${l4tMajorMinorPatchVersion}" { nativeBuildInputs = [ final.buildPackages.dpkg ]; } ''
mkdir -p $out
${concatStringsSep "\n" (mapAttrsToList (n: p: "echo Unpacking ${n}; dpkg -x ${p.src} $out/${n}") self.debs.common)}
${concatStringsSep "\n" (mapAttrsToList (n: p: "echo Unpacking ${n}; dpkg -x ${p.src} $out/${n}") self.debs.t234)}
${concatMapAttrsStringSep "\n" (repo: debs: (concatMapAttrsStringSep "\n" (n: p: "echo Unpacking ${n}; dpkg -x ${p.src} $out/${n}") debs)) self.debs}
'';

# Also just for convenience,
unpackedDebsFilenames = final.runCommand "unpackedDebsFilenames-${l4tMajorMinorPatchVersion}" { nativeBuildInputs = [ final.buildPackages.dpkg ]; } ''
mkdir -p $out
${concatStringsSep "\n" (mapAttrsToList (n: p: "echo Extracting file list from ${n}; dpkg --fsys-tarfile ${p.src} | tar --list > $out/${n}") self.debs.common)}
${concatStringsSep "\n" (mapAttrsToList (n: p: "echo Extracting file list from ${n}; dpkg --fsys-tarfile ${p.src} | tar --list > $out/${n}") self.debs.t234)}
${concatMapAttrsStringSep "\n" (repo: debs: (concatMapAttrsStringSep "\n" (n: p: "echo Extracting file list from ${n}; dpkg --fsys-tarfile ${p.src} | tar --list > $out/${n}") debs)) self.debs}
'';

unpackedGitRepos = final.runCommand "unpackedGitRepos-${l4tMajorMinorPatchVersion}" { } (
Expand Down
Loading