From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH 43/43] UefiPayloadPkg: Provide option to use Boot Splash To: Guo Dong ,devel@edk2.groups.io From: "Sean Rhodes" X-Originating-Location: Surbiton, England, GB (217.155.46.38) X-Originating-Platform: Linux Chrome 97 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 01 Feb 2022 14:53:45 -0800 References: In-Reply-To: Message-ID: <24425.1643756025296617443@groups.io> Content-Type: multipart/alternative; boundary="rrVZhh1QjWXCbbuw69Wo" --rrVZhh1QjWXCbbuw69Wo Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable >>From dc0d6d7175d132b28a2d3ce16cc4373644435793 Mon Sep 17 00:00:00 2001 Message-Id: From: Sean Rhodes Date: Thu, 6 Jan 2022 15:15:29 +0000 Subject: [PATCH] UefiPayloadPkg: Provide option to use Boot Splash Provide a build option to use a Boot Splash logo. Signed-off-by: Sean Rhodes --- .../Library/PlatformBootManagerLib/PlatformBootManager.c | 5 +++++ .../PlatformBootManagerLib/PlatformBootManagerLib.inf=C2=A0 =C2=A0 | 2 ++ UefiPayloadPkg/UefiPayloadPkg.dec=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 3 +++ UefiPayloadPkg/UefiPayloadPkg.dsc=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 9 +++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 3 +++ 5 files changed, 22 insertions(+) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index a8ead775ea..3bded489ef 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -243,6 +243,11 @@ PlatformBootManagerAfterConsole ( Black.Blue =3D Black.Green =3D Black.Red =3D Black.Reserved =3D 0; White.Blue =3D White.Green =3D White.Red =3D White.Reserved =3D 0xFF; +=C2=A0 if (FixedPcdGetBool (PcdBootSplashImage)) { +=C2=A0 =C2=A0 gST->ConOut->ClearScreen (gST->ConOut); +=C2=A0 =C2=A0 BootLogoEnableLogo (); +=C2=A0 } + EfiBootManagerConnectAll (); EfiBootManagerRefreshAllBootOption (); diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf index 9c4a9da943..306bd33b7a 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf @@ -39,6 +39,7 @@ UefiRuntimeServicesTableLib UefiLib UefiBootManagerLib +=C2=A0 BootLogoLib PcdLib DxeServicesLib MemoryAllocationLib @@ -73,3 +74,4 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile +=C2=A0 gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayload= Pkg.dec index 551f0a4915..4f5756d575 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dec +++ b/UefiPayloadPkg/UefiPayloadPkg.dec @@ -83,6 +83,9 @@ gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSi= ze|0x04000000|UINT32|0x gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0x= ab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }|VOID= *|0x00000018 +# BootSplash Image +gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage|TRUE|BOOLEAN|0x00000021 + ## FFS filename to find the default variable initial data file. # @Prompt FFS Name of variable initial data file gUefiPayloadPkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb1, 0xae, 0x4= 2, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, 0xe6 }|VOID*= |0x00000025 diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 1ce96a51c1..700ac02395 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -33,6 +33,7 @@ DEFINE UNIVERSAL_PAYLOAD=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D FALSE DEFINE SECURITY_STUB_ENABLE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D TRUE DEFINE SMM_SUPPORT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D FALSE +=C2=A0 DEFINE BOOTSPLASH_IMAGE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D FALSE # # SBL:=C2=A0 =C2=A0 =C2=A0 UEFI payload for Slim Bootloader # COREBOOT: UEFI payload for coreboot @@ -209,6 +210,9 @@ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecu= rityManagementLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerL= ib.inf +!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE +=C2=A0 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf +!endif CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDi= splayLib.inf FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.= inf @@ -399,6 +403,8 @@ gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask=C2=A0 =C2=A0 =C2= =A0 =C2=A0| 0x1 !endif +=C2=A0 gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage|$(BOOTSPLASH_IMAGE= ) + [PcdsPatchableInModule.X64] gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER) gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER) @@ -545,6 +551,9 @@ !endif UefiCpuPkg/CpuDxe/CpuDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE +=C2=A0 MdeModulePkg/Logo/LogoDxe.inf +!endif MdeModulePkg/Application/UiApp/UiApp.inf { NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index c7b04978ad..a71d655687 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -158,6 +158,9 @@ INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf INF UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf +!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE +INF MdeModulePkg/Logo/LogoDxe.inf +!endif # # PCI Support # -- 2.32.0 --rrVZhh1QjWXCbbuw69Wo Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
From dc0d6d7175d132b28a2d3ce16cc4373644435793 Mon Sep 17 00:00:00 2001=
Message-Id: <dc0d6d7175d132b28a2d3ce16cc4373644435793.1643755961.gi= t.sean@starlabs.systems>
From: Sean Rhodes <sean@starlabs.systems>
Date: Thu, 6 Jan 2022 15:15:29 +0000
Subject: [PATCH] UefiPayloadPkg: Provide option to use Boot Splash
 
Provide a build option to use a Boot Splash logo.
 
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
 .../Library/PlatformBootManagerLib/PlatformBootManager.c | 5 +++= ++
 .../PlatformBootManagerLib/PlatformBootManagerLib.inf  &nbs= p; | 2 ++
 UefiPayloadPkg/UefiPayloadPkg.dec        &nb= sp;               | 3 +++
 UefiPayloadPkg/UefiPayloadPkg.dsc        &nb= sp;               | 9 +++++++++
 UefiPayloadPkg/UefiPayloadPkg.fdf        &nb= sp;               | 3 +++
 5 files changed, 22 insertions(+)
 
diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBoo= tManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c
index a8ead775ea..3bded489ef 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManage= r.c
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManage= r.c
@@ -243,6 +243,11 @@ PlatformBootManagerAfterConsole (
   Black.Blue =3D Black.Green =3D Black.Red =3D Black.Reserv= ed =3D 0;
   White.Blue =3D White.Green =3D White.Red =3D White.Reserv= ed =3D 0xFF;
 
+  if (FixedPcdGetBool (PcdBootSplashImage)) {
+    gST->ConOut->ClearScreen (gST->ConOut);
+    BootLogoEnableLogo ();
+  }
+
   EfiBootManagerConnectAll ();
   EfiBootManagerRefreshAllBootOption ();
 
diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBoo= tManagerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBoo= tManagerLib.inf
index 9c4a9da943..306bd33b7a 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManage= rLib.inf
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManage= rLib.inf
@@ -39,6 +39,7 @@
   UefiRuntimeServicesTableLib
   UefiLib
   UefiBootManagerLib
+  BootLogoLib
   PcdLib
   DxeServicesLib
   MemoryAllocationLib
@@ -73,3 +74,4 @@
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile
+  gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPa= yloadPkg.dec
index 551f0a4915..4f5756d575 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -83,6 +83,9 @@ gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiReg= ionSize|0x04000000|UINT32|0x
 
 gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xc= f, 0x80, 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, = 0x41 }|VOID*|0x00000018
 
+# BootSplash Image
+gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage|TRUE|BOOLEAN|0x00000= 021
+
 ## FFS filename to find the default variable initial data file.<= /div>
 # @Prompt FFS Name of variable initial data file
  gUefiPayloadPkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb= 1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, = 0xe6 }|VOID*|0x00000025
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPa= yloadPkg.dsc
index 1ce96a51c1..700ac02395 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -33,6 +33,7 @@
   DEFINE UNIVERSAL_PAYLOAD         = ;   =3D FALSE
   DEFINE SECURITY_STUB_ENABLE        &n= bsp;=3D TRUE
   DEFINE SMM_SUPPORT          &nbs= p;       =3D FALSE
+  DEFINE BOOTSPLASH_IMAGE          &nbs= p;  =3D FALSE
   #
   # SBL:      UEFI payload for Slim Bootload= er
   # COREBOOT: UEFI payload for coreboot
@@ -209,6 +210,9 @@
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCaps= uleLibNull.inf
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityMan= agementLib/DxeSecurityManagementLib.inf
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLi= b/UefiBootManagerLib.inf
+!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+!endif
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDispl= ayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/= FrameBufferBltLib.inf
 
@@ -399,6 +403,8 @@
   gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMas= k       | 0x1
 !endif
 
+  gUefiPayloadPkgTokenSpaceGuid.PcdBootSplashImage|$(BOOTSPLASH_= IMAGE)
+
 [PcdsPatchableInModule.X64]
   gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_I= NDEX_REGISTER)
   gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_= TARGET_REGISTER)
@@ -545,6 +551,9 @@
 !endif
   UefiCpuPkg/CpuDxe/CpuDxe.inf
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE
+  MdeModulePkg/Logo/LogoDxe.inf
+!endif
   MdeModulePkg/Application/UiApp/UiApp.inf {
     <LibraryClasses>
       NULL|MdeModulePkg/Library/DeviceManagerUiLi= b/DeviceManagerUiLib.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPa= yloadPkg.fdf
index c7b04978ad..a71d655687 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -158,6 +158,9 @@ INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
 INF UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
 
 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(BOOTSPLASH_IMAGE) =3D=3D TRUE
+INF MdeModulePkg/Logo/LogoDxe.inf
+!endif
 #
 # PCI Support
 #
-- 
2.32.0
 
--rrVZhh1QjWXCbbuw69Wo--