]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Add a Macro to enable Boot Logo
authorSean Rhodes <sean@starlabs.systems>
Sun, 10 Jul 2022 18:20:40 +0000 (19:20 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 3 Aug 2022 22:15:00 +0000 (22:15 +0000)
Add a macro called BOOTSPLASH_IMAGE, which when enabled, will
display a logo at boot time.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
UefiPayloadPkg/UefiPayloadPkg.dsc
UefiPayloadPkg/UefiPayloadPkg.fdf

index 9364a5683d6b3fdcc8f6941b92203bdd21ba7352..a92a260a6e2d3a0198ecde7efed30467ff471925 100644 (file)
@@ -243,6 +243,8 @@ PlatformBootManagerAfterConsole (
 {\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL  Black;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL  White;\r
+  EDKII_PLATFORM_LOGO_PROTOCOL   *PlatformLogo;\r
+  EFI_STATUS                     Status;\r
 \r
   if (mUniversalPayloadPlatformBootManagerOverrideInstance != NULL) {\r
     mUniversalPayloadPlatformBootManagerOverrideInstance->AfterConsole ();\r
@@ -252,6 +254,13 @@ PlatformBootManagerAfterConsole (
   Black.Blue = Black.Green = Black.Red = Black.Reserved = 0;\r
   White.Blue = White.Green = White.Red = White.Reserved = 0xFF;\r
 \r
+  Status = gBS->LocateProtocol (&gEdkiiPlatformLogoProtocolGuid, NULL, (VOID **)&PlatformLogo);\r
+\r
+  if (!EFI_ERROR (Status)) {\r
+    gST->ConOut->ClearScreen (gST->ConOut);\r
+    BootLogoEnableLogo ();\r
+  }\r
+\r
   EfiBootManagerConnectAll ();\r
   EfiBootManagerRefreshAllBootOption ();\r
 \r
index 9f58c460cd6bd39e7dd182e08072872c181025e1..7ec93420f21e0bfb935d22802874577838f8e5b6 100644 (file)
@@ -39,6 +39,7 @@
   UefiRuntimeServicesTableLib\r
   UefiLib\r
   UefiBootManagerLib\r
+  BootLogoLib\r
   PcdLib\r
   DxeServicesLib\r
   MemoryAllocationLib\r
index e78e959ce4b2e9ec4ef0e854493a35a4de880ede..abe1a42709b7607c3e1ce9d4d103f3ba884b451e 100644 (file)
@@ -42,6 +42,7 @@
   DEFINE CRYPTO_PROTOCOL_SUPPORT      = FALSE\r
   DEFINE SD_MMC_TIMEOUT               = 1000000\r
   DEFINE USE_CBMEM_FOR_CONSOLE        = FALSE\r
+  DEFINE BOOTSPLASH_IMAGE             = FALSE\r
 \r
   #\r
   # NULL:    NullMemoryTestDxe\r
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf\r
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf\r
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf\r
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf\r
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
 \r
 \r
   gUefiPayloadPkgTokenSpaceGuid.PcdDispatchModuleAbove4GMemory|$(ABOVE_4G_MEMORY)\r
   gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)\r
+\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000\r
 \r
 !if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE\r
 !endif\r
   UefiCpuPkg/CpuDxe/CpuDxe.inf\r
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
+!if $(BOOTSPLASH_IMAGE)\r
+  MdeModulePkg/Logo/LogoDxe.inf\r
+!endif\r
   MdeModulePkg/Application/UiApp/UiApp.inf {\r
     <LibraryClasses>\r
       NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf\r
index afdd6447a7b34ee9000136484850feb21ff90889..d7c9db191ca64d1079abba3ead158f84633dd528 100644 (file)
@@ -165,6 +165,10 @@ INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
 INF UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf\r
 \r
 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
+!if $(BOOTSPLASH_IMAGE)\r
+INF MdeModulePkg/Logo/LogoDxe.inf\r
+!endif\r
+\r
 #\r
 # PCI Support\r
 #\r