[edk2-devel] [PATCH] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg

duntan posted 1 patch 2 years, 7 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c | 6 +++---
UefiPayloadPkg/UefiPayloadPkg.dsc               | 2 +-
UefiPayloadPkg/UefiPayloadPkg.fdf               | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
[edk2-devel] [PATCH] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
Posted by duntan 2 years, 7 months ago
Add quotes when using $(ARCH) in .dsc and .fdf file.
The quotes are added due to the way by which Core ci parse the .dsc file.
Add UINTN in Hob.c to fix cast from pointer to integer of different size error.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: DunTan <dun.tan@intel.com>
---
 UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c | 6 +++---
 UefiPayloadPkg/UefiPayloadPkg.dsc               | 2 +-
 UefiPayloadPkg/UefiPayloadPkg.fdf               | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c b/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c
index 768c3db770..dd25ac2682 100644
--- a/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c
+++ b/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c
@@ -77,9 +77,9 @@ HobConstructor (
   Hob->Version             = EFI_HOB_HANDOFF_TABLE_VERSION;
   Hob->BootMode            = BOOT_WITH_FULL_CONFIGURATION;
 
-  Hob->EfiMemoryTop        = (EFI_PHYSICAL_ADDRESS) EfiMemoryTop;
-  Hob->EfiMemoryBottom     = (EFI_PHYSICAL_ADDRESS) EfiMemoryBottom;
-  Hob->EfiFreeMemoryTop    = (EFI_PHYSICAL_ADDRESS) EfiFreeMemoryTop;
+  Hob->EfiMemoryTop        = (EFI_PHYSICAL_ADDRESS) (UINTN) EfiMemoryTop;
+  Hob->EfiMemoryBottom     = (EFI_PHYSICAL_ADDRESS) (UINTN) EfiMemoryBottom;
+  Hob->EfiFreeMemoryTop    = (EFI_PHYSICAL_ADDRESS) (UINTN) EfiFreeMemoryTop;
   Hob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) (HobEnd+1);
   Hob->EfiEndOfHobList     = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd;
 
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index b4a30be381..856d5ea786 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -415,7 +415,7 @@
 #
 ################################################################################
 
-!if "IA32" in $(ARCH)
+!if "IA32" in "$(ARCH)"
   [Components.IA32]
   !if $(UNIVERSAL_PAYLOAD) == TRUE
     UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index b2cfb6b405..1c1d765517 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -202,7 +202,7 @@ INF ShellPkg/Application/Shell/Shell.inf
 !endif
 
 !if $(SHELL_TYPE) == MIN_BIN
-!if $(ARCH) == IA32
+!if "$(ARCH)" == IA32
 INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
 !else
 INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
@@ -210,7 +210,7 @@ INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
 !endif
 
 !if $(SHELL_TYPE) == UEFI_BIN
-!if $(ARCH) == IA32
+!if "$(ARCH)" == IA32
 INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
 !else
 INF  RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79624): https://edk2.groups.io/g/devel/message/79624
Mute This Topic: https://groups.io/mt/85015577/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
Posted by Ni, Ray 2 years, 7 months ago
Dun,
you can directly remove below lines that reference ShellBinPkg because that pkg doesn't exist in edk2 repo anymore (it was deleted in year 2019).

>  !if $(SHELL_TYPE) == MIN_BIN
> -!if $(ARCH) == IA32
> +!if "$(ARCH)" == IA32
>  INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
>  !else
>  INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
> @@ -210,7 +210,7 @@ INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
>  !endif
> 
>  !if $(SHELL_TYPE) == UEFI_BIN
> -!if $(ARCH) == IA32
> +!if "$(ARCH)" == IA32
>  INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
>  !else
>  INF  RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79629): https://edk2.groups.io/g/devel/message/79629
Mute This Topic: https://groups.io/mt/85015577/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
Posted by duntan 2 years, 7 months ago
Thanks Ray, I'll delete these lines.

Thanks,
Dun
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com> 
Sent: Friday, August 20, 2021 2:58 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg

Dun,
you can directly remove below lines that reference ShellBinPkg because that pkg doesn't exist in edk2 repo anymore (it was deleted in year 2019).

>  !if $(SHELL_TYPE) == MIN_BIN
> -!if $(ARCH) == IA32
> +!if "$(ARCH)" == IA32
>  INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
>  !else
>  INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
> @@ -210,7 +210,7 @@ INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
>  !endif
> 
>  !if $(SHELL_TYPE) == UEFI_BIN
> -!if $(ARCH) == IA32
> +!if "$(ARCH)" == IA32
>  INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
>  !else
>  INF  RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79630): https://edk2.groups.io/g/devel/message/79630
Mute This Topic: https://groups.io/mt/85015577/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-