public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] EmulatorPkg: Fix build failure due to Tftp library removal
@ 2017-12-07  7:17 Ruiyu Ni
  2017-12-07  7:35 ` Jordan Justen
  0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2017-12-07  7:17 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jordan Justen, Andrew Fish

The TFTP command was converted from a NULL class library instance to
a dynamic shell command in commit 0961002352e9.

The ShellLib and FileHandleLib resolutions are moved from
Shell app <LibraryClasses> to [LibraryClasses.common]
because dynamic shell commands implemented as DXE_DRIVER modules
also depend on these libraries.

PcdShellLibAutoInitialize must be set to FALSE for both the shell app
itself and the dynamic shell command modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
---
 EmulatorPkg/EmulatorPkg.dsc | 10 ++++++----
 EmulatorPkg/EmulatorPkg.fdf |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index ce0ae64dba..818691ce3a 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -109,6 +109,8 @@ [LibraryClasses]
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
 
 [LibraryClasses.common.SEC]
   PeiServicesLib|EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf
@@ -378,6 +380,10 @@ [Components]
   FatPkg/EnhancedFatDxe/Fat.inf
 
 !ifndef $(USE_OLD_SHELL)
+  ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
+    <PcdsFixedAtBuild>
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+  }
   ShellPkg/Application/Shell/Shell.inf {
     <LibraryClasses>
       ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
@@ -388,12 +394,8 @@ [Components]
       NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
       NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
       NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
-      NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf
       HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
-      ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-      FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
       SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-      UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
       PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
 #      SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
 #      SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
index 377de59b5a..314eb7b895 100644
--- a/EmulatorPkg/EmulatorPkg.fdf
+++ b/EmulatorPkg/EmulatorPkg.fdf
@@ -1,7 +1,7 @@
 ## @file
 # This is Emulator FDF file with UEFI HII features enabled
 #
-# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
 # Portions copyright (c) 2009 - 2011, Apple Inc. All rights reserved.<BR>
 #
 # This program and the accompanying materials
@@ -206,6 +206,7 @@ [FV.FvRecovery]
 INF FatPkg/EnhancedFatDxe/Fat.inf
 
 !ifndef $(USE_OLD_SHELL)
+INF  ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 INF  ShellPkg/Application/Shell/Shell.inf
 !else
 INF  RuleOverride = BINARY EdkShellBinPkg/FullShell/FullShell.inf
-- 
2.15.0.gvfs.1.preview.4



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

* Re: [PATCH] EmulatorPkg: Fix build failure due to Tftp library removal
  2017-12-07  7:17 [PATCH] EmulatorPkg: Fix build failure due to Tftp library removal Ruiyu Ni
@ 2017-12-07  7:35 ` Jordan Justen
  0 siblings, 0 replies; 2+ messages in thread
From: Jordan Justen @ 2017-12-07  7:35 UTC (permalink / raw)
  To: Ruiyu Ni, edk2-devel; +Cc: Andrew Fish

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

On 2017-12-06 23:17:00, Ruiyu Ni wrote:
> The TFTP command was converted from a NULL class library instance to
> a dynamic shell command in commit 0961002352e9.
> 
> The ShellLib and FileHandleLib resolutions are moved from
> Shell app <LibraryClasses> to [LibraryClasses.common]
> because dynamic shell commands implemented as DXE_DRIVER modules
> also depend on these libraries.
> 
> PcdShellLibAutoInitialize must be set to FALSE for both the shell app
> itself and the dynamic shell command modules.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Andrew Fish <afish@apple.com>
> ---
>  EmulatorPkg/EmulatorPkg.dsc | 10 ++++++----
>  EmulatorPkg/EmulatorPkg.fdf |  3 ++-
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
> index ce0ae64dba..818691ce3a 100644
> --- a/EmulatorPkg/EmulatorPkg.dsc
> +++ b/EmulatorPkg/EmulatorPkg.dsc
> @@ -109,6 +109,8 @@ [LibraryClasses]
>    VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
>    SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
>    UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> +  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> +  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>  
>  [LibraryClasses.common.SEC]
>    PeiServicesLib|EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf
> @@ -378,6 +380,10 @@ [Components]
>    FatPkg/EnhancedFatDxe/Fat.inf
>  
>  !ifndef $(USE_OLD_SHELL)
> +  ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
> +    <PcdsFixedAtBuild>
> +      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> +  }
>    ShellPkg/Application/Shell/Shell.inf {
>      <LibraryClasses>
>        ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> @@ -388,12 +394,8 @@ [Components]
>        NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
>        NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
>        NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
> -      NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf
>        HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> -      ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> -      FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>        SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> -      UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>        PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
>  #      SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
>  #      SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
> diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
> index 377de59b5a..314eb7b895 100644
> --- a/EmulatorPkg/EmulatorPkg.fdf
> +++ b/EmulatorPkg/EmulatorPkg.fdf
> @@ -1,7 +1,7 @@
>  ## @file
>  # This is Emulator FDF file with UEFI HII features enabled
>  #
> -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
>  # Portions copyright (c) 2009 - 2011, Apple Inc. All rights reserved.<BR>
>  #
>  # This program and the accompanying materials
> @@ -206,6 +206,7 @@ [FV.FvRecovery]
>  INF FatPkg/EnhancedFatDxe/Fat.inf
>  
>  !ifndef $(USE_OLD_SHELL)
> +INF  ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
>  INF  ShellPkg/Application/Shell/Shell.inf
>  !else
>  INF  RuleOverride = BINARY EdkShellBinPkg/FullShell/FullShell.inf
> -- 
> 2.15.0.gvfs.1.preview.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2017-12-07  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07  7:17 [PATCH] EmulatorPkg: Fix build failure due to Tftp library removal Ruiyu Ni
2017-12-07  7:35 ` Jordan Justen

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