Skip to content

Commit

Permalink
optee: add gen_ekb.py script
Browse files Browse the repository at this point in the history
The gen_ekb.py script from the nv-optee source is a useful utility for
generating EKB images.
  • Loading branch information
jmbaur authored and danielfullmer committed Nov 18, 2024
1 parent 7d5ff42 commit f6f993c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ in
stdenv = prev.gcc9Stdenv;
inherit (self) bspSrc gitRepos l4tVersion;
}) buildTOS buildOpteeTaDevKit opteeClient;
genEkb = self.callPackage ./pkgs/optee/gen-ekb.nix { };

flash-tools = self.callPackage ./pkgs/flash-tools { };

Expand Down
21 changes: 21 additions & 0 deletions pkgs/optee/gen-ekb.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ gitRepos, l4tVersion, stdenv, python3 }:

stdenv.mkDerivation {
pname = "gen_ekb.py";
src = gitRepos."tegra/optee-src/nv-optee";
version = l4tVersion;
dontBuild = true;
buildInputs = [
(python3.withPackages (p: with p; [
cryptography
pycryptodome
]))
];
installPhase = ''
runHook preInstall
install -D optee/samples/hwkey-agent/host/tool/gen_ekb/gen_ekb.py \
$out/bin/gen_ekb.py
patchShebangs --host $out/bin/gen_ekb.py
runHook postInstall
'';
}

0 comments on commit f6f993c

Please sign in to comment.