diff options
| -rw-r--r-- | BUILDING | 5 | ||||
| -rw-r--r-- | shim.c | 13 |
2 files changed, 15 insertions, 3 deletions
@@ -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 @@ -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. */ |
