Skip to content

Commit

Permalink
Add installation of signed EFI to grub.efi
Browse files Browse the repository at this point in the history
This commit adds functionality to also install the signed EFI to
grub.efi in addition to the existing installation process.

This enhancement ensures that the signed EFI is properly installed to
both grubx64.efi and grub.efi.
  • Loading branch information
UTsweetyfish authored and Zeno-sole committed Mar 29, 2024
1 parent c0981d3 commit 3d64513
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
grub2 (2.12-1deepin6) unstable; urgency=medium

* x64: Also install signed efi to grub.efi.

-- Tianyu Chen <[email protected]> Fri, 29 Mar 2024 11:56:19 +0800

grub2 (2.12-1deepin5) unstable; urgency=medium

* Disable verification of font files.
Expand Down
24 changes: 24 additions & 0 deletions debian/patches/deepin-Also-install-x86_64-efi-to-grub-efi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Description: Also install signed efi to grub.efi
Author: Tianyu Chen <[email protected]>
Origin: vendor
# Bug-Deepin: <URL to the vendor bug report if any, optional>
Forwarded: not-needed
Last-Update: 2024-03-29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -2181,6 +2181,13 @@
chained_dst = grub_util_path_concat (2, efidir, chained_base);
grub_install_copy_file (efi_signed, chained_dst, 1);

+ // Also install to grub.efi
+ if (strcmp (efi_suffix, "x64") == 0) {
+ char *chained_dst_grub_efi = grub_util_path_concat (2, efidir, "grub.efi");
+ grub_install_copy_file (efi_signed, chained_dst_grub_efi, 1);
+ free(chained_dst_grub_efi);
+ }
+
/* Not critical, so not an error if they are not present (as it
won't be for older releases); but if we have them, make
sure they are installed. */
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ uniontech0033-enable-grub-background-on-huawei-2
revert-fwsetup-is-supported.patch
# Revert "kern/efi/sb: Enforce verification of font files"
kern-efi-sb-Enforce-verification-of-font-files.patch
deepin-Also-install-x86_64-efi-to-grub-efi.patch

0 comments on commit 3d64513

Please sign in to comment.