Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
value = c;
}) [
{ som = "orin-agx"; carrierBoard = "devkit"; }
{ som = "orin-agx"; carrierBoard = "devkit-as-nano-4gb"; }
{ som = "orin-agx"; carrierBoard = "devkit-as-nano-8gb"; }
{ som = "orin-agx"; carrierBoard = "devkit-as-nx-8gb"; }
{ som = "orin-agx"; carrierBoard = "devkit-as-nx-16gb"; }
{ som = "orin-agx-industrial"; carrierBoard = "devkit"; }
{ som = "orin-nx"; carrierBoard = "devkit"; }
{ som = "orin-nano"; carrierBoard = "devkit"; }
Expand Down
5 changes: 1 addition & 4 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ in
};

carrierBoard = mkOption {
type = types.enum [
"generic"
"devkit"
];
type = types.enum [ "generic" "devkit" "devkit-as-nx-8gb" "devkit-as-nx-16gb" "devkit-as-nano-8gb" "devkit-as-nano-4gb" ];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really proper to make this a characteristic of the carrierBoard, since it seems to be more a property of the SOM.

We've currently have support for "super" mode for the nx/nano. What if we deprecated the super option and introduce new option: somPower (exact name up to you) which is an enum that supports "default", "super", "nx-8gb", "nx-16gb", etc.

default = "generic";
description = ''
Jetson carrier board to target. Can be set to "generic" to target a generic jetson carrier board, but some things may not work.
Expand Down
11 changes: 10 additions & 1 deletion modules/devices.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ in

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