Skip to content

Commit f6f993c

Browse files
jmbaurdanielfullmer
authored andcommitted
optee: add gen_ekb.py script
The gen_ekb.py script from the nv-optee source is a useful utility for generating EKB images.
1 parent 7d5ff42 commit f6f993c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

overlay.nix

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ in
6868
stdenv = prev.gcc9Stdenv;
6969
inherit (self) bspSrc gitRepos l4tVersion;
7070
}) buildTOS buildOpteeTaDevKit opteeClient;
71+
genEkb = self.callPackage ./pkgs/optee/gen-ekb.nix { };
7172

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

pkgs/optee/gen-ekb.nix

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{ gitRepos, l4tVersion, stdenv, python3 }:
2+
3+
stdenv.mkDerivation {
4+
pname = "gen_ekb.py";
5+
src = gitRepos."tegra/optee-src/nv-optee";
6+
version = l4tVersion;
7+
dontBuild = true;
8+
buildInputs = [
9+
(python3.withPackages (p: with p; [
10+
cryptography
11+
pycryptodome
12+
]))
13+
];
14+
installPhase = ''
15+
runHook preInstall
16+
install -D optee/samples/hwkey-agent/host/tool/gen_ekb/gen_ekb.py \
17+
$out/bin/gen_ekb.py
18+
patchShebangs --host $out/bin/gen_ekb.py
19+
runHook postInstall
20+
'';
21+
}

0 commit comments

Comments
 (0)