diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-07-10 15:30:58 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-07-10 15:30:58 +0200 |
commit | 9d4575855bf1ae2136d85a2d0aa7b5ede50cfc67 (patch) | |
tree | df4e01223fca6dae105eb845bddebfa84aca53b9 /modules | |
parent | f839b7b0aa5917d07dbf181402df2bafb552dbb8 (diff) |
hardware/t100ha: Fix bootloader keyboard input
This one is tracked upstream at systemd/systemd#3632. I've implemented the workaround proposed by @medhefgo as a patch. As this module is only for a particular hardware, we won't cause troubles for other hardware. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/hardware/t100ha/default.nix | 10 | ||||
-rw-r--r-- | modules/hardware/t100ha/fix-bootloader.patch | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/modules/hardware/t100ha/default.nix b/modules/hardware/t100ha/default.nix index 21758718..87f3d8b7 100644 --- a/modules/hardware/t100ha/default.nix +++ b/modules/hardware/t100ha/default.nix @@ -61,6 +61,16 @@ in { self = pkgs.linuxPackagesFor t100haKernel self; in self; + # Fix boot loader, otherwise it's hard (not impossible though if you press + # the key combinations fast enough) to choose anything else than the default + # entry. + # + # Upstream issue with workaround: + # https://github.com/systemd/systemd/issues/3632 + systemd.package = lib.overrideDerivation pkgs.systemd (drv: { + patches = (drv.patches or []) ++ [ ./fix-bootloader.patch ]; + }); + # By default the console is rotated by 90 degrees to the right. boot.kernelParams = [ "fbcon=rotate:3" ]; services.xserver.deviceSection = '' diff --git a/modules/hardware/t100ha/fix-bootloader.patch b/modules/hardware/t100ha/fix-bootloader.patch new file mode 100644 index 00000000..390bef44 --- /dev/null +++ b/modules/hardware/t100ha/fix-bootloader.patch @@ -0,0 +1,20 @@ +diff --git a/src/boot/efi/console.c b/src/boot/efi/console.c +index c436f8b..586905e 100644 +--- a/src/boot/efi/console.c ++++ b/src/boot/efi/console.c +@@ -92,13 +92,8 @@ EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait) { + checked = TRUE; + } + +- /* wait until key is pressed */ +- if (wait) { +- if (TextInputEx) +- uefi_call_wrapper(BS->WaitForEvent, 3, 1, &TextInputEx->WaitForKeyEx, &index); +- else +- uefi_call_wrapper(BS->WaitForEvent, 3, 1, &ST->ConIn->WaitForKey, &index); +- } ++ if (wait) ++ uefi_call_wrapper(BS->WaitForEvent, 3, 1, &ST->ConIn->WaitForKey, &index); + + if (TextInputEx) { + EFI_KEY_DATA keydata; |