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.

Signed-off-by: Heinrich Schuchardt <[email protected]>
---
 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
index 106836af1ff..d2858b9cb93 100644
--- 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
-- 
2.53.0

Reply via email to