From f3c691d1e5a74b053ff20a1bc8d459a390bae1cb Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Wed, 18 Dec 2024 22:40:39 +0400 Subject: [PATCH 1/2] Continue the cleanup of addOpenGLRunpath This is a follow on to the patch https://github.com/anduril/jetpack-nixos/commit/6d30a91458f2de2a2987cc0eacbad64aa86da439 which uses the new package name and also the new module option names so that it is aligned with mainline. Signed-off-by: Brian McGillion --- modules/default.nix | 7 ++++--- pkgs/l4t/default.nix | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 7568df8..e121578 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -221,8 +221,8 @@ in hardware.deviceTree.enable = true; - hardware.opengl.package = pkgs.nvidia-jetpack.l4t-3d-core; - hardware.opengl.extraPackages = + hardware.graphics.package = pkgs.nvidia-jetpack.l4t-3d-core; + hardware.graphics.extraPackages = with pkgs.nvidia-jetpack; # l4t-core provides - among others - libnvrm_gpu.so and libnvrm_mem.so. # The l4t-core/lib directory is directly set in the DT_RUNPATH of @@ -364,6 +364,7 @@ in }; # Used by libEGL_nvidia.so.0 - environment.etc."egl/egl_external_platform.d".source = "${pkgs.addOpenGLRunpath.driverLink}/share/egl/egl_external_platform.d/"; + environment.etc."egl/egl_external_platform.d".source = + "${pkgs.addDriverRunpath.driverLink}/share/egl/egl_external_platform.d/"; }; } diff --git a/pkgs/l4t/default.nix b/pkgs/l4t/default.nix index 02eabd2..a74986e 100644 --- a/pkgs/l4t/default.nix +++ b/pkgs/l4t/default.nix @@ -1,11 +1,9 @@ { stdenv , stdenvNoCC , buildPackages -, addOpenGLRunpath , lib , fetchurl , fetchpatch -, fetchgit , autoPatchelfHook , dpkg , expat From 4dc254268aea59921268206628b9d911b6703e9e Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Thu, 19 Dec 2024 19:39:11 +0400 Subject: [PATCH 2/2] Make it possible to pass the flash commands Signed-off-by: Brian McGillion --- modules/flash-script.nix | 12 ++++++++++++ overlay-with-config.nix | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/flash-script.nix b/modules/flash-script.nix index c8b2976..2181cc5 100644 --- a/modules/flash-script.nix +++ b/modules/flash-script.nix @@ -335,6 +335,18 @@ in default = [ ]; description = "A list of paths to compiled .dtbo files to include with the UEFI image while flashing. These overlays are applied by UEFI at runtime"; }; + + preFlashCommands = mkOption { + type = types.lines; + default = ""; + description = "Additional commands to be added to the flash script while it is being constructed."; + }; + + postFlashCommands = mkOption { + type = types.lines; + default = ""; + description = "Additional commands to be added to the flash script while it is being constructed."; + }; }; flashScript = mkOption { diff --git a/overlay-with-config.nix b/overlay-with-config.nix index c22968c..65f1e40 100644 --- a/overlay-with-config.nix +++ b/overlay-with-config.nix @@ -107,7 +107,7 @@ final: prev: ( mkFlashScript = flash-tools: args: import ./device-pkgs/flash-script.nix ({ inherit lib flash-tools; inherit (cfg.firmware) eksFile; - inherit (cfg.flashScriptOverrides) flashArgs partitionTemplate; + inherit (cfg.flashScriptOverrides) flashArgs partitionTemplate preFlashCommands postFlashCommands; inherit (finalJetpack) tosImage socType uefi-firmware; additionalDtbOverlays = args.additionalDtbOverlays or cfg.flashScriptOverrides.additionalDtbOverlays;