All of lore.kernel.org
 help / color / mirror / Atom feed
* Menu time-out missing when GRUB is loaded quickly and `at_keyboard`
@ 2019-01-14 13:08 Paul Menzel
  2019-02-05 16:29 ` [PATCH] normal/menu: Do not treat error values as key presses Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2019-01-14 13:08 UTC (permalink / raw)
  To: grub-devel; +Cc: coreboot

[-- Attachment #1: Type: text/plain, Size: 2946 bytes --]

Dear GRUB folks,


When the module `at_keyboard` is directly into the GRUB image 
(`--modules`), and GRUB is loaded really quickly, then the timer, which, 
after counting down to 0 (`GRUB_TIMEOUT`), starts the selected entry, is 
not shown.

I noticed this issue on the ASRock E350M1 with coreboot and a small GRUB 
payload, and a PS/2 keyboard connected. Due to the missing time-out, I 
manually have to confirm the selected entry. By chance, the keyboard 
wasn’t connected setting up the system somewhere else, and that made it 
work as expected. So, it looks like, it’s related to `at_keyboard`, and 
some race, because the bigger default GRUB payload also does not show 
the problem.

Luckily, it’s easily reproducible with GRUB’s standard 
`default_payload.elf` and QEMU.

Please find the instructions below to reproduce the issue.

     $ git clone https://review.coreboot.org/coreboot
     $ cd coreboot
     $ # save attached grub.cfg in the directory
     $ util/scripts/config -e PAYLOAD_GRUB2
     grep: .config: Datei oder Verzeichnis nicht gefunden
     $ util/scripts/config -e GRUB2_INCLUDE_RUNTIME_CONFIG_FILE
     $ util/scripts/config -e GRUB2_MASTER
     $ util/scripts/config -e CONFIG_COREBOOT_ROMSIZE_KB_2048 # default 
of 512 KB too small for GRUB payload
     $ util/scripts/config -e ANY_TOOLCHAIN
     $ # or: make crossgcc-i386 CPUS=`nproc`
     $ make olddefconfig
     $ make -j`nproc`
     $ qemu-system-x86_64 --version
      QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-2+b1)
      Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project 
developers
     $ qemu-system-x86_64 -M pc -bios build/coreboot.rom -serial stdio

*No* time-out is shown. Telling QEMU to emulate a USB keyboard, 
indirectly disabling the PS/2 keyboard, the time-out *is* shown.

     $ qemu-system-x86_64 -M pc -bios build/coreboot.rom -serial stdio \
     -usb -device usb-kbd

Not including `at_keyboard` directly in GRUB’s “core image”, modules 
loaded automatically, the time-out is also shown.

`set debug=at_keyb` did not show anything interesting.

Can you reproduce that, and see what the problem is?


Kind regards,

Paul


PS: Please find the instructions to build GRUB as a coreboot payload 
done by coreboot’s Kconfig system automatically, and how put it into the 
coreboot filesystem CBFS.

```
$ git clone https://git.savannah.gnu.org/git/grub.git/
$ cd grub
$ git describe --tags --dirty
grub-2.02-238-ga791dc0e3
$ ./autogen.sh
$ ./configure --with-platform=coreboot
$ make default_payload.elf # this includes `at_keyboard`
$ cp default_payload.elf my/coreboot/folder/
$ cd my/coreboot/folder/
$ build/cbfstool build/coreboot.rom print
$ build/cbfstool build/coreboot.rom remove -n fallback/payload
$ build/cbfstool build/coreboot.rom add-payload -f payload.elf -n 
fallback/payload -c lzma
```


Kind regards,

Paul


[-- Attachment #2: grub.cfg --]
[-- Type: text/plain, Size: 58 bytes --]

set timeout=5
menuentry 'Power off machine' {
     halt
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-06 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 13:08 Menu time-out missing when GRUB is loaded quickly and `at_keyboard` Paul Menzel
2019-02-05 16:29 ` [PATCH] normal/menu: Do not treat error values as key presses Paul Menzel
2019-02-06 11:49   ` Daniel Kiper

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.