Skip to content

Commit

Permalink
fix: use P3767-0001 nvpmodel conf for Orin NX 8GB
Browse files Browse the repository at this point in the history
note: nvpmodel.service is failing on 8GB variants of this board since it
has 2 less cores than the 16GB variant (supported already) and since the
nvpmodel configuration file was being recycled for all Orin NX variants.
So, `nvpmodel.service` would try to change settings for 8 CPUs when only
6 exist. cf.
  https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/index.html
for the mapping between Orin NX variant and Nvidia "P-number".
  • Loading branch information
johnrichardrinehart committed Dec 7, 2023
1 parent 3ce210c commit 0a33c97
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]);
Expand Down
8 changes: 5 additions & 3 deletions modules/devices.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 0a33c97

Please sign in to comment.