Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path DT property or of a SPCR ACPI table that the primary console is the serial port, even if a graphical console is available as well. So let's introduce a driver that allows the user to set a preference between graphical and serial if both are available. If the preference is set to 'Graphical', and any GOP protocol instances have been installed by the time the ReadyToBoot event is signalled, remove the DT property and/or the SPCR table entirely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
63 lines
1.5 KiB
INI
63 lines
1.5 KiB
INI
## @file
|
|
#
|
|
# Copyright (c) 2017, Linaro, Ltd. All rights reserved.<BR>
|
|
#
|
|
# This program and the accompanying materials are licensed and made
|
|
# available under the terms and conditions of the BSD License which
|
|
# accompanies this distribution. The full text of the license may be
|
|
# found at http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
|
|
# IMPLIED.
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010019
|
|
BASE_NAME = ConsolePrefDxe
|
|
FILE_GUID = bbe2668c-0efc-46fb-9137-4f2da8f419f3
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = ConsolePrefDxeEntryPoint
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
|
|
#
|
|
|
|
[Sources]
|
|
ConsolePrefDxe.c
|
|
ConsolePrefHii.vfr
|
|
ConsolePrefHii.uni
|
|
|
|
[Packages]
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
DebugLib
|
|
FdtLib
|
|
HiiLib
|
|
UefiBootServicesTableLib
|
|
UefiDriverEntryPoint
|
|
UefiLib
|
|
UefiRuntimeServicesTableLib
|
|
|
|
[Guids]
|
|
gConsolePrefFormSetGuid
|
|
gFdtTableGuid
|
|
gEfiEventReadyToBootGuid
|
|
|
|
[Protocols]
|
|
gEfiAcpiTableProtocolGuid
|
|
gEfiAcpiSdtProtocolGuid
|
|
gEfiGraphicsOutputProtocolGuid
|
|
|
|
[Depex]
|
|
gEfiVariableArchProtocolGuid AND
|
|
gEfiVariableWriteArchProtocolGuid
|