public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch V2] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
@ 2021-08-20  7:20 duntan
  2021-08-20  8:11 ` Ni, Ray
  0 siblings, 1 reply; 2+ messages in thread
From: duntan @ 2021-08-20  7:20 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Maurice Ma, Benjamin You, DunTan

V1: 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.
V2: Delete lines which reference ShellBinPkg.The pkg doesn't exist in edk2.

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               | 16 ----------------
 3 files changed, 4 insertions(+), 20 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..5871d71dbb 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -201,22 +201,6 @@ INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
 INF ShellPkg/Application/Shell/Shell.inf
 !endif
 
-!if $(SHELL_TYPE) == MIN_BIN
-!if $(ARCH) == IA32
-INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
-!else
-INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
-!endif
-!endif
-
-!if $(SHELL_TYPE) == UEFI_BIN
-!if $(ARCH) == IA32
-INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
-!else
-INF  RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
-!endif
-!endif
-
 
 ################################################################################
 #
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch V2] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
  2021-08-20  7:20 [Patch V2] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg duntan
@ 2021-08-20  8:11 ` Ni, Ray
  0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ray @ 2021-08-20  8:11 UTC (permalink / raw)
  To: Tan, Dun, devel@edk2.groups.io; +Cc: Dong, Guo, Ma, Maurice, You, Benjamin

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Friday, August 20, 2021 3:21 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>; Tan, Dun <dun.tan@intel.com>
> Subject: [Patch V2] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg
> 
> V1: 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.
> V2: Delete lines which reference ShellBinPkg.The pkg doesn't exist in edk2.
> 
> 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               | 16 ----------------
>  3 files changed, 4 insertions(+), 20 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..5871d71dbb 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -201,22 +201,6 @@ INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
>  INF ShellPkg/Application/Shell/Shell.inf
>  !endif
> 
> -!if $(SHELL_TYPE) == MIN_BIN
> -!if $(ARCH) == IA32
> -INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
> -!else
> -INF  RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
> -!endif
> -!endif
> -
> -!if $(SHELL_TYPE) == UEFI_BIN
> -!if $(ARCH) == IA32
> -INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
> -!else
> -INF  RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
> -!endif
> -!endif
> -
> 
>  ################################################################################
>  #
> --
> 2.31.1.windows.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-20  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-20  7:20 [Patch V2] UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkg duntan
2021-08-20  8:11 ` Ni, Ray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox