Skip to content

Commit da8dcba

Browse files
committed
jetson-orin: fix secureboot cert inputs for remote builds
Signed-off-by: vadik likholetov <vadikas@gmail.com>
1 parent 532f9db commit da8dcba

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

modules/reference/hardware/jetpack/nvidia-jetson-orin/secureboot.nix

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,24 @@ let
1212

1313
eslFromCert =
1414
name: cert:
15-
pkgs.runCommand name { nativeBuildInputs = [ pkgs.buildPackages.efitools ]; } ''
16-
certPath=${lib.escapeShellArg (toString cert)}
15+
pkgs.runCommand name
16+
{
17+
nativeBuildInputs = [ pkgs.buildPackages.efitools ];
18+
certPath = cert;
19+
}
20+
''
21+
if [ ! -s "$certPath" ]; then
22+
echo "Missing or empty UEFI secure boot certificate: $certPath" >&2
23+
exit 1
24+
fi
1725
18-
if [ ! -s "$certPath" ]; then
19-
echo "Missing or empty UEFI secure boot certificate: $certPath" >&2
20-
exit 1
21-
fi
26+
${pkgs.buildPackages.efitools}/bin/cert-to-efi-sig-list "$certPath" "$out"
2227
23-
${pkgs.buildPackages.efitools}/bin/cert-to-efi-sig-list "$certPath" "$out"
24-
25-
if [ "$(wc -c < "$out")" -le 44 ]; then
26-
echo "Generated ESL ${name} from $certPath is empty" >&2
27-
exit 1
28-
fi
29-
'';
28+
if [ "$(wc -c < "$out")" -le 44 ]; then
29+
echo "Generated ESL ${name} from $certPath is empty" >&2
30+
exit 1
31+
fi
32+
'';
3033

3134
keysDir = cfg.keysSource;
3235

0 commit comments

Comments
 (0)