All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: grub-devel@gnu.org
Cc: coreboot@coreboot.org
Subject: Menu time-out missing when GRUB is loaded quickly and `at_keyboard`
Date: Mon, 14 Jan 2019 14:08:29 +0100	[thread overview]
Message-ID: <a8ca2d83-72ef-6eac-e1f4-7a2d39c78b48@molgen.mpg.de> (raw)

[-- 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
}

             reply	other threads:[~2019-01-14 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 13:08 Paul Menzel [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8ca2d83-72ef-6eac-e1f4-7a2d39c78b48@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=coreboot@coreboot.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.