]> git.proxmox.com Git - pve-edk2-firmware.git/commitdiff
debian: sync edk2-vars-generator script with packaging upstream
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 08:38:09 +0000 (09:38 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 08:38:09 +0000 (09:38 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/edk2-vars-generator.py

index f9328c1710725c4176a58f2bb52fffe07aea5217..9af5ff13c3f92ffddcdeb3b360c24f66df2483f8 100755 (executable)
@@ -53,6 +53,11 @@ if __name__ == '__main__':
         help='UEFI code image',
         required=True,
     )
+    parser.add_argument(
+        "--no-default",
+        action="store_true",
+        help='Do not enroll the default keys, just the PK/KEK1 certificate',
+    )
     parser.add_argument(
         "-V", "--vars-template",
         help='UEFI vars template',
@@ -122,7 +127,13 @@ if __name__ == '__main__':
     child.expect(['Shell> '])
     child.sendline('FS0:\r')
     child.expect(['FS0:\\\\> '])
-    child.sendline('EnrollDefaultKeys.efi\r')
+    enrollcmd = ['EnrollDefaultKeys.efi']
+    if args.no_default:
+        enrollcmd.append("--no-default")
+    child.sendline(f'{" ".join(enrollcmd)}\r')
+    child.expect(['FS0:\\\\> '])
+    # Clear the BootOrder. See #1015759
+    child.sendline('setvar BootOrder =\r')
     child.expect(['FS0:\\\\> '])
     child.sendline('reset -s\r')
     child.wait()