Hi Heinrich, On Wed, 5 Aug 2026 at 22:22, Heinrich Schuchardt <[email protected]> wrote: > > > > Simon Glass <[email protected]> schrieb am Do., 6. Aug. 2026, 00:00: >> >> Hi Heinrich, >> >> On 2026-07-31T08:57:24, Heinrich Schuchardt >> <[email protected]> wrote: >> > efi: avoid video ghosting in EFI app >> > >> > When running the EFI app via QEMU with EDK II using >> > >> > cp /usr/share/OVMF/OVMF_VARS_4M.fd . >> > qemu-system-x86_64 -enable-kvm -m 2048 \ >> > -machine q35,smm=on \ >> > -drive >> > if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd \ >> > -drive if=pflash,format=raw,file=OVMF_VARS_4M.fd \ >> > -hda disk >> > >> > every character printed to the console by the U-Boot app appears twice. See >> > https://gist.github.com/xypron/7214e785c7d73104f8541bcac363a192 . >> > >> > The reason is that environment variable stdout has serial,vidconsole as >> > value. This is defined by board/efi/efi-x86_app/efi-x86_app.env including >> > include/env/x86.env. >> > >> > Provide a proper efi-x86_app.env file which does not use vidconsole. >> > >> > [...] >> > >> > board/efi/efi-x86_app/efi-x86_app.env | 13 ++++++++++++- >> > 1 file changed, 12 insertions(+), 1 deletion(-) >> >> > diff --git a/board/efi/efi-x86_app/efi-x86_app.env >> > b/board/efi/efi-x86_app/efi-x86_app.env >> > @@ -1,6 +1,17 @@ >> > /* SPDX-License-Identifier: GPL-2.0+ */ >> > + >> > /* >> > * Copyright (c) 2015 Google, Inc >> > */ >> > >> > -#include <env/x86.env> >> > +netdev=eth0 >> > +consoledev=ttyS0 >> > +scriptaddr=0x7000000 >> > +kernel_addr_r=0x1000000 >> > +ramdisk_addr_r=0x4000000 >> > +ramdiskfile=initramfs.gz >> > + >> > +/* common console settings */ >> > +stdin=serial >> > +stdout=serial >> > +stderr=serial >> >> Please can you keep '#include <env/x86.env>' and override just the >> three console variables afterwards? > > > Hello Simon, > > the EFI app should not be x86 specific. You already fixed this in your > private repo.
Are you planning to bring in support for ARM, RISC-V, etc? In any case, if you make a change the commit message should mention it, so people are not left guessing whether this is intentional or not. BTW my repo is public :-) > > Do you miss any value? > >> env2string.awk uses vars[var] = >> env, so a later assignment wins, and we avoid duplicating netdev, >> consoledev, scriptaddr, kernel_addr_r, ramdisk_addr_r and ramdiskfile >> — otherwise any future change to include/env/x86.env will drift away >> from the EFI app. >> >> Also, the previous include pulled in pciconfighost=1 which this >> version silently drops. If that is intentional it deserves a mention >> in the commit message; if not, the include-then-override approach >> fixes it for free. > > > The EFI must not drive any hardware directly. There is no value in > pciconfighost. Again, please just put this comment in the commit message. > > Best regards > > Heinrich > >> >> BTW an alternative is to leave x86.env alone and make the vidconsole >> entries conditional on something like !defined(CONFIG_EFI_APP), so >> efi-x86_payload.env and the other x86 boards keep sharing one source >> of truth. What do you think? Regards, Simon
