File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
modules/reference/hardware/jetpack/nvidia-jetson-orin Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 66 imports = [
77 ./partition-template.nix
88 ./jetson-orin.nix
9+ ./secureboot.nix
910
1011 ./pci-passthrough-common.nix
1112
Original file line number Diff line number Diff line change 4949 } ;
5050
5151 config = mkIf cfg . enable {
52+ ghaf . hardware . nvidia . orin . secureboot . enable = lib . mkDefault true ;
53+
5254 hardware . nvidia-jetpack . kernel . version = "${ cfg . kernelVersion } " ;
5355 nixpkgs . hostPlatform . system = "aarch64-linux" ;
5456
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2022-2026 TII (SSRC) and the Ghaf contributors
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ {
5+ config ,
6+ lib ,
7+ pkgs ,
8+ ...
9+ } :
10+ let
11+ cfg = config . ghaf . hardware . nvidia . orin . secureboot ;
12+
13+ eslFromCert =
14+ name : cert :
15+ pkgs . runCommand name { nativeBuildInputs = [ pkgs . buildPackages . efitools ] ; } ''
16+ ${ pkgs . buildPackages . efitools } /bin/cert-to-efi-sig-list ${ cert } $out
17+ '' ;
18+
19+ keysDir = cfg . keysSource ;
20+
21+ pkEsl = eslFromCert "PK.esl" "${ keysDir } /PK.crt" ;
22+ kekEsl = eslFromCert "KEK.esl" "${ keysDir } /KEK.crt" ;
23+ dbEsl = eslFromCert "db.esl" "${ keysDir } /db.crt" ;
24+ in
25+ {
26+ options . ghaf . hardware . nvidia . orin . secureboot = {
27+ enable = lib . mkEnableOption "UEFI Secure Boot key enrollment for Jetson Orin" ;
28+
29+ keysSource = lib . mkOption {
30+ type = lib . types . path ;
31+ default = ../../../../secureboot/keys ;
32+ description = "Directory containing PK.crt, KEK.crt and db.crt used to generate ESLs." ;
33+ } ;
34+ } ;
35+
36+ config = lib . mkIf cfg . enable {
37+ hardware . nvidia-jetpack . firmware . uefi . secureBoot = {
38+ enrollDefaultKeys = true ;
39+ defaultPkEslFile = pkEsl ;
40+ defaultKekEslFile = kekEsl ;
41+ defaultDbEslFile = dbEsl ;
42+ } ;
43+ } ;
44+ }
You can’t perform that action at this time.
0 commit comments