Skip to content

Commit daa7221

Browse files
committed
fix nvpmodel for orin-nx-8gb
source: anduril#168
1 parent 4eb932f commit daa7221

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

modules/default.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ in
7979
'';
8080
};
8181

82+
sku = mkOption {
83+
default = null;
84+
# "Extensible option types" in the NixOS manual
85+
type = types.nullOr types.string;
86+
example = "0001";
87+
description = "Specific SKU of a given SOM. This can be
88+
helpful to fine-tune configuration of a given device. For
89+
example, Orin NX devices come in 8GB and 16GB flavors which
90+
differ in the number of supported cores. Configuring the SKU
91+
for this SOM would ensure things like nvpmodel work
92+
correctly.";
93+
};
94+
8295
carrierBoard = mkOption {
8396
type = types.enum [
8497
"generic"

modules/devices.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ let
1212
nvpModelConf = {
1313
orin-agx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3701_0000.conf";
1414
orin-agx-industrial = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3701_0008.conf";
15-
orin-nx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0000.conf";
15+
orin-nx = if (cfg.sku == "0001")
16+
then "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0001.conf"
17+
else "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0000.conf";
1618
orin-nano = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_p3767_0003.conf";
1719
xavier-agx = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_t194.conf";
1820
xavier-agx-industrial = "${pkgs.nvidia-jetpack.l4t-nvpmodel}/etc/nvpmodel/nvpmodel_t194_agxi.conf";
@@ -109,7 +111,7 @@ lib.mkMerge [{
109111
'');
110112
})
111113

112-
(mkIf (cfg.som == "orin-nx" || cfg.som == "orin-nano") {
114+
(mkIf (cfg.som == "orin-nx" || cfg.som == "orin-nx-8G" || cfg.som == "orin-nano") {
113115
targetBoard = mkDefault "jetson-orin-nano-devkit";
114116
# Use this instead if you want to use the original Xavier NX Devkit module (p3509-a02)
115117
#targetBoard = mkDefault "p3509-a02+p3767-0000";

0 commit comments

Comments
 (0)