blob: 6991a24e044d5b119983f7821f178439b5f91b6a [file] [log] [blame]
From b6febdcfb05dd45beed30d10042d9b7420aec5df Mon Sep 17 00:00:00 2001
From: Edward Hyunkoo Jee <edjee@google.com>
Date: Tue, 27 Feb 2018 19:44:28 -0800
Subject: [PATCH 3/7] grub-lakitu: CHROMIUM: hook "linux" command
The grub.cfg template of Chrome OS uses "linux" command. In order to
use that as is, and also in order to prevent the bootloader from
loading unsigned linux kernels, we change "linux" command to
"linuxefi" command.
BUG=b:69569602
TEST=TBD
Change-Id: I57e952b96b2a45c554597920a6bf7da50cc98ad6
Reviewed-on: https://chromium-review.googlesource.com/945905
Reviewed-by: Edward Jee <edjee@google.com>
Commit-Queue: Edward Jee <edjee@google.com>
Tested-by: Edward Jee <edjee@google.com>
Trybot-Ready: Edward Jee <edjee@google.com>
---
include/grub/command.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/grub/command.h b/include/grub/command.h
index eee4e847e..9ba63af18 100644
--- a/include/grub/command.h
+++ b/include/grub/command.h
@@ -109,6 +109,8 @@ grub_register_command_p1 (const char *name,
static inline grub_command_t
grub_command_find (const char *name)
{
+ if (grub_strcmp ("linux", name) == 0)
+ name = "linuxefi";
return grub_named_list_find (GRUB_AS_NAMED_LIST (grub_command_list), name);
}
--
2.30.0.478.g8a0d178c01-goog