Skip to content

Commit

Permalink
Merge remote-tracking branch 'public/master' into jp514
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfullmer committed Jan 4, 2025
2 parents cba3038 + 561059d commit 6bac358
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 deletions.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};

outputs = { self, nixpkgs, ... }:
Expand Down
7 changes: 4 additions & 3 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/";
};
}
12 changes: 12 additions & 0 deletions modules/flash-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion overlay-with-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions pkgs/l4t/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ stdenv
, stdenvNoCC
, buildPackages
, addOpenGLRunpath
, lib
, fetchurl
, fetchpatch
, fetchgit
, autoPatchelfHook
, dpkg
, expat
Expand Down
8 changes: 5 additions & 3 deletions pkgs/samples/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
, autoAddDriverRunpath
, cmake
, opencv
, opencv2
, libX11
, libdrm
, libglvnd
Expand Down Expand Up @@ -312,12 +311,15 @@ let
sourceRoot = "source/usr/src/jetson_multimedia_api";

nativeBuildInputs = [ dpkg python3 ];
buildInputs = [ libX11 libdrm libglvnd opencv2 vulkan-headers vulkan-loader ]
buildInputs = [ libX11 libdrm libglvnd opencv vulkan-headers vulkan-loader ]
++ ([ l4t-cuda l4t-multimedia l4t-camera ])
++ (with cudaPackages; [ cudatoolkit tensorrt ]);

# Usually provided by pkg-config, but the samples don't use it.
NIX_CFLAGS_COMPILE = [ "-I${lib.getDev libdrm}/include/libdrm" ];
NIX_CFLAGS_COMPILE = [
"-I${lib.getDev libdrm}/include/libdrm"
"-I${lib.getDev opencv}/include/opencv4"
];

# TODO: Unify this with headers in l4t-jetson-multimedia-api
patches = [
Expand Down

0 comments on commit 6bac358

Please sign in to comment.