Skip to content

Commit 5bc3486

Browse files
committed
feat: add support for flashing emulation configs on AGX devkits
1 parent 57beefb commit 5bc3486

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
value = c;
4444
}) [
4545
{ som = "orin-agx"; carrierBoard = "devkit"; }
46+
{ som = "orin-agx"; carrierBoard = "devkit-as-nano-4gb"; }
47+
{ som = "orin-agx"; carrierBoard = "devkit-as-nano-8gb"; }
48+
{ som = "orin-agx"; carrierBoard = "devkit-as-nx-8gb"; }
49+
{ som = "orin-agx"; carrierBoard = "devkit-as-nx-16gb"; }
4650
{ som = "orin-agx-industrial"; carrierBoard = "devkit"; }
4751
{ som = "orin-nx"; carrierBoard = "devkit"; }
4852
{ som = "orin-nano"; carrierBoard = "devkit"; }

modules/default.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ in
8080
};
8181

8282
carrierBoard = mkOption {
83-
type = types.enum [
84-
"generic"
85-
"devkit"
86-
];
83+
type = types.enum [ "generic" "devkit" "devkit-as-nx-8gb" "devkit-as-nx-16gb" "devkit-as-nano-8gb" "devkit-as-nano-4gb" ];
8784
default = "generic";
8885
description = ''
8986
Jetson carrier board to target. Can be set to "generic" to target a generic jetson carrier board, but some things may not work.

modules/devices.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ in
6161

6262
hardware.nvidia-jetpack.flashScriptOverrides =
6363
let
64+
# The AGX supports Emulating weaker Jetson SoMs on the devkit:
65+
# https://developer.ridgerun.com/wiki/index.php/NVIDIA_Jetson_Orin/Flashing_commands_for_emulation#Flashing_the_board
66+
agxDevkitTargetBoards = {
67+
"devkit" = "jetson-agx-orin-devkit";
68+
"devkit-as-nx-8gb" = "jetson-agx-orin-devkit-as-nx-8gb";
69+
"devkit-as-nx-16gb" = "jetson-agx-orin-devkit-as-nx-16gb";
70+
"devkit-as-nano-8gb" = "jetson-agx-orin-devkit-as-nano8gb";
71+
"devkit-as-nano-4gb" = "jetson-agx-orin-devkit-as-nano4gb";
72+
};
6473
# Remove unnecessary partitions to make it more like
6574
# flash_t194_uefi_sdmmc_min.xml, except also keep the A/B slots on each
6675
# partition
@@ -96,7 +105,7 @@ in
96105
in
97106
mkMerge [
98107
(mkIf (cfg.som == "orin-agx") {
99-
targetBoard = mkDefault "jetson-agx-orin-devkit";
108+
targetBoard = mkDefault (agxDevkitTargetBoards."${cfg.carrierBoard}");
100109
# We don't flash the sdmmc with kernel/initrd/etc at all. Just let it be a
101110
# regular NixOS machine instead of having some weird partition structure.
102111
partitionTemplate = mkDefault "${pkgs.nvidia-jetpack.bspSrc}/bootloader/t186ref/cfg/flash_t234_qspi.xml";

0 commit comments

Comments
 (0)