summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILDING5
-rw-r--r--shim.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/BUILDING b/BUILDING
index 456c9b4a..ff1390fa 100644
--- a/BUILDING
+++ b/BUILDING
@@ -31,6 +31,11 @@ Variables you could set to customize the build:
generate keys during the build and sign MokManager and fallback with
them, and the signed version will be what gets installed with the
install targets
+- ENABLE_SHIM_DEVEL
+ If this is set, we look for SHIM_DEVEL_DEBUG instead of SHIM_DEBUG in
+ our debugger delay hook, thus meaning you can have it pause for a
+ debugger only on the development branch and not the OS you need to boot
+ to scp in a new development build.
- DISABLE_EBS_PROTECTION
On systems where a second stage bootloader is not used, and the Linux
Kernel is embedded in the same EFI image as shim and booted directly
diff --git a/shim.c b/shim.c
index 630550b5..b25c63b3 100644
--- a/shim.c
+++ b/shim.c
@@ -1787,10 +1787,17 @@ debug_hook(void)
register volatile UINTN x = 0;
extern char _text, _data;
+ const CHAR16 * const debug_var_name =
+#ifdef ENABLE_SHIM_DEVEL
+ L"SHIM_DEVEL_DEBUG";
+#else
+ L"SHIM_DEBUG";
+#endif
+
if (x)
return;
- efi_status = get_variable(L"SHIM_DEBUG", &data, &dataSize,
+ efi_status = get_variable(debug_var_name, &data, &dataSize,
SHIM_LOCK_GUID);
if (EFI_ERROR(efi_status)) {
return;
@@ -1803,8 +1810,8 @@ debug_hook(void)
&_text, &_data);
console_print(L"Pausing for debugger attachment.\n");
- console_print(L"To disable this, remove the EFI variable SHIM_DEBUG-%g .\n",
- &SHIM_LOCK_GUID);
+ console_print(L"To disable this, remove the EFI variable %s-%g .\n",
+ debug_var_name, &SHIM_LOCK_GUID);
x = 1;
while (x++) {
/* Make this so it can't /totally/ DoS us. */