Commit 5346f83 1 parent 8e44ecc commit 5346f83 Copy full SHA for 5346f83
File tree 2 files changed +54
-2
lines changed
pkgs/optee-ftpm_manufacturer
2 files changed +54
-2
lines changed Original file line number Diff line number Diff line change 76
76
inherit bspSrc gitRepos l4tVersion ;
77
77
} ) buildTOS buildOpteeTaDevKit opteeClient ;
78
78
79
- optee-gen-ekb = pkgs . callPackage ./pkgs/optee-gen-ekb { inherit opteeClient ; } ;
79
+ optee-gen-ekb = callPackage ./pkgs/optee-gen-ekb { inherit opteeClient ; } ;
80
+ optee-ftpm-manufacturer = callPackage ./pkgs/optee-ftpm_manufacturer { inherit opteeClient ; } ;
80
81
81
82
flash-tools = callPackage ./pkgs/flash-tools {
82
83
inherit bspSrc l4tVersion ;
@@ -176,7 +177,7 @@ rec {
176
177
inherit otaUtils ;
177
178
178
179
inherit opteeClient ;
179
- inherit optee-gen-ekb ;
180
+ inherit optee-gen-ekb optee-ftpm-manufacturer ;
180
181
181
182
# TODO: Source packages. source_sync.sh from bspSrc
182
183
# GST plugins
Original file line number Diff line number Diff line change
1
+ {
2
+ opteeClient ,
3
+ stdenvNoCC ,
4
+ python3 ,
5
+ fetchFromGitHub ,
6
+ openssl
7
+ } :
8
+ let
9
+ # Latest 1.5.1 release fails in x509.Name.build likely due
10
+ # to PR270 and/or PR271. https://github.com/wbond/asn1crypto/pull/270
11
+ asn1crypto' = python3 . pkgs . asn1crypto . overrideAttrs ( prev : {
12
+ version = "unstable-git-20231103" ;
13
+ src = fetchFromGitHub {
14
+ owner = "wbond" ;
15
+ repo = "asn1crypto" ;
16
+ rev = "b763a757bb2bef2ab63620611ddd8006d5e9e4a2" ;
17
+ hash = "sha256-11WajEDtisiJsKQjZMSd5sDog3DuuBzf1PcgSY+uuXY=" ;
18
+ } ;
19
+ } ) ;
20
+ in
21
+ stdenvNoCC . mkDerivation {
22
+ pname = "optee-ftpm-manufacturer" ;
23
+ version = opteeClient . version ;
24
+ src = opteeClient . src ;
25
+ pythonPath = with python3 . pkgs ; [
26
+ asn1crypto' # use newer, pinned version
27
+ cryptography
28
+ ecdsa
29
+ numpy
30
+ oscrypto
31
+ pyaes
32
+ pycryptodome
33
+ pycryptodomex
34
+ ] ;
35
+ nativeBuildInputs = [ python3 . pkgs . wrapPython ] ;
36
+ format = "none" ;
37
+ installPhase = ''
38
+ mkdir -p $out/bin $out/lib
39
+ cp optee/samples/ftpm-helper/host/tool/ftpm_manufacturer_gen_ek_csr.sh $out/bin/optee-ftpm-manufacturer
40
+ substituteInPlace $out/bin/optee-ftpm-manufacturer \
41
+ --replace './ftpm_manufacturer_gen_ek_csr_tool.py' "$out/lib/ftpm_manufacturer_gen_ek_csr_tool.py"
42
+ patchShebangs $out/bin/optee-ftpm-manufacturer
43
+ cp optee/samples/ftpm-helper/host/tool/ftpm_manufacturer_gen_ek_csr_tool.py $out/lib/ftpm_manufacturer_gen_ek_csr_tool.py
44
+ cp -r optee/samples/ftpm-helper/host/tool/lib $out/lib/lib
45
+ wrapPythonProgramsIn "$out/lib" "$pythonPath"
46
+ '' ;
47
+ postFixup = ''
48
+ wrapProgram $out/bin/optee-ftpm-manufacturer \
49
+ --prefix PATH : ${ openssl } /bin
50
+ '' ;
51
+ }
You can’t perform that action at this time.
0 commit comments