Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gj1yz-0005JZ-AV for mharc-grub-devel@gnu.org; Mon, 14 Jan 2019 08:08:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj1yv-0005JC-Qj for grub-devel@gnu.org; Mon, 14 Jan 2019 08:08:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj1yu-00071p-Uo for grub-devel@gnu.org; Mon, 14 Jan 2019 08:08:45 -0500 Received: from mx3.molgen.mpg.de ([141.14.17.11]:58707 helo=mx1.molgen.mpg.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gj1yu-0006xH-IV for grub-devel@gnu.org; Mon, 14 Jan 2019 08:08:44 -0500 Received: from [141.14.220.44] (g44.guest.molgen.mpg.de [141.14.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id DCC2920135342D; Mon, 14 Jan 2019 14:08:29 +0100 (CET) From: Paul Menzel Subject: Menu time-out missing when GRUB is loaded quickly and `at_keyboard` To: grub-devel@gnu.org Cc: coreboot@coreboot.org Message-ID: Date: Mon, 14 Jan 2019 14:08:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1A029C68319F14EEA29B0F1B" Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 141.14.17.11 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 13:08:48 -0000 This is a multi-part message in MIME format. --------------1A029C68319F14EEA29B0F1B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Dear GRUB folks, When the module `at_keyboard` is directly into the GRUB image=20 (`--modules`), and GRUB is loaded really quickly, then the timer, which,=20 after counting down to 0 (`GRUB_TIMEOUT`), starts the selected entry, is=20 not shown. I noticed this issue on the ASRock E350M1 with coreboot and a small GRUB=20 payload, and a PS/2 keyboard connected. Due to the missing time-out, I=20 manually have to confirm the selected entry. By chance, the keyboard=20 wasn=E2=80=99t connected setting up the system somewhere else, and that m= ade it=20 work as expected. So, it looks like, it=E2=80=99s related to `at_keyboard= `, and=20 some race, because the bigger default GRUB payload also does not show=20 the problem. Luckily, it=E2=80=99s easily reproducible with GRUB=E2=80=99s standard=20 `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=20 of 512 KB too small for GRUB payload $ util/scripts/config -e ANY_TOOLCHAIN $ # or: make crossgcc-i386 CPUS=3D`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=20 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,=20 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=E2=80=99s =E2=80=9Ccore imag= e=E2=80=9D, modules=20 loaded automatically, the time-out is also shown. `set debug=3Dat_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=20 done by coreboot=E2=80=99s Kconfig system automatically, and how put it i= nto the=20 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=3Dcoreboot $ 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=20 fallback/payload -c lzma ``` Kind regards, Paul --------------1A029C68319F14EEA29B0F1B Content-Type: text/plain; charset=UTF-8; name="grub.cfg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="grub.cfg" c2V0IHRpbWVvdXQ9NQptZW51ZW50cnkgJ1Bvd2VyIG9mZiBtYWNoaW5lJyB7CiAgICAgaGFs dAp9Cg== --------------1A029C68319F14EEA29B0F1B--