From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH] Add --noefistub option for linux
Date: Thu, 16 May 2024 21:43:46 +0300 [thread overview]
Message-ID: <20240516184346.2592-1-phcoder@gmail.com> (raw)
In some cases like loading kernel from native disk (e.g. nvme) not
supported by EFI in question efi stub is not an option. Allow
user to disable efi stub and fallback to older protocol
---
grub-core/loader/efi/linux.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index bfbd95aee..0bf9d9cbb 100644
--- a/grub-core/loader/efi/linux.c
+++ b/grub-core/loader/efi/linux.c
@@ -459,10 +459,18 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
grub_file_t file = 0;
struct linux_arch_kernel_header lh;
grub_err_t err;
+ int force_legacy = 0;
grub_dl_ref (my_mod);
- if (grub_is_shim_lock_enabled () == true)
+ if (argc > 0 && grub_strcmp(argv[0], "--noefistub") == 0)
+ {
+ force_legacy = 1;
+ argv++;
+ argc--;
+ }
+
+ if (grub_is_shim_lock_enabled () == true || force_legacy)
{
#if defined(__i386__) || defined(__x86_64__)
grub_dprintf ("linux", "shim_lock enabled, falling back to legacy Linux kernel loader\n");
--
2.39.2
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2024-05-16 18:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 18:43 Vladimir Serbinenko [this message]
2024-06-14 17:08 ` [PATCH] Add --noefistub option for linux Daniel Kiper
-- strict thread matches above, loose matches on Subject: below --
2024-06-17 11:51 Vladimir Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240516184346.2592-1-phcoder@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.