diff --git a/modules/default.nix b/modules/default.nix index 584654e9..9cd89c8a 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -57,6 +57,19 @@ in description = "Jetson SoM (System-on-Module) to target. Can be null to target a generic jetson device, but some things may not work."; }; + sku = mkOption { + default = null; + # "Extensible option types" in the NixOS manual + type = types.nullOr types.string; + example = "0001"; + description = "Specific SKU of a given SOM. This can be + helpful to fine-tune configuration of a given device. For + example, Orin NX devices come in 8GB and 16GB flavors which + differ in the number of supported cores. Configuring the SKU + for this SOM would ensure things like nvpmodel work + correctly."; + }; + carrierBoard = mkOption { default = null; type = types.nullOr (types.enum [ "devkit" ]); diff --git a/modules/devices.nix b/modules/devices.nix index 3e7dab97..cd72d17c 100644 --- a/modules/devices.nix +++ b/modules/devices.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, ... }: -# Configuration specific to particular SoM or carrier boardsl +# Configuration specific to particular SoM or carrier boards let inherit (lib) mkDefault @@ -11,7 +11,9 @@ let nvpModelConf = { orin-agx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3701_0000.conf"; - orin-nx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0000.conf"; + orin-nx = if (cfg.sku == "0001") + then "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0001.conf" + else "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0000.conf"; orin-nano = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0003.conf"; xavier-agx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_t194.conf"; xavier-nx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_t194_p3668.conf"; @@ -65,7 +67,7 @@ in lib.mkMerge [{ partitionTemplate = mkDefault "${pkgs.nvidia-jetpack.bspSrc}/bootloader/t186ref/cfg/flash_t234_qspi.xml"; }) - (mkIf (cfg.som == "orin-nx" || cfg.som == "orin-nano") { + (mkIf (cfg.som == "orin-nx" || cfg.som == "orin-nx-8G" || cfg.som == "orin-nano") { targetBoard = mkDefault "jetson-orin-nano-devkit"; # Use this instead if you want to use the original Xavier NX Devkit module (p3509-a02) #targetBoard = mkDefault "p3509-a02+p3767-0000";