File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
modules/reference/hardware/jetpack/nvidia-jetson-orin Expand file tree Collapse file tree 3 files changed +44
-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+ config ,
5+ lib ,
6+ pkgs ,
7+ ...
8+ } :
9+ let
10+ cfg = config . ghaf . hardware . nvidia . orin . secureboot ;
11+
12+ eslFromCert = name : cert : pkgs . runCommand name { nativeBuildInputs = [ pkgs . buildPackages . efitools ] ; } ''
13+ ${ pkgs . buildPackages . efitools } /bin/cert-to-efi-sig-list ${ cert } $out
14+ '' ;
15+
16+ keysDir = cfg . keysSource ;
17+
18+ pkEsl = eslFromCert "PK.esl" "${ keysDir } /PK.crt" ;
19+ kekEsl = eslFromCert "KEK.esl" "${ keysDir } /KEK.crt" ;
20+ dbEsl = eslFromCert "db.esl" "${ keysDir } /db.crt" ;
21+ in
22+ {
23+ options . ghaf . hardware . nvidia . orin . secureboot = {
24+ enable = lib . mkEnableOption "UEFI Secure Boot key enrollment for Jetson Orin" ;
25+
26+ keysSource = lib . mkOption {
27+ type = lib . types . path ;
28+ default = ../../../../secureboot/keys ;
29+ description = "Directory containing PK.crt, KEK.crt and db.crt used to generate ESLs." ;
30+ } ;
31+ } ;
32+
33+ config = lib . mkIf cfg . enable {
34+ hardware . nvidia-jetpack . firmware . uefi . secureBoot = {
35+ enrollDefaultKeys = true ;
36+ defaultPkEslFile = pkEsl ;
37+ defaultKekEslFile = kekEsl ;
38+ defaultDbEslFile = dbEsl ;
39+ } ;
40+ } ;
41+ }
You can’t perform that action at this time.
0 commit comments