public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master
@ 2019-05-09  4:30 Michael D Kinney
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
                   ` (16 more replies)
  0 siblings, 17 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:30 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Fix a number of small issues for MinnowMax to build and boot with latest
edk2/master and to prepare MinnowMax for move to edk2-platforms/master.
 
Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Michael D Kinney (16):
  Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
  Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
  Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
  Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
  Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
  Vlv2TbltDevicePkg: Build full UEFI Shell from sources
  Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
  Vlv2TbltDevicePkg: Add PchInitSmm module
  Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
  Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
  Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
  Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
  Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools
  Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
  Vlv2TbltDevicePkg: Update Readme.md

 Vlv2TbltDevicePkg/.gitignore                  |   2 +
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c |   6 +-
 .../AcpiPlatform/AcpiPlatform.inf             |  10 +-
 Vlv2TbltDevicePkg/Build_IFWI.bat              |  31 ++-
 .../Capsule/GenerateCapsule/GenCapsuleAll.bat |  12 +-
 .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  28 +++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat   |   6 +-
 .../GenerateCapsule/GenCapsuleMinnowMax.sh    |  65 +++++
 .../GenCapsuleMinnowMaxRelease.bat            |   6 +-
 .../GenCapsuleMinnowMaxRelease.sh             |  65 +++++
 .../GenerateCapsule/GenCapsuleSampleColor.bat |   2 -
 .../GenerateCapsule/GenCapsuleSampleColor.sh  |  70 ++++++
 .../Feature/Capsule/GenerateCapsule/Lvfs.ddf  |  14 ++
 .../LvfsGenCapsuleMinnowMax.bat               | 139 +++++++++++
 .../LvfsGenCapsuleMinnowMaxRelease.bat        | 139 +++++++++++
 .../LvfsGenCapsuleSampleColor.bat             | 145 +++++++++++
 .../GenerateCapsule/template.metainfo.xml     |  27 ++
 .../Library/FmpDeviceLib/FmpDeviceLib.c       |   7 +-
 .../PlatformFlashAccessLib.c                  |   6 +-
 .../Library/PlatformBdsLib/BdsPlatform.c      |  23 +-
 .../Library/PlatformBdsLib/PlatformBdsLib.inf |  10 +-
 .../Library/GenericBdsLib/BdsBoot.c           |   8 +-
 .../Library/GenericBdsLib/GenericBdsLib.inf   |   5 +-
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc      |  38 +++
 Vlv2TbltDevicePkg/PlatformPkg.fdf             |   3 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf          |  10 +-
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc       |  31 ++-
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc         |  31 ++-
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc          |  30 ++-
 Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c       |   5 +-
 Vlv2TbltDevicePkg/Readme.md                   | 232 ++++++++++++++----
 ...MiscNumberOfInstallableLanguagesFunction.c |  10 +-
 .../Stitch/Gcc/NvStorageVariable.bin          | Bin 253952 -> 253952 bytes
 Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat       |  23 +-
 Vlv2TbltDevicePkg/bldX64.bat                  | 216 ----------------
 Vlv2TbltDevicePkg/bld_vlv.bat                 | 129 ++++++----
 Vlv2TbltDevicePkg/bld_vlv.sh                  |   3 +-
 37 files changed, 1194 insertions(+), 393 deletions(-)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
 create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
 delete mode 100644 Vlv2TbltDevicePkg/bldX64.bat

-- 
2.21.0.windows.1


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

* [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
@ 2019-05-09  4:30 ` Michael D Kinney
  2019-05-09  7:53   ` Sun, Zailiang
                     ` (2 more replies)
  2019-05-09  4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
                   ` (15 subsequent siblings)
  16 siblings, 3 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:30 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

If the FLASH device cannot be erased or written, then the
flag FlashError is set to TRUE.

Add the missing logic to return an error if FlashError
is TRUE.  The missing logic was found from a GCC build that
noticed a local variable was declared and assigned, but was
not being used.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
index 052ccb891c..079c3ef2d6 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
@@ -1,7 +1,7 @@
 /** @file
   Platform Flash Access library.
 
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -529,6 +529,10 @@ Done:
     Progress (EndPercentage);
   }
 
+  if (FlashError) {
+    return EFI_WRITE_PROTECTED;
+  }
+
   return EFI_SUCCESS;
 }
 
-- 
2.21.0.windows.1


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

* [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
@ 2019-05-09  4:30 ` Michael D Kinney
  2019-05-09  8:15   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  2019-05-09  4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
                   ` (14 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:30 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Change the type of the local variable Size in the function
AcpiPlatformEntryPoint() from UINT32 to UINTN.  This local
variable is passed into the function ReadSection() that returns
a value of type UINTN.  Using type UINT32 can potentially
corrupt an adjacent local on the stack.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index 0bd375391e..5c03f66edb 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -778,7 +778,7 @@ AcpiPlatformEntryPoint (
   EFI_ACPI_COMMON_HEADER        *CurrentTable;
   UINTN                         TableHandle;
   UINT32                        FvStatus;
-  UINT32                        Size;
+  UINTN                         Size;
   EFI_EVENT                     Event;
   EFI_ACPI_TABLE_VERSION        TableVersion;
   UINTN                         VarSize;
@@ -1223,7 +1223,7 @@ AcpiPlatformEntryPoint (
                       EFI_SECTION_RAW,
                       Instance,
                       (VOID **) &CurrentTable,
-                      (UINTN *) &Size,
+                      &Size,
                       &FvStatus
                       );
 
-- 
2.21.0.windows.1


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

* [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
  2019-05-09  4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
@ 2019-05-09  4:30 ` Michael D Kinney
  2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  2019-05-09  4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
                   ` (13 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:30 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Add the arch protocols gEfiVariableArchProtocolGuid and
gEfiVariableWriteArchProtocolGuid to the dependency expression
for the AcpiPlatform module to guarantee that the variables
that AcpiPlatform depends upon are set before they are used by
this module.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
index 8422985764..c59920db03 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
@@ -1,10 +1,12 @@
 #
 #
-# Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
-#                                                                                  

+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#
+
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 
-#                                                                                  

+#
+
 #
 #
 #  Module Name:
@@ -79,6 +81,8 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile
 
 [Depex]
+  gEfiVariableArchProtocolGuid        AND
+  gEfiVariableWriteArchProtocolGuid   AND
   gEfiAcpiSupportProtocolGuid AND
   gEfiMpServiceProtocolGuid AND
   gEfiCpuIoProtocolGuid
-- 
2.21.0.windows.1


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

* [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (2 preceding siblings ...)
  2019-05-09  4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
@ 2019-05-09  4:30 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
                   ` (12 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:30 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

The NumberOfEnabledProcessors parameter to the MP Services
Protocol service GetNumberOfProcessors() is not optional and is
not allowed to be NULL.  Add the CpuEnabledCount local variable
and pass it into GetNumberOfProcessors().

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
index 28de8457ce..3583e324e6 100644
--- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
+++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
@@ -1,5 +1,5 @@
 /** 
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 
@@ -40,6 +40,7 @@ PpmPolicyEntry(
   EFI_HANDLE                Handle;
   EFI_STATUS                Status;
   UINTN                     CpuCount;
+  UINTN                     CpuEnabledCount;
   UINT8                     CPUMobileFeature;
 
   PCH_STEPPING              Stepping;
@@ -63,7 +64,7 @@ PpmPolicyEntry(
   //
   // Get processor count from MP service.
   //
-  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, NULL);
+  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, &CpuEnabledCount);
   ASSERT_EFI_ERROR (Status);
 
   //
-- 
2.21.0.windows.1


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

* [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (3 preceding siblings ...)
  2019-05-09  4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
                   ` (11 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Zailiang Sun, Yi Qian

From: Michael D Kinney <mdkinney@mdkinney-desk.amr.corp.intel.com>

Fix loop comparison for end of languages.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../MiscNumberOfInstallableLanguagesFunction.c         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
index 9fff8d8850..4a96a2c465 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
@@ -1,10 +1,12 @@
 /*++
 
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

+Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
+
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-                                                                                   

+
+
 
 
 Module Name:
@@ -68,7 +70,7 @@ CurrentLanguageMatch (
     // Find the best matching RFC 4646 language, compute the offset.
     //
     CompareLength = AsciiStrLen (BestLanguage);
-    for (MatchLang = Languages, (*Offset) = 0; MatchLang != '\0'; (*Offset)++) {
+    for (MatchLang = Languages, (*Offset) = 0; *MatchLang != '\0'; (*Offset)++) {
       //
       // Seek to the end of current match language.
       //
-- 
2.21.0.windows.1


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

* [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (4 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
                   ` (10 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Remove use of PCD PcdShellFile from the IntelFrameworkModulePkg
and instead use gUefiShellFileGuid 
to find the UEFI Shell in
an FV.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c |  4 ++--
 .../Library/PlatformBdsLib/PlatformBdsLib.inf          | 10 ++++++----
 .../Library/GenericBdsLib/BdsBoot.c                    |  8 ++++----
 .../Library/GenericBdsLib/GenericBdsLib.inf            |  5 +++--
 4 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
index 0f0e15c64a..e86c6b3e2e 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -1356,7 +1356,7 @@ PlatformBdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
@@ -1528,7 +1528,7 @@ PlatformBdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
index 5831569fae..d3bef0fa39 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
@@ -1,11 +1,13 @@
 #/** @file
 # Component name for module PlatformBootManagerLib
 #
-# Copyright (c) 2008  - 2016, Intel Corporation. All rights reserved.<BR>
-#                                                                                  

+# Copyright (c) 2008  - 2019, Intel Corporation. All rights reserved.<BR>
+#
+
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 
-#                                                                                  

+#
+
 #
 #
 #
@@ -97,6 +99,7 @@ [Guids]
   gEfiNormalSetupGuid
   gEfiPartTypeSystemPartGuid
   gEfiEndOfDxeEventGroupGuid
+  gUefiShellFileGuid
 
 [Pcd]
   gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKeyFileGuid
@@ -111,7 +114,6 @@ [Pcd]
   gPlatformModuleTokenSpaceGuid.PcdFlashFvShellSize
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
   gPlatformModuleTokenSpaceGuid.PcdIFWISigBaseAddress
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
index b875041880..3034853695 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
@@ -1,7 +1,7 @@
 /** @file
   BDS Lib functions which relate with create or process the boot option.
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -2342,7 +2342,7 @@ BdsLibBootViaBootOption (
     //
     // If the boot option point to Internal FV shell, make sure it is valid
     //
-    Status = BdsLibUpdateFvFileDevicePath (&DevicePath, PcdGetPtr(PcdShellFile));
+    Status = BdsLibUpdateFvFileDevicePath (&DevicePath, &gUefiShellFileGuid);
     if (!EFI_ERROR(Status)) {
       if (Option->DevicePath != NULL) {
         FreePool(Option->DevicePath);
@@ -3544,7 +3544,7 @@ BdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
@@ -3629,7 +3629,7 @@ BdsLibBuildOptionFromShell (
   //
   // Build the shell device path
   //
-  EfiInitializeFwVolDevicepathNode (&ShellNode, PcdGetPtr(PcdShellFile));
+  EfiInitializeFwVolDevicepathNode (&ShellNode, &gUefiShellFileGuid);
 
   DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *) &ShellNode);
 
diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
index a978b5cbfa..e3c8a6fa27 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
@@ -6,7 +6,7 @@
 #  2) BDS boot device connect interface;
 #  3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
 #  
-#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #  
 ##
@@ -43,6 +43,7 @@ [Packages]
   MdeModulePkg/MdeModulePkg.dec
   IntelFrameworkPkg/IntelFrameworkPkg.dec
   IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+  ShellPkg/ShellPkg.dec
 
 [LibraryClasses]
   DevicePathLib
@@ -98,6 +99,7 @@ [Guids]
   ## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder"
   gEfiLegacyDevOrderVariableGuid
   gEdkiiStatusCodeDataTypeVariableGuid          ## SOMETIMES_CONSUMES ## GUID
+  gUefiShellFileGuid
 
 [Protocols]
   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES
@@ -131,7 +133,6 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad  ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable      ## CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile      ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed                       ## CONSUMES
 
 #
-- 
2.21.0.windows.1


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

* [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (5 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
                   ` (9 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Update DSC files to build full UEFI Shell from sources.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 20 ++++++++++++++++++--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 22 ++++++++++++++++++----
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 22 ++++++++++++++++++----
 3 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 4a10840c5c..eb1a732683 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -274,7 +274,6 @@ [LibraryClasses.common]
 !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
@@ -1378,7 +1377,24 @@ [Components.X64]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index a99a5dfd5a..d1144db9d9 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -274,10 +274,7 @@ [LibraryClasses.common]
 !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
-  HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE
@@ -1368,7 +1365,24 @@ [Components.IA32]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 0fac892bd5..1784554160 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -274,10 +274,7 @@ [LibraryClasses.common]
 !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
-  HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE
@@ -1380,7 +1377,24 @@ [Components.X64]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
-- 
2.21.0.windows.1


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

* [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (6 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
                   ` (8 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Use CpuDxe module from UefiCPuPkg instead of pre-built
binary module MpCpu.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf       |  2 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    |  2 +-
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc |  8 ++++++--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   |  7 +++++--
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 10 ++++++++--
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index be05fa136b..c725cdcf31 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -458,7 +458,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MpCpu.inf
+INF UefiCpuPkg/CpuDxe/CpuDxe.inf
 INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index d3c7409c4b..349fbb2887 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -414,7 +414,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MpCpu.inf
+INF UefiCpuPkg/CpuDxe/CpuDxe.inf
 INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index eb1a732683..44a5806153 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1087,6 +1089,7 @@ [Components.X64]
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
       MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
       HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+      CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
       DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
 !endif
@@ -1304,6 +1307,7 @@ [Components.X64]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index d1144db9d9..bff0fe21af 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1292,6 +1294,7 @@ [Components.IA32]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 1784554160..7630b48ea6 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -275,6 +276,8 @@ [LibraryClasses.common]
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+  ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+  HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE
@@ -316,7 +319,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1087,6 +1091,7 @@ [Components.X64]
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
       MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
       HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+      CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
       DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
 !endif
@@ -1304,6 +1309,7 @@ [Components.X64]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
-- 
2.21.0.windows.1


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

* [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (7 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
                   ` (7 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Add the PcdInitSmm module that should not have been
removed.  This module performs actions at Exit Boot
Services to place devices in an OS compatible state.
Wothout this module, so versions of Linux are not
bootable.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf       | 1 +
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    | 1 +
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 3 +++
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 2 ++
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 2 ++
 5 files changed, 9 insertions(+)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index c725cdcf31..098602b9d8 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -517,6 +517,7 @@ [FV.FVMAIN]
 
 !if $(MINNOW2_FSP_BUILD) == FALSE
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
 !endif
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 349fbb2887..40385794a3 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -473,6 +473,7 @@ [FV.FVMAIN]
 
 !if $(MINNOW2_FSP_BUILD) == FALSE
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
 !endif
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 44a5806153..b9faf558b7 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1193,6 +1193,8 @@ [Components.X64]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+  $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
@@ -1449,6 +1451,7 @@ [Components.X64]
   }
 
 
+
 !if $(NETWORK_ENABLE) == TRUE
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
     NetworkPkg/IScsiDxe/IScsiDxe.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index bff0fe21af..2324794841 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1180,6 +1180,8 @@ [Components.IA32]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+  $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 7630b48ea6..10d44d5652 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1195,6 +1195,8 @@ [Components.X64]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+  $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
-- 
2.21.0.windows.1


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

* [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (8 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
                   ` (6 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Library/PlatformBdsLib/BdsPlatform.c      | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
index e86c6b3e2e..4d5997d6e9 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
                                                                                    
   SPDX-License-Identifier: BSD-2-Clause-Patent
                                                                                    
@@ -1702,6 +1702,8 @@ PlatformBdsPolicyBehavior (
     EsrtManagement = NULL;
   }
 
+  DEBUG ((DEBUG_INFO, "BDS: BootMode=%02x\n", BootMode));
+
   switch (BootMode) {
 
   case BOOT_WITH_MINIMAL_CONFIGURATION:
@@ -1778,9 +1780,8 @@ PlatformBdsPolicyBehavior (
       goto FULL_CONFIGURATION;
     }
 
-    if (SystemConfiguration.QuietBoot) {
-      EnableQuietBoot (PcdGetPtr(PcdLogoFile));
-    } else {
+    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    if (!SystemConfiguration.QuietBoot) {
       PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
     }
 
@@ -1864,8 +1865,7 @@ PlatformBdsPolicyBehavior (
     // Boot with the specific configuration
     //
     PlatformBdsConnectConsole (gPlatformConsole);
-    PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest);
-    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    PlatformBdsDiagnostics (EXTENSIVE, TRUE, BaseMemoryTest);
 
     DEBUG((DEBUG_INFO, "ProcessCapsules Before EndOfDxe......\n"));
     ProcessCapsules ();
@@ -1968,10 +1968,9 @@ FULL_CONFIGURATION:
     // Perform some platform specific connect sequence
     //
     PlatformBdsConnectSequence ();
-    if (SystemConfiguration.QuietBoot) {
-        EnableQuietBoot (PcdGetPtr(PcdLogoFile));
-    } else {
-        PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
+    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    if (!SystemConfiguration.QuietBoot) {
+      PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
     }
 
     //
-- 
2.21.0.windows.1


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

* [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (9 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
                   ` (5 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Update the binary file that contains the default configuration
settings.  This file is generated using FCE.exe during a
Windows build and this binary file needs to be updated when
there are changes to the configuration setting layout or
configuration setting default values.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf          |   7 ++++---
 .../Stitch/Gcc/NvStorageVariable.bin          | Bin 253952 -> 253952 bytes
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 40385794a3..1ba6124a69 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -119,15 +119,15 @@ [FD.Vlv]
 FV = MICROCODE_FV
 $(FLASH_REGION_VPD_OFFSET)|$(FLASH_REGION_VPD_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
 
 $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
 
 $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
 
 !if $(MINNOW2_FSP_BUILD) == TRUE
 
@@ -633,6 +633,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
 !endif
 
+
   #
   # SMBIOS
   #
diff --git a/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin b/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
index 6aa2bb5aa530caf0a4a7744a398b16076a9e957f..7f8688b099f1e70491f16161a98c7b53c6b7a412 100644
GIT binary patch
delta 127
zcmZoTz~69ye?o_@9s>hI0uuv+yZV&bexjPbOU(8cGMw0I?a2_pV8Rg3;LPC9;K$&`
z;K|_5V6?fJv65->ItjJS5sVAiHWzR&;o1Cyy@Hw52xv;mWJ!sslVv4EfC{u2=Wf0!
eQNTR;r<C}_2d2$|GVOsfj6lq^Jy3=@`XB%=8zwja

delta 139
zcmZoTz~69ye?o_=0Rsa=5)j*Oy~?@aOQipTjn(0oWB6EI8PXUs8T^1anZc8xfWd^p
znIWGc4=kF_5XO+mPz01q1nSLUNS$~wb+aDxF}BS!#44CKf8kuhGg&~2g)v~VsMOTS
k`=qoO12?~vDqwEjDA&GGjuD8Nwr`YU_CL7!fLsO>0ART*X#fBK

-- 
2.21.0.windows.1


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

* [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (10 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
                   ` (4 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

In preparation for moving Vlv2TbltDevicePkg to the
edk2-platforms repository, the batch scripts used to build
this platform are updated to not make any assumptions about
the directory location of Vlv2TbltDevicePkg.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/.gitignore            |   2 +
 Vlv2TbltDevicePkg/Build_IFWI.bat        |  31 +++-
 Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat |  23 ++-
 Vlv2TbltDevicePkg/bldX64.bat            | 216 ------------------------
 Vlv2TbltDevicePkg/bld_vlv.bat           | 129 ++++++++------
 Vlv2TbltDevicePkg/bld_vlv.sh            |   3 +-
 6 files changed, 124 insertions(+), 280 deletions(-)
 delete mode 100644 Vlv2TbltDevicePkg/bldX64.bat

diff --git a/Vlv2TbltDevicePkg/.gitignore b/Vlv2TbltDevicePkg/.gitignore
index b4699122b8..c7698262ad 100644
--- a/Vlv2TbltDevicePkg/.gitignore
+++ b/Vlv2TbltDevicePkg/.gitignore
@@ -1,3 +1,5 @@
 AutoPlatformCFG.txt
 Stitch/Stitching.log
 Stitch/MNW*.bin
+Stitch/MNW*.rom
+Stitch/MNW*.rom.orig
diff --git a/Vlv2TbltDevicePkg/Build_IFWI.bat b/Vlv2TbltDevicePkg/Build_IFWI.bat
index 9a3063397e..887206703a 100644
--- a/Vlv2TbltDevicePkg/Build_IFWI.bat
+++ b/Vlv2TbltDevicePkg/Build_IFWI.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
 @REM SPDX-License-Identifier: BSD-2-Clause-Patent
 @REM
 
@@ -18,11 +18,26 @@ set exitCode=0
 set "Build_Flags= "
 set "Stitch_Flags= "
 set Arch=X64
-set WORKSPACE=%CD%
-set CORE_PATH=%WORKSPACE%\edk2
-set PLATFORM_PATH=%WORKSPACE%\edk2
 set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
+set PLATFORM_PATH=%WORKSPACE%
+if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\%PLATFORM_PACKAGE% (
+        set PLATFORM_PATH=%%~fi
+        goto PlatformPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!!
+    echo.
+    goto Exit
+  )
+)
+:PlatformPackageFound
+
 :: Parse Optional arguments
 :OptLoop
 if /i "%~1"=="/?" goto Usage
@@ -125,11 +140,11 @@ if %ERRORLEVEL% NEQ 0 (
 echo.
 echo Finished Building BIOS.
 @REM Set BIOS_ID environment variable here.
-call %CORE_PATH%\Conf\BiosId.bat
+call %WORKSPACE%\Conf\BiosId.bat
 echo BIOS_ID=%BIOS_ID%
 
 :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables
-find /v "#" %CORE_PATH%\Conf\BiosId.env > ver_strings
+find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
 for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j
 del /f/q ver_strings >nul
 set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
@@ -137,10 +152,10 @@ set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
 :: Start Integration process
 echo ======================================================================
 echo Build_IFWI:  Calling IFWI Stitching Script...
-pushd %CORE_PATH%\%PLATFORM_PACKAGE%\Stitch
+pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch
 
   :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/S IFWISuffix]
-  call IFWIStitch.bat %Stitch_Flags% /B ..\..\%BIOS_Name% %IFWI_Suffix%
+  call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix%
    
  @echo off
 popd
diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
index 7c3ebbd1c6..200ca05a23 100644
--- a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
+++ b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006   - 2014, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006   - 2019, Intel Corporation. All rights reserved.<BR>
 @REM 
 @REM   SPDX-License-Identifier: BSD-2-Clause-Patent
 @REM
@@ -9,6 +9,25 @@
 @echo off
 SetLocal EnableDelayedExpansion EnableExtensions
 
+set PLATFORM_BIN_PACKAGE=%WORKSPACE%\Vlv2SocBinPkg
+if not exist %PLATFORM_BIN_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\Vlv2SocBinPkg (
+        set PLATFORM_BIN_PACKAGE=%%~fi\Vlv2SocBinPkg
+        goto PlatformBinPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
+    echo.
+    goto BldFail
+  )
+)
+:PlatformBinPackageFound
+
+
 :: Set script defaults
 set exitCode=0
 set BackupRom=1
@@ -185,7 +204,7 @@ for %%i in (%BIOS_Names%) do (
     echo Generating IFWI... %BIOS_ID%.bin
     echo.
 
-    copy /b/y !IFWI_HEADER_FILE! + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\Vacant.bin + !BIOS_Rom! %BIOS_ID%.bin
+    copy /b/y !IFWI_HEADER_FILE! + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\Vacant.bin + !BIOS_Rom! %BIOS_ID%.bin
     echo.
     echo ===========================================================================
 )
diff --git a/Vlv2TbltDevicePkg/bldX64.bat b/Vlv2TbltDevicePkg/bldX64.bat
deleted file mode 100644
index 50dc5b1f07..0000000000
--- a/Vlv2TbltDevicePkg/bldX64.bat
+++ /dev/null
@@ -1,216 +0,0 @@
-@REM @file
-@REM   Windows batch file to build BIOS ROM
-@REM
-@REM Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-@REM SPDX-License-Identifier: BSD-2-Clause-Patent
-@REM
-
-@echo off
-@echo.
-@time /t
-
-@if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log
-@if exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log
-@if exist %WORKSPACE%\Conf\build_rule.txt del %WORKSPACE%\Conf\build_rule.txt
-@if exist %WORKSPACE%\Conf\FrameworkDatabase.db del %WORKSPACE%\Conf\FrameworkDatabase.db
-@if exist %WORKSPACE%\Conf\target.txt del %WORKSPACE%\Conf\target.txt
-@if exist %WORKSPACE%\Conf\tools_def.txt del %WORKSPACE%\Conf\tools_def.txt
-@if exist conf\.cache rmdir /q /s conf\.cache
-
-@set target=DEBUG
-
-@if /i "%1" == "release" set TARGET=RELEASE
-@if /i "%2" == "release" set TARGET=RELEASE
-@if /i "%3" == "release" set TARGET=RELEASE
-@if /i "%4" == "release" set TARGET=RELEASE
-@if /i "%5" == "release" set TARGET=RELEASE
-
-@set PlatformType=NO_PLATFORM
-@set config_file=.\Vlv2TbltDevicePkg\PlatformPkgConfig.dsc
-@set EVN_debug_file=.\Vlv2TbltDevicePkg\BiosIdx64D.env
-@set EVN_release_file=.\Vlv2TbltDevicePkg\BiosIdx64R.env
-@set auto_config_inc=.\Vlv2TbltDevicePkg\AutoPlatformCFG.txt
-
-@if  "%1" == "MNW2" (
-  set %PlatformType% = MNW2
-  @echo  Setting Baley Bay platform configration and BIOS ID ...
-  findstr /b /v BOARD_ID %EVN_debug_file% > newfile.env
-  echo BOARD_ID = MNW2MAX >> newfile.env
-  type newfile.env > %EVN_debug_file%
-  findstr /b /v BOARD_ID %EVN_release_file% > newfile.env
-  echo BOARD_ID = MNW2MAX >> newfile.env
-  type newfile.env > %EVN_release_file%
-  echo DEFINE ENBDT_PF_BUILD = TRUE  >> %auto_config_inc%
-  echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
-  goto PLATFORM_SETTING_DONE
-)  
-
-@if  "%PlatformType%" == "NO_PLATFORM" (
-  goto BldFail
-)
-
-rem clearup the temp file
-:PLATFORM_SETTING_DONE
-@DEL NEWFILE.ENV
-@DEL NEWFILE.CFG
-
-@REM Define platform specific environment variables.
-@REM
-@set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
-@set SCRIPT_ERROR=0
-
-@REM Set basic environment.
-@echo.
-@echo Run edksetup.bat batch file.
-@echo.
-@del Conf\build_rule.txt
-@REM @del Conf\tools_def.txt
-@call edksetup.bat
-
-
-@echo.
-@echo Set the VS2008 environment.
-@echo.
-@if defined VS90COMNTOOLS (
-  if not defined VSINSTALLDIR call "%VS90COMNTOOLS%\vsvars32.bat"
-  if /I "%VS90COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\" (
-    set TOOL_CHAIN_TAG=VS2008
-  ) else (
-    set TOOL_CHAIN_TAG=VS2008x86
-  )
-) else (
-  echo.
-  echo !!! ERROR !!! VS2008 not installed correctly. VS90COMNTOOLS not defined. !!!
-  echo.
-  set SCRIPT_ERROR=1
-  goto :BldEnd
-)
-
-@echo.
-@echo Set build environment.
-@echo.
-@if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG% (
-  mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%
-)
-
-
-@REM Set clean build option
-@set CLEAN_BUILD_OPTION=-e
-
-@findstr /V "ACTIVE_PLATFORM TARGET TARGET_ARCH TOOL_CHAIN_TAG BUILD_RULE_CONF" Conf\target.txt > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-
-@echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkgX64.dsc     >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TARGET          = %TARGET%                                  >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TARGET_ARCH     = IA32 X64                                  >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                          >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo BUILD_RULE_CONF = Conf/build_rule.txt                       >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@move /Y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt Conf
-
-
-
-@echo.
-@echo Create BiosIdx64.
-@echo.
-@if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64 (
-  mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64
-)
-
-@if "%TARGET%" == "DEBUG" (
-  set BIOS_ID_FILE=BiosIdx64D.env
-
-) else (
-  set BIOS_ID_FILE=BiosIdx64R.env
-
-)
-
-
-GenBiosId.exe -i %PLATFORM_PACKAGE%\%BIOS_ID_FILE% -o Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64\BiosId.bin
-@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-@echo off
-echo Copy reference code ASL files.
-
-
-@if /i "/s" == "%1" goto BldSilent
-@if /i "/s" == "%2" goto BldSilent
-@if /i "/s" == "%3" goto BldSilent
-@if /i "/s" == "%4" goto BldSilent
-@if /i "/s" == "%5" goto BldSilent
-
-build -n %NUMBER_OF_PROCESSORS%
-@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-@If %SCRIPT_ERROR% EQU 1 goto BldFail
-@goto BldSuccess
-
-:BldSilent
-
-build -n %NUMBER_OF_PROCESSORS% 1>>EDK2.log 2>&1
-@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-
-@If %SCRIPT_ERROR% EQU 1 goto BldFail
-
-:BldSuccess
-@echo off
-del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1
-del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt 1>>EDK2.log 2>&1
-copy /y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd     Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1
-
-@echo.
-@echo Extract setup default value from VFR (Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt)
-@echo.
-fce read -i Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt
-
-
-@echo Update FD with default Hii value successfully! (both 'Setup' and 'SetupDefault')
-@echo.
-fce mirror -i Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd -o Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.fd Setup SetupDefault 1>>EDK2.log 2>&1
-
-@echo off
-del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd
-del Vlv2TbltDevicePkg\RomImage\bios.rom
-if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM goto Gen8MImage
-del /q /f Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\*
-rd /Q Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-:Gen8MImage
-
-copy /b Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.fd Vlv2TbltDevicePkg\RomImage\bios.rom
-
-pushd Vlv2TbltDevicePkg\RomImage\
-@if "%TARGET%" == "DEBUG" (
-    call signbiosX64_debug.bat
-) else (
-    call signbiosX64_release.bat
-)
-
-call ftoolbuild.bat
-call ftoolbuild_sec_enable.bat
-popd
-
-@echo off
-mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-move Vlv2TbltDevicePkg\RomImage\SPI_Image\* Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\ > NUL
-
-call GenBIOS.bat X64
-
-@echo on
-
-@echo TARGET:               %TARGET%
-@echo TOOL_CHAIN_TAG:       %TOOL_CHAIN_TAG%
-@echo BIOS location:        Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV
-@echo SPI Images location:  Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-@echo.
-@echo The EDKII BIOS build has successfully completed!
-@echo.
-@goto BldEnd
-
-:BldFail
-@echo.
-@echo The EDKII BIOS Build has failed!
-@echo.
-exit /b 1
-
-:BldEnd
-@time /t
-exit /b 0
diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.bat
index c5314833c0..dcc8b1a95a 100644
--- a/Vlv2TbltDevicePkg/bld_vlv.bat
+++ b/Vlv2TbltDevicePkg/bld_vlv.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
 @REM SPDX-License-Identifier: BSD-2-Clause-Patent
 @REM
 
@@ -15,25 +15,60 @@ echo.
 ::**********************************************************************
 :: Initial Setup
 ::**********************************************************************
-set WORKSPACE=%CD%
 if %WORKSPACE:~-1%==\ set WORKSPACE=%WORKSPACE:~0,-1%
 set /a build_threads=1
 set "Build_Flags= "
 set exitCode=0
 set Arch=X64
 set Source=0
-set CORE_PATH=%WORKSPACE%\edk2
-set PLATFORM_PATH=%WORKSPACE%\edk2
-cd ./edk2
+set PLATFORM_NAME=Vlv2TbltDevicePkg
+
+set CORE_PATH=%WORKSPACE%
+if not exist %CORE_PATH%\edksetup.bat (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\edksetup.bat (
+        set CORE_PATH=%%~fi
+        goto CorePathFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find edksetup.bat !!!
+    echo.
+    goto BldFail
+  )
+)
+:CorePathFound
+
+set PLATFORM_PACKAGE=%WORKSPACE%\%PLATFORM_NAME%
+if not exist %PLATFORM_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\%PLATFORM_NAME% (
+        set PLATFORM_PACKAGE=%%~fi\%PLATFORM_NAME%
+        goto PlatformPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
+    echo.
+    goto BldFail
+  )
+)
+:PlatformPackageFound
+
+cd %CORE_PATH%
 
 :: Clean up previous build files.
-if exist %CORE_PATH%\edk2.log del %CORE_PATH%\edk2.log
-if exist %CORE_PATH%\unitool.log del %CORE_PATH%\unitool.log
-if exist %CORE_PATH%\Conf\target.txt del %CORE_PATH%\Conf\target.txt
-if exist %CORE_PATH%\Conf\tools_def.txt del %CORE_PATH%\Conf\tools_def.txt
-if exist %CORE_PATH%\Conf\build_rule.txt del %CORE_PATH%\Conf\build_rule.txt
-if exist %CORE_PATH%\Conf\FrameworkDatabase.db del %CORE_PATH%\Conf\FrameworkDatabase.db
-if exist conf\.cache rmdir /q/s conf\.cache
+if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log
+if exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log
+if exist %WORKSPACE%\Conf\target.txt del %WORKSPACE%\Conf\target.txt
+if exist %WORKSPACE%\Conf\tools_def.txt del %WORKSPACE%\Conf\tools_def.txt
+if exist %WORKSPACE%\Conf\build_rule.txt del %WORKSPACE%\Conf\build_rule.txt
+if exist %WORKSPACE%\Conf\FrameworkDatabase.db del %WORKSPACE%\Conf\FrameworkDatabase.db
+if exist %WORKSPACE%\Conf\.cache rmdir /q/s %WORKSPACE%\Conf\.cache
 
 :: Setup EDK environment. Edksetup puts new copies of target.txt, tools_def.txt, build_rule.txt in WorkSpace\Conf
 :: Also run edksetup as soon as possible to avoid it from changing environment variables we're overriding
@@ -41,8 +76,6 @@ call %CORE_PATH%\edksetup.bat Rebuild
 @echo off
 
 :: Define platform specific environment variables.
-set PLATFORM_NAME=Vlv2TbltDevicePkg
-set PLATFORM_PACKAGE=%PLATFORM_PATH%\Vlv2TbltDevicePkg
 set config_file=%PLATFORM_PACKAGE%\PlatformPkgConfig.dsc
 set auto_config_inc=%PLATFORM_PACKAGE%\AutoPlatformCFG.txt
 
@@ -82,9 +115,9 @@ if /i "%~1" == "/c" (
         del /f/s/q build > nul
         rmdir /s/q build
     )
-    if exist conf\.cache (
-        del /f/s/q conf\.cache > nul
-        rmdir /s/q conf\.cache
+    if exist %WORKSPACE%\Conf\.cache (
+        del /f/s/q %WORKSPACE%\Conf\.cache > nul
+        rmdir /s/q %WORKSPACE%\Conf\.cache
     )
     echo.
     shift
@@ -107,17 +140,17 @@ if "%~1"=="" goto Usage
 
 ::Remove the values for Platform_Type and Build_Target from BiosIdX.env and stage in Conf\
 if "%Arch%"=="IA32" (
-    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > Conf\BiosId.env
+    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > %WORKSPACE%\Conf\BiosId.env
     echo DEFINE X64_CONFIG = FALSE  >> %auto_config_inc%
 ) else if "%Arch%"=="X64" (
-    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env > Conf\BiosId.env
+    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env > %WORKSPACE%\Conf\BiosId.env
     echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
 )
 
 :: -- Build flags settings for each Platform --
 echo Setting  %1  platform configuration and BIOS ID...
 if /i "%~1" == "MNW2" (
-    echo BOARD_ID = MNW2MAX >> Conf\BiosId.env
+    echo BOARD_ID = MNW2MAX >> %WORKSPACE%\Conf\BiosId.env
     echo DEFINE ENBDT_PF_BUILD = TRUE   >> %auto_config_inc%
     
 ) else (
@@ -128,10 +161,10 @@ set Platform_Type=%~1
 
 if /i "%~2" == "RELEASE" (
     set target=RELEASE
-    echo BUILD_TYPE = R >> Conf\BiosId.env
+    echo BUILD_TYPE = R >> %WORKSPACE%\Conf\BiosId.env
 ) else (
     set target=DEBUG
-    echo BUILD_TYPE = D >> Conf\BiosId.env
+    echo BUILD_TYPE = D >> %WORKSPACE%\Conf\BiosId.env
 )
 
 ::**********************************************************************
@@ -181,43 +214,40 @@ if defined VS140COMNTOOLS (
 )
 
 echo Ensuring correct build directory is present for GenBiosId...
-set BUILD_PATH=Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
+set BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
 
 echo Modifing Conf files for this build...
 :: Remove lines with these tags from target.txt
-findstr /V "TARGET  TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF  ACTIVE_PLATFORM  MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt > Conf\target.txt.tmp
+findstr /V "TARGET  TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF  ACTIVE_PLATFORM  MAX_CONCURRENT_THREAD_NUMBER" %WORKSPACE%\Conf\target.txt > %WORKSPACE%\Conf\target.txt.tmp
 
-echo TARGET          = %TARGET%                                  >> Conf\target.txt.tmp
+echo TARGET          = %TARGET%                                  >> %WORKSPACE%\Conf\target.txt.tmp
 if "%Arch%"=="IA32" (
-    echo TARGET_ARCH = IA32                                       >> Conf\target.txt.tmp
+    echo TARGET_ARCH = IA32                                       >> %WORKSPACE%\Conf\target.txt.tmp
 ) else if "%Arch%"=="X64" (
-    echo TARGET_ARCH = IA32 X64                                  >> Conf\target.txt.tmp
+    echo TARGET_ARCH = IA32 X64                                  >> %WORKSPACE%\Conf\target.txt.tmp
 )
-echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                                  >> Conf\target.txt.tmp
-echo BUILD_RULE_CONF = Conf/build_rule.txt                               >> Conf\target.txt.tmp
+echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                                  >> %WORKSPACE%\Conf\target.txt.tmp
+echo BUILD_RULE_CONF = Conf/build_rule.txt                               >> %WORKSPACE%\Conf\target.txt.tmp
 if %Source% == 0 (
-  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >> Conf\target.txt.tmp
+  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >> %WORKSPACE%\Conf\target.txt.tmp
 ) else (
-  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc  >> Conf\target.txt.tmp
+  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc  >> %WORKSPACE%\Conf\target.txt.tmp
 )
-echo MAX_CONCURRENT_THREAD_NUMBER = %build_threads%                      >> Conf\target.txt.tmp
+echo MAX_CONCURRENT_THREAD_NUMBER = %build_threads%                      >> %WORKSPACE%\Conf\target.txt.tmp
 
-move /Y Conf\target.txt.tmp Conf\target.txt >nul
+move /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt >nul
 
 ::**********************************************************************
 :: Build BIOS
 ::**********************************************************************
 
 echo Creating BiosId...
-pushd %PLATFORM_PACKAGE%
-if not exist %WORKSPACE%\%BUILD_PATH%\IA32  mkdir %WORKSPACE%\%BUILD_PATH%\IA32
-  GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -o %WORKSPACE%\%BUILD_PATH%\IA32\BiosId.bin -ob %CORE_PATH%\Conf\BiosId.bat
+if not exist %BUILD_PATH%\IA32  mkdir %BUILD_PATH%\IA32
+%PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
 if "%Arch%"=="X64" (
-   if not exist %WORKSPACE%\%BUILD_PATH%\X64  mkdir %WORKSPACE%\%BUILD_PATH%\X64
-   GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -o %WORKSPACE%\%BUILD_PATH%\X64\BiosId.bin -ob %CORE_PATH%\Conf\BiosId.bat
+   if not exist %BUILD_PATH%\X64  mkdir %BUILD_PATH%\X64
+   %PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUILD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
 )
-popd
-
 
 if %ERRORLEVEL% NEQ 0 goto BldFail
 
@@ -235,23 +265,23 @@ echo Running fce...
 
 pushd %PLATFORM_PACKAGE%
 :: Extract Hii data from build and store in HiiDefaultData.txt
-fce read -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd > %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt
+%PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd > %BUILD_PATH%\FV\HiiDefaultData.txt
 
 :: save changes to VlvXXX.fd
-fce update -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd -s %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt -o %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd
+%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s %BUILD_PATH%\FV\HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv%Arch%.fd
 popd
 
 if %ERRORLEVEL% NEQ 0 goto BldFail
 ::echo FD successfully updated with default Hii values.
 
 :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables
-find /v "#" Conf\BiosId.env > ver_strings
+find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
 for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j
 del /f/q ver_strings >nul
 
 set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
-copy /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %PLATFORM_PATH%\%BIOS_Name% >nul
-copy /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %WORKSPACE%\%BUILD_PATH%\FV\Vlv.ROM >nul
+copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd  %PLATFORM_PACKAGE%\Stitch\%BIOS_Name% >nul
+copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd  %BUILD_PATH%\FV\Vlv.ROM >nul
 
 echo.
 echo Build location:     %BUILD_PATH%
@@ -261,13 +291,8 @@ echo -------------------- The EDKII BIOS build has successfully completed. -----
 echo.
 
 @REM build capsule here
-@REMif "%openssl_path%" == "" (
-@REM    echo -- Error:  OPENSSL_PATH not set.  Capule and Recovery images not generated.
-@REM    set exitCode=1
-@REM    goto Exit
-@REM
-@REM echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
-@REM build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
+build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
 
 goto Exit
 
diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh
index 51d3acacb4..ec3a325db7 100755
--- a/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -242,9 +242,8 @@ VERSION_MINOR=$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c
 BOARD_ID=$(grep '^BOARD_ID' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-7)
 BIOS_Name="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR".ROM
 BIOS_ID="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR"_GCC.bin
-cp -f $BUILD_PATH/FV/VLV.fd  $WORKSPACE/$BIOS_Name
 SEC_VERSION=1.0.2.1060v5
-cat $IFWI_HEADER_FILE ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/Vacant.bin $BIOS_Name > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
+cat $IFWI_HEADER_FILE ../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin ../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/Vacant.bin $BUILD_PATH/FV/VLV.fd > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
 
 
 echo Skip "Running BIOS_Signing ..."
-- 
2.21.0.windows.1


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

* [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (11 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
                   ` (3 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Preserve the UEFI Variable store when a capsule update is
performed.  UEFI Variables are used to store firmware version
information for the sample devices (Red, Green, Blue).

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
index 3d5649164b..a863d69381 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
@@ -1,8 +1,8 @@
 /**
 
-Copyright (c) 2016, Microsoft Corporation
+Copyright (c) 2016, Microsoft Corporation.  All rights reserved.
+Copyright (c) 2019, Intel Corporation.  All rights reserved.
 
-All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -36,8 +36,7 @@ UPDATE_CONFIG_DATA mUpdateConfigData[] = {
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x000C0000, 0x00050000, 0x000C0000 },
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00110000, 0x00210000, 0x00110000 },
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00320000, 0x00070000, 0x00320000 },
-  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 },
-  { PlatformFirmwareTypeNvRam,          FlashAddressTypeRelativeAddress, 0x00040000, 0x00080000, 0x00040000 }
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 }
 };
 
 /**
-- 
2.21.0.windows.1


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

* [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (12 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
                   ` (2 subsequent siblings)
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Remove path to openssl tools from batch scripts.  Instead,
the path to the openssl tools must be included in PATH for
a build to complete.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat     | 2 --
 .../Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat      | 2 --
 .../Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat   | 2 --
 3 files changed, 6 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
index 80f9be7fb8..50ebb160ee 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
@@ -69,7 +69,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^
@@ -106,7 +105,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
index c6c78f0285..9d08c86717 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
@@ -69,7 +69,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^
@@ -106,7 +105,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
index ba4bc0f081..3e9f94c530 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
@@ -73,7 +73,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^
@@ -110,7 +109,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
-- 
2.21.0.windows.1


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

* [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (13 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  2019-05-09  4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
  2019-05-09 13:18 ` [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Qian, Yi
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Add batch scripts to generate the LVFS compatible capsule
update driver.

Add DSC/FDF files to build capsules and invoke post build
shell scripts for Linux build environments.

Make versions consistent.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Capsule/GenerateCapsule/GenCapsuleAll.bat |  12 +-
 .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  28 ++++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat   |   4 +-
 .../GenerateCapsule/GenCapsuleMinnowMax.sh    |  65 ++++++++
 .../GenCapsuleMinnowMaxRelease.bat            |   4 +-
 .../GenCapsuleMinnowMaxRelease.sh             |  65 ++++++++
 .../GenerateCapsule/GenCapsuleSampleColor.sh  |  70 +++++++++
 .../Feature/Capsule/GenerateCapsule/Lvfs.ddf  |  14 ++
 .../LvfsGenCapsuleMinnowMax.bat               | 139 +++++++++++++++++
 .../LvfsGenCapsuleMinnowMaxRelease.bat        | 139 +++++++++++++++++
 .../LvfsGenCapsuleSampleColor.bat             | 145 ++++++++++++++++++
 .../GenerateCapsule/template.metainfo.xml     |  27 ++++
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc      |  38 +++++
 13 files changed, 743 insertions(+), 7 deletions(-)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
 create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
index 187797e284..8f589565fa 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
@@ -24,6 +24,12 @@ copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.efi %W
 
 call GenCapsuleMinnowMax.bat
 call GenCapsuleMinnowMaxRelease.bat
-call GenCapsuleSampleColor.bat Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
-call GenCapsuleSampleColor.bat Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
-call GenCapsuleSampleColor.bat Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
+call GenCapsuleSampleColor.bat Blue  149da854-7d19-4faa-a91e-862ea1324be6
+call GenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c18a
+call GenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-075ad840f9d4
+
+call LvfsGenCapsuleMinnowMax.bat
+call LvfsGenCapsuleMinnowMaxRelease.bat
+call LvfsGenCapsuleSampleColor.bat Blue  149da854-7d19-4faa-a91e-862ea1324be6
+call LvfsGenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c18a
+call LvfsGenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-075ad840f9d4
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
new file mode 100644
index 0000000000..040024553a
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
@@ -0,0 +1,28 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware and
+#   firmware for sample devices
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+cd $(dirname $0)
+
+rm -R $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleApp.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleAppRelease.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleApp.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleAppRelease.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleApp.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleAppRelease.efi
+
+. GenCapsuleMinnowMax.sh
+. GenCapsuleMinnowMaxRelease.sh
+. GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
+. GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
+. GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
index 50ebb160ee..6e4afd201e 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
@@ -11,8 +11,8 @@ setlocal
 set FMP_CAPSULE_VENDOR=Intel
 set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 set FMP_CAPSULE_FILE=MinnowMax.cap
-set FMP_CAPSULE_VERSION=0x00000009
-set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_STRING=0.0.0.12
 set FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI %FMP_CAPSULE_STRING%"
 set FMP_CAPSULE_LSV=0x00000000
 set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
new file mode 100644
index 0000000000..4fb963c93c
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
@@ -0,0 +1,65 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+FMP_CAPSULE_FILE=MinnowMax.cap
+FMP_CAPSULE_VERSION=0x0000000C
+FMP_CAPSULE_STRING=0.0.0.12
+FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/FV/Vlv.ROM
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate
+#
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+  --signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestCert.pem \
+  --other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestSub.pub.pem \
+  --trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
index 9d08c86717..43c609e4b2 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
@@ -11,8 +11,8 @@ setlocal
 set FMP_CAPSULE_VENDOR=Intel
 set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 set FMP_CAPSULE_FILE=MinnowMaxRelease.cap
-set FMP_CAPSULE_VERSION=0x00000009
-set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_STRING=0.0.0.12
 set FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI %FMP_CAPSULE_STRING%"
 set FMP_CAPSULE_LSV=0x00000000
 set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
new file mode 100644
index 0000000000..29d46dad1e
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
@@ -0,0 +1,65 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+FMP_CAPSULE_FILE=MinnowMaxRelease.cap
+FMP_CAPSULE_VERSION=0x0000000C
+FMP_CAPSULE_STRING=0.0.0.12
+FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/FV/Vlv.ROM
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate
+#
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+  --signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestCert.pem \
+  --other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestSub.pub.pem \
+  --trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
new file mode 100644
index 0000000000..a1c6f28cde
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
@@ -0,0 +1,70 @@
+# @file
+#   Linux script file to generate UEFI capsules for a sample device
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+COLOR=$1
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=$2
+FMP_CAPSULE_FILE=$COLOR.cap
+FMP_CAPSULE_VERSION=0x00000010
+FMP_CAPSULE_STRING=0.0.0.16
+FMP_CAPSULE_NAME="$COLOR Progress Bar $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=Payload.bin
+
+echo "$COLOR Progress Bar" > $FMP_CAPSULE_PAYLOAD
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate
+#
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+  --signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestCert.pem \
+  --other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestSub.pub.pem \
+  --trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
+rm $FMP_CAPSULE_PAYLOAD
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
new file mode 100644
index 0000000000..f2c925a6dd
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
@@ -0,0 +1,14 @@
+.OPTION EXPLICIT ; Generate errors on variable typos
+
+.Set CabinetNameTemplate=firmware.cab ; The name of the file
+.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
+.Set Cabinet=on ;
+.Set Compress=on ;
+.Set DiskDirectory1=.
+.Set MaxDiskSize=99999744               ; multiple of 512
+
+;*** Files to zip ;
+;
+firmware.bin
+firmware.metainfo.xml
+;***
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
new file mode 100644
index 0000000000..dd8274a1cc
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM
+@REM SPDX-License-Identifier: BSD-2-Clause-Patent
+@REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
+set FMP_CAPSULE_BASE_NAME=MinnowMax
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_VERSION_DECIMAL=12
+set FMP_CAPSULE_STRING=0.0.0.12
+set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% DEBUG UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\FV\Vlv.ROM
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
new file mode 100644
index 0000000000..2b68a98f98
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM
+@REM SPDX-License-Identifier: BSD-2-Clause-Patent
+@REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
+set FMP_CAPSULE_BASE_NAME=MinnowMaxRelease
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_VERSION_DECIMAL=12
+set FMP_CAPSULE_STRING=0.0.0.12
+set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% RELEASE UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\FV\Vlv.ROM
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
new file mode 100644
index 0000000000..1dbbe7341d
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
@@ -0,0 +1,145 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for a sample device
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM
+@REM SPDX-License-Identifier: BSD-2-Clause-Patent
+@REM
+
+@echo off
+setlocal
+
+set COLOR=%1
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=%2
+set FMP_CAPSULE_BASE_NAME=%COLOR%
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x00000010
+set FMP_CAPSULE_VERSION_DECIMAL=16
+set FMP_CAPSULE_STRING=0.0.0.16
+set FMP_CAPSULE_NAME="%FMP_CAPSULE_BASE_NAME% Progress Bar %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=Payload.bin
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD%
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
+
+erase %FMP_CAPSULE_PAYLOAD%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
new file mode 100644
index 0000000000..5d550c1f48
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="firmware">
+  <id>com.intel.FMP_CAPSULE_BASE_NAME.firmware</id>
+  <name>FMP_CAPSULE_BASE_NAME</name>
+  <summary>System firmware for the FMP_CAPSULE_BASE_NAME</summary>
+  <description>
+    Description of System firmware for the FMP_CAPSULE_BASE_NAME
+  </description>
+  <provides>
+    <firmware type="flashed">FMP_CAPSULE_GUID</firmware>
+  </provides>
+  <url type="homepage">http://www.tianocore.org</url>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>BSD</project_license>
+  <developer_name>Tianocore</developer_name>
+  <releases>
+    <release version="FMP_CAPSULE_VERSION_DECIMAL" date="FMP_CAPSULE_DATE">
+      <description>
+        Build FMP_CAPSULE_STRING
+      </description>
+    </release>
+  </releases>
+  <!-- most OEMs do not need to do this... -->
+  <custom>
+    <value key="LVFS::InhibitDownload"/>
+  </custom>
+</component>
diff --git a/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
new file mode 100644
index 0000000000..1856ac349b
--- /dev/null
+++ b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
@@ -0,0 +1,38 @@
+#/** @file
+# Platform capsule description.
+#
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#**/
+
+[Defines]
+  PLATFORM_NAME                  = Vlv2TbltDevicePkg
+  PLATFORM_GUID                  = EE87F258-6ECC-4415-B1D8-23771BEE26E7
+  PLATFORM_VERSION               = 0.1
+  FLASH_DEFINITION               = Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
+  OUTPUT_DIRECTORY               = Build/Vlv2TbltDevicePkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+  POSTBUILD                      = Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
+
+###################################################################################################
+#
+# Components Section - list of the modules and components that will be processed by compilation
+#                      tools and the EDK II tools to generate PE32/PE32+/Coff image files.
+#
+# Note: The EDK II DSC file is not used to specify how compiled binary images get placed
+#       into firmware volume images. This section is just a list of modules to compile from
+#       source into UEFI-compliant binaries.
+#       It is the FDF file that contains information on combining binary files into firmware
+#       volume images, whose concept is beyond UEFI and is described in PI specification.
+#       Binary modules do not need to be listed in this section, as they should be
+#       specified in the FDF file. For example: Shell binary, FAT binary (Fat.efi),
+#       Logo (Logo.bmp), and etc.
+#       There may also be modules listed in this section that are not required in the FDF file,
+#       When a module listed here is excluded from FDF file, then UEFI-compliant binary will be
+#       generated for it, but the binary will not be put into any firmware volume.
+#
+###################################################################################################
-- 
2.21.0.windows.1


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

* [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (14 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
@ 2019-05-09  4:31 ` Michael D Kinney
  2019-05-09  7:58   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  2019-05-09 13:18 ` [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Qian, Yi
  16 siblings, 2 replies; 51+ messages in thread
From: Michael D Kinney @ 2019-05-09  4:31 UTC (permalink / raw)
  To: devel; +Cc: Zailiang Sun, Yi Qian

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/Readme.md | 232 +++++++++++++++++++++++++++++-------
 1 file changed, 190 insertions(+), 42 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Readme.md b/Vlv2TbltDevicePkg/Readme.md
index 139aa4ea61..647d0ba361 100644
--- a/Vlv2TbltDevicePkg/Readme.md
+++ b/Vlv2TbltDevicePkg/Readme.md
@@ -1,39 +1,18 @@
 # **EDK II firmware for Minnowboard Max/Turbot which is based on Intel Valleyview2 SoC (Byatrail platform)**
 
 ----------
-
-
-## **How to Create a Full Source Tree for Minnowboard Max/Turbot under Windows**
-### Pre-requisites
+# Windows Pre-requisites
 
 * GIT client: Available from https://git-scm.com/downloads
 
-### Download Source Code
-* Create a new directory C:\WORKSPACE as an EDK II work space.
-
-* GIT clone operations required to pull the EDK II source tree and the edk2-non-osi repository. Run below command in git bash or windows command line.
-
-  - cd C:\WORKSPACE
-  - git clone https://github.com/tianocore/edk2.git
-  - git clone https://github.com/tianocore/edk2-non-osi.git
-  
-    Note: The EDK II [Multiple Workspace](https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace)
-feature is used by this project.
-  
-* Follow the instructions found in the file "OpenSSL-HOWTO.txt" in your work space (e.g. "C:\WORKSPACE\edk2\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt") to install the Openssl source code.
-
-## **Windows Build Instructions**
-
-### Pre-requisites Tools
-
 * Microsoft Visual Studio.
   - Visual Studio 2015 recommended and is used in the examples below. Visual Studio 2013 is also supported.
-  
+
 * WINDDK
   - Download Microsoft Windows Driver Development Kit 3790.1830 and install it to C:\WINDDK\3790.1830.
-  
-* Python 2.7
-  - Available from http://www.python.org. Install Python to C:\Python27, and add the path "C:\Python27" to system environment variable **PYTHON_HOME**.
+
+* Python 3
+  - https://www.python.org/downloads/
 
 * Install iASL
    - Install the iasl compiler by downloading iasl-win-20160527.zip from the following
@@ -42,34 +21,203 @@ feature is used by this project.
    (create the folder "C:\ASL" if it does not exist).
 
 * Install the NASM* assembly language compiler
-   - Download NASM* 2.12.02 binaries from 
+   - Download NASM* 2.12.02 binaries from
    http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-win64.zip and place the
    unzipped content ("nasm.exe") into the directory "C:\NASM" on your local hard drive
    (create the folder "C:\NASM" if it does not exist). Add the path "C:\NASM\" to system environment variable **NASM_PREFIX**.
 
 * Install Openssl
-   - Download a pre-compiled Openssl Windows binary from 
-   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list 
-   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to 
-   download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe 
+   - Download a pre-compiled Openssl Windows binary from
+   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list
+   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to
+   download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe
    ("C:\openssl") to system environment variable **OPENSSL_PATH**.
 
+# Download and Build MinnowMax using Windows/Visual Studio
 
+Run the script below from an empty directory.  The script clones the EDK II
+repository from GitHub and downloads and unzips the binary support files for the
+MinnowBoard MAX.  It then sets up the environment for EDK II builds and builds
+the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to
+update the MinnowBoard MAX firmware and three sample devices.
 
-### Build Commands
-  * cd C:\WORKSPACE\edk2\Vlv2TbltDevicePkg
+```
+git clone --recurse-submodules https://github.com/tianocore/edk2.git
 
-  * To build 64-bit release version image: Build_IFWI.bat MNW2 Release
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile openssl-1.0.2r-x64_86-win64.zip"}"
+powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip
 
-  * To build 64-bit debug version image: Build_IFWI.bat MNW2 Debug
-  
-  * To build 32-bit release version image: Build_IFWI.bat /IA32 MNW2 Release
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip -OutFile MinnowBoardMax-Development190216.zip"}"
+powershell Expand-Archive MinnowBoardMax-Development190216.zip
+sleep 1
+rename MinnowBoardMax-Development190216 Vlv2Binaries
+cd Vlv2Binaries
+powershell Expand-Archive Vlv2SocBinPkg.zip .
+sleep 1
+cd ..
 
-  * To build 32-bit debug version image: Build_IFWI.bat /IA32 MNW2 Debug
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
+powershell Expand-Archive nasm-2.13.03-win64.zip .
 
-### Output
-* After the build process successfully completes, the 8MB firmware binary image will
-be located in the following location on your local hard drive:
-"C:\WORKSPACE\edk2\Vlv2TbltDevicePkg\Stitch\"
+mkdir Conf
 
+set WORKSPACE=%CD%
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
+set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
 
+cd %WORKSPACE%\edk2
+
+call edkSetup.bat Rebuild
+
+cd Vlv2TbltDevicePkg
+
+Build_IFWI.bat /m /y MNW2 Debug
+```
+
+Once all the code and tools are downloaded and installed, only the following
+commands are required to setup the environment.  Run these from the same
+directory used to install the source and binaries.
+
+```
+set WORKSPACE=%CD%
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
+set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
+
+cd %WORKSPACE%\edk2
+
+call edkSetup.bat Rebuild
+```
+
+Once the environment is setup, the MinnowBoard MAX firmware and capsules can be
+rebuilt using the following commands.
+
+* Build Debug Image
+
+```
+cd Vlv2TbltDevicePkg
+Build_IFWI.bat /m /y MNW2 Debug
+```
+
+* Build Release Image
+
+```
+cd Vlv2TbltDevicePkg
+Build_IFWI.bat /m /y MNW2 Release
+```
+
+The generated firmware image is the newest `.bin` file in `edk2/Vlv2TbltDevicePkg/Stitch`.
+The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.
+
+The CapsuleApp and generated UEFI Capsules are in `Build/Vlv2TbltDevicePkg/Capsules`
+
+# Download and Build MinnowMax using Linux/GCC
+
+Run the script below from an empty directory.  The script clones the EDK II
+repository from GitHub and downloads and unzips the binary support files for the
+MinnowBoard MAX.  It then sets up the environment for EDK II builds and builds
+the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to
+update the MinnowBoard MAX firmware and three sample devices.
+
+```
+git clone --recurse-submodules https://github.com/tianocore/edk2.git
+
+mkdir Vlv2Binaries
+cd Vlv2Binaries
+wget https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip
+unzip MinnowBoardMax-Development190216.zip
+unzip Vlv2SocBinPkg.zip
+
+mkdir Conf
+
+export WORKSPACE=$PWD/edk2
+export PACKAGES_PATH=$PWD/Vlv2Binaries
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
+
+cd edk2
+cd Vlv2TbltDevicePkg
+. Build_IFWI.sh MNW2 Debug
+```
+
+Once all the code is downloaded and installed, only the following commands are
+required to setup the environment.  Run these from the same directory used to
+install the source and binaries.
+
+```
+export WORKSPACE=$PWD/edk2
+export PACKAGES_PATH=$PWD/Vlv2Binaries
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
+
+cd edk2
+cd Vlv2TbltDevicePkg
+```
+
+Once the environment is setup, the MinnowBoard MAX firmware and capsules can be
+rebuilt using the following commands.
+
+
+* Build Debug Image
+
+```
+cd Vlv2TbltDevicePkg
+./Build_IFWI.sh MNW2 Debug
+```
+
+* Build Release Image
+
+```
+cd Vlv2TbltDevicePkg
+./Build_IFWI.sh MNW2 Release
+```
+
+The generated firmware image is the `MNW2MAX_X64_D_0084_01_GCC.bin` file in
+`edk2\Vlv2TbltDevicePkg\Stitch`
+
+The CapsuleApp and generated UEFI Capsules are in `Build\Vlv2TbltDevicePkg\Capsules`
+
+# Use DediProg to update FLASH image on a MinnowBoard MAX Target
+
+# Update MinnowBoard MAX Firmware from UEFI Capsules
+
+* Copy the `Build/Vlv2TbltDevicePkg/Capsules` directory to a USB FLASH drive
+* Connect USB FLASH Drive to MinnowBoard MAX
+* Boot MinnowBoard MAX to the Boot Manager
+* Boot the `EFI Internal Shell` boot option
+* Mount the USB FLASH Drive (usually `FS1`)
+* Use `cd` command to go to `Capsules/TestCert` directory
+* Run the following command to apply all four capsules
+
+```
+CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap
+```
+
+* The MinnowBoard MAX should reboot and the four capsules are applied in the
+  order listed.  The progress bar matches the color name of the capsule.
+  MinnowMax.cap uses the color purple.  Once all capsules are processed, the
+  MinnowBoard MAX should reboot again using the new firmware images.
+
+# Generate and Test a UX BitMap Capsule
+
+* Use bitmap editor to generate a BMP file.  Recommend resolution of 600 wide
+  by 100 tell and either 24 or 32 bits per pixel.
+* Save BMP file to USB FLASH drive
+* Use CapsuleApp.efi to convert BMP file to a UX Capsule
+
+```
+CapsuleApp.efi -G MyImage.bmp -O MyImage.cap
+```
+
+* When updating firmware using capsules, add UX capsule to the list of capsules
+  passed into CapsuleApp.efi.
+
+```
+CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap
+```
+
+* When the capsules are processed the UX bitmap image should be displayed at the
+  bottom of the screen.
-- 
2.21.0.windows.1


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

* Re: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
@ 2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  2 siblings, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:53 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error
> return
> 
> If the FLASH device cannot be erased or written, then the flag FlashError is
> set to TRUE.
> 
> Add the missing logic to return an error if FlashError is TRUE.  The missing logic
> was found from a GCC build that noticed a local variable was declared and
> assigned, but was not being used.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo
> rmFlashAccessLib.c
> b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platf
> ormFlashAccessLib.c
> index 052ccb891c..079c3ef2d6 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo
> rmFlashAccessLib.c
> +++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/P
> +++ latformFlashAccessLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>    Platform Flash Access library.
> 
> -  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2016 - 2019, Intel Corporation. All rights
> + reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -529,6 +529,10 @@ Done:
>      Progress (EndPercentage);
>    }
> 
> +  if (FlashError) {
> +    return EFI_WRITE_PROTECTED;
> +  }
> +
>    return EFI_SUCCESS;
>  }
> 
> --
> 2.21.0.windows.1


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

* Re: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
  2019-05-09  7:53   ` Sun, Zailiang
@ 2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  2 siblings, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:53 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error
> return
> 
> If the FLASH device cannot be erased or written, then the flag FlashError is
> set to TRUE.
> 
> Add the missing logic to return an error if FlashError is TRUE.  The missing logic
> was found from a GCC build that noticed a local variable was declared and
> assigned, but was not being used.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo
> rmFlashAccessLib.c
> b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platf
> ormFlashAccessLib.c
> index 052ccb891c..079c3ef2d6 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo
> rmFlashAccessLib.c
> +++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/P
> +++ latformFlashAccessLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>    Platform Flash Access library.
> 
> -  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2016 - 2019, Intel Corporation. All rights
> + reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -529,6 +529,10 @@ Done:
>      Progress (EndPercentage);
>    }
> 
> +  if (FlashError) {
> +    return EFI_WRITE_PROTECTED;
> +  }
> +
>    return EFI_SUCCESS;
>  }
> 
> --
> 2.21.0.windows.1


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

* Re: [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
  2019-05-09  4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
@ 2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:53 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable
> protocols to depex
> 
> Add the arch protocols gEfiVariableArchProtocolGuid and
> gEfiVariableWriteArchProtocolGuid to the dependency expression for the
> AcpiPlatform module to guarantee that the variables that AcpiPlatform
> depends upon are set before they are used by this module.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
> b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
> index 8422985764..c59920db03 100644
> --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
> +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
> @@ -1,10 +1,12 @@
>  #
>  #
> -# Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
> -#
> 
> +# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved #
> +
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> -#
> 
> +#
> +
>  #
>  #
>  #  Module Name:
> @@ -79,6 +81,8 @@ [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile
> 
>  [Depex]
> +  gEfiVariableArchProtocolGuid        AND
> +  gEfiVariableWriteArchProtocolGuid   AND
>    gEfiAcpiSupportProtocolGuid AND
>    gEfiMpServiceProtocolGuid AND
>    gEfiCpuIoProtocolGuid
> --
> 2.21.0.windows.1


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

* Re: [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
  2019-05-09  4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services
> Protocol
> 
> The NumberOfEnabledProcessors parameter to the MP Services Protocol
> service GetNumberOfProcessors() is not optional and is not allowed to be
> NULL.  Add the CpuEnabledCount local variable and pass it into
> GetNumberOfProcessors().
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
> b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
> index 28de8457ce..3583e324e6 100644
> --- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
> +++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
> @@ -1,5 +1,5 @@
>  /**
> -  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2009 - 2019, Intel Corporation. All rights
> + reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> @@ -40,6 +40,7 @@ PpmPolicyEntry(
>    EFI_HANDLE                Handle;
>    EFI_STATUS                Status;
>    UINTN                     CpuCount;
> +  UINTN                     CpuEnabledCount;
>    UINT8                     CPUMobileFeature;
> 
>    PCH_STEPPING              Stepping;
> @@ -63,7 +64,7 @@ PpmPolicyEntry(
>    //
>    // Get processor count from MP service.
>    //
> -  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount,
> NULL);
> +  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount,
> + &CpuEnabledCount);
>    ASSERT_EFI_ERROR (Status);
> 
>    //
> --
> 2.21.0.windows.1


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

* Re: [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
  2019-05-09  4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Michael D Kinney, Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Michael D Kinney <mdkinney@mdkinney-desk.amr.corp.intel.com>; Sun,
> Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build
> issue
> 
> From: Michael D Kinney <mdkinney@mdkinney-desk.amr.corp.intel.com>
> 
> Fix loop comparison for end of languages.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../MiscNumberOfInstallableLanguagesFunction.c         | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git
> a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFu
> nction.c
> b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFu
> nction.c
> index 9fff8d8850..4a96a2c465 100644
> ---
> a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFu
> nction.c
> +++
> b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFu
> nction.c
> @@ -1,10 +1,12 @@
>  /*++
> 
> -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
> -
> 
> +Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
> +
> +
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> -
> 
> +
> +
> 
> 
>  Module Name:
> @@ -68,7 +70,7 @@ CurrentLanguageMatch (
>      // Find the best matching RFC 4646 language, compute the offset.
>      //
>      CompareLength = AsciiStrLen (BestLanguage);
> -    for (MatchLang = Languages, (*Offset) = 0; MatchLang != '\0'; (*Offset)++)
> {
> +    for (MatchLang = Languages, (*Offset) = 0; *MatchLang != '\0';
> (*Offset)++) {
>        //
>        // Seek to the end of current match language.
>        //
> --
> 2.21.0.windows.1


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

* Re: [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
  2019-05-09  4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using
> gUefiShellFileGuid
> 
> Remove use of PCD PcdShellFile from the IntelFrameworkModulePkg and
> instead use gUefiShellFileGuid to find the UEFI Shell in an FV.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c |  4 ++--
>  .../Library/PlatformBdsLib/PlatformBdsLib.inf          | 10 ++++++----
>  .../Library/GenericBdsLib/BdsBoot.c                    |  8 ++++----
>  .../Library/GenericBdsLib/GenericBdsLib.inf            |  5 +++--
>  4 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> index 0f0e15c64a..e86c6b3e2e 100644
> --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> @@ -1356,7 +1356,7 @@ PlatformBdsLibEnumerateAllBootOption (
> 
>      Status = Fv->ReadFile (
>                    Fv,
> -                  PcdGetPtr(PcdShellFile),
> +                  &gUefiShellFileGuid,
>                    NULL,
>                    &Size,
>                    &Type,
> @@ -1528,7 +1528,7 @@ PlatformBdsLibEnumerateAllBootOption (
> 
>      Status = Fv->ReadFile (
>                    Fv,
> -                  PcdGetPtr(PcdShellFile),
> +                  &gUefiShellFileGuid,
>                    NULL,
>                    &Size,
>                    &Type,
> diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
> b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
> index 5831569fae..d3bef0fa39 100644
> --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
> +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
> @@ -1,11 +1,13 @@
>  #/** @file
>  # Component name for module PlatformBootManagerLib  # -# Copyright (c)
> 2008  - 2016, Intel Corporation. All rights reserved.<BR>
> -#
> 
> +# Copyright (c) 2008  - 2019, Intel Corporation. All rights
> +reserved.<BR> #
> +
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> -#
> 
> +#
> +
>  #
>  #
>  #
> @@ -97,6 +99,7 @@ [Guids]
>    gEfiNormalSetupGuid
>    gEfiPartTypeSystemPartGuid
>    gEfiEndOfDxeEventGroupGuid
> +  gUefiShellFileGuid
> 
>  [Pcd]
> 
> gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKey
> FileGuid
> @@ -111,7 +114,6 @@ [Pcd]
>    gPlatformModuleTokenSpaceGuid.PcdFlashFvShellSize
>    gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
>    gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
> -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
>    gPlatformModuleTokenSpaceGuid.PcdIFWISigBaseAddress
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
> diff --git
> a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/BdsBoot.c
> b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/BdsBoot.c
> index b875041880..3034853695 100644
> ---
> a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/BdsBoot.c
> +++
> b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/Generic
> +++ BdsLib/BdsBoot.c
> @@ -1,7 +1,7 @@
>  /** @file
>    BDS Lib functions which relate with create or process the boot option.
> 
> -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -2342,7 +2342,7 @@ BdsLibBootViaBootOption (
>      //
>      // If the boot option point to Internal FV shell, make sure it is valid
>      //
> -    Status = BdsLibUpdateFvFileDevicePath (&DevicePath,
> PcdGetPtr(PcdShellFile));
> +    Status = BdsLibUpdateFvFileDevicePath (&DevicePath,
> + &gUefiShellFileGuid);
>      if (!EFI_ERROR(Status)) {
>        if (Option->DevicePath != NULL) {
>          FreePool(Option->DevicePath);
> @@ -3544,7 +3544,7 @@ BdsLibEnumerateAllBootOption (
> 
>      Status = Fv->ReadFile (
>                    Fv,
> -                  PcdGetPtr(PcdShellFile),
> +                  &gUefiShellFileGuid,
>                    NULL,
>                    &Size,
>                    &Type,
> @@ -3629,7 +3629,7 @@ BdsLibBuildOptionFromShell (
>    //
>    // Build the shell device path
>    //
> -  EfiInitializeFwVolDevicepathNode (&ShellNode, PcdGetPtr(PcdShellFile));
> +  EfiInitializeFwVolDevicepathNode (&ShellNode, &gUefiShellFileGuid);
> 
>    DevicePath = AppendDevicePathNode (DevicePath,
> (EFI_DEVICE_PATH_PROTOCOL *) &ShellNode);
> 
> diff --git
> a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/GenericBdsLib.inf
> b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/GenericBdsLib.inf
> index a978b5cbfa..e3c8a6fa27 100644
> ---
> a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericB
> dsLib/GenericBdsLib.inf
> +++
> b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/Generic
> +++ BdsLib/GenericBdsLib.inf
> @@ -6,7 +6,7 @@
>  #  2) BDS boot device connect interface;  #  3) BDS Misc interfaces for
> mainting boot variable, ouput string, etc.
>  #
> -#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2007 - 2019, Intel Corporation. All rights
> +reserved.<BR>
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -43,6 +43,7 @@
> [Packages]
>    MdeModulePkg/MdeModulePkg.dec
>    IntelFrameworkPkg/IntelFrameworkPkg.dec
>    IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
> +  ShellPkg/ShellPkg.dec
> 
>  [LibraryClasses]
>    DevicePathLib
> @@ -98,6 +99,7 @@ [Guids]
>    ## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder"
>    gEfiLegacyDevOrderVariableGuid
>    gEdkiiStatusCodeDataTypeVariableGuid          ## SOMETIMES_CONSUMES
> ## GUID
> +  gUefiShellFileGuid
> 
>  [Protocols]
>    gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES
> @@ -131,7 +133,6 @@ [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad  ##
> SOMETIMES_CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ##
> SOMETIMES_CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable      ##
> CONSUMES
> -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile      ##
> CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed                       ##
> CONSUMES
> 
>  #
> --
> 2.21.0.windows.1


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

* Re: [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources
  2019-05-09  4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources
> 
> Update DSC files to build full UEFI Shell from sources.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 20 ++++++++++++++++++--
>  Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 22 ++++++++++++++++++----
>  Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 22 ++++++++++++++++++----
>  3 files changed, 54 insertions(+), 10 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index 4a10840c5c..eb1a732683 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -274,7 +274,6 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE)
> == TRUE
>    I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
>  !endif
> -  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
>    ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
>    FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>    SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> @@ -1378,7 +1377,24 @@ [Components.X64]
>    MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> 
> MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>    FatPkg/EnhancedFatDxe/Fat.inf
> -  ShellPkg/Application/Shell/Shell.inf
> +  ShellPkg/Application/Shell/Shell.inf {
> +    <LibraryClasses>
> +
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1
> CommandsLib.inf
> +
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingL
> ib.inf
> +      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg
> CommandLib.inf
> +    <PcdsFixedAtBuild>
> +      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
> +      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> +      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
> +  }
>  !if $(SATA_ENABLE) == TRUE
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/SataController.inf
>  !endif
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index a99a5dfd5a..d1144db9d9 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -274,10 +274,7 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE)
> == TRUE
>    I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
>  !endif
> -  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
>    ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> -
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndLib.inf
> -
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingL
> ib.inf
>    FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>    SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
>  !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -
> 1368,7 +1365,24 @@ [Components.IA32]
>    MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> 
> MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>    FatPkg/EnhancedFatDxe/Fat.inf
> -  ShellPkg/Application/Shell/Shell.inf
> +  ShellPkg/Application/Shell/Shell.inf {
> +    <LibraryClasses>
> +
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1
> CommandsLib.inf
> +
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingL
> ib.inf
> +      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg
> CommandLib.inf
> +    <PcdsFixedAtBuild>
> +      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
> +      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> +      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
> +  }
>  !if $(SATA_ENABLE) == TRUE
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/SataController.inf
>  !endif
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index 0fac892bd5..1784554160 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -274,10 +274,7 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE)
> == TRUE
>    I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
>  !endif
> -  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
>    ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> -
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndLib.inf
> -
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingL
> ib.inf
>    FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>    SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
>  !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -
> 1380,7 +1377,24 @@ [Components.X64]
>    MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> 
> MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>    FatPkg/EnhancedFatDxe/Fat.inf
> -  ShellPkg/Application/Shell/Shell.inf
> +  ShellPkg/Application/Shell/Shell.inf {
> +    <LibraryClasses>
> +
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Comma
> ndsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1Com
> mandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1
> CommandsLib.inf
> +
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingL
> ib.inf
> +      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg
> CommandLib.inf
> +    <PcdsFixedAtBuild>
> +      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
> +      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> +      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
> +  }
>  !if $(SATA_ENABLE) == TRUE
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/SataController.inf
>  !endif
> --
> 2.21.0.windows.1


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

* Re: [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
  2019-05-09  4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:18   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
> 
> Use CpuDxe module from UefiCPuPkg instead of pre-built binary module
> MpCpu.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/PlatformPkg.fdf       |  2 +-
>  Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    |  2 +-
>  Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc |  8 ++++++--
>  Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   |  7 +++++--
>  Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 10 ++++++++--
>  5 files changed, 21 insertions(+), 8 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> index be05fa136b..c725cdcf31 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> @@ -458,7 +458,7 @@ [FV.FVMAIN]
>  INF
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
> dlerRuntimeDxe.inf
>  INF
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCod
> eRouterSmm.inf
>  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/MpCpu.inf
> +INF UefiCpuPkg/CpuDxe/CpuDxe.inf
>  INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
>  INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
>  !if $(ARCH) == IA32
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> index d3c7409c4b..349fbb2887 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> @@ -414,7 +414,7 @@ [FV.FVMAIN]
>  INF
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
> dlerRuntimeDxe.inf
>  INF
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCod
> eRouterSmm.inf
>  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/MpCpu.inf
> +INF UefiCpuPkg/CpuDxe/CpuDxe.inf
>  INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
>  INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
>  !if $(ARCH) == IA32
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index eb1a732683..44a5806153 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -199,7 +199,8 @@ [LibraryClasses.common]
>    #
>    MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
> 
> LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in
> f
> -
> CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibN
> ull/CpuExceptionHandlerLibNull.inf
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeC
> p
> + uExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> 
>    #
>    # ICH
> @@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM,
> LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
> 
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiEx
> tractGuidedSectionLib.inf
> 
> MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPl
> atformLib.inf
>    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
> -
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecP
> e
> + iCpuExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
> 
>  !if $(PERFORMANCE_ENABLE) == TRUE
> 
> PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanc
> eLib.inf
> @@ -1087,6 +1089,7 @@ [Components.X64]
>        PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> 
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
>        HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecP
> e
> + iCpuExceptionHandlerLib.inf
>  !if $(SOURCE_DEBUG_ENABLE) == TRUE
> 
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAg
> entLib.inf
>  !endif
> @@ -1304,6 +1307,7 @@ [Components.X64]
>    #
>    MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
>    MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
> +  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
>    MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index d1144db9d9..bff0fe21af 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -199,7 +199,8 @@ [LibraryClasses.common]
>    #
>    MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
> 
> LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in
> f
> -
> CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibN
> ull/CpuExceptionHandlerLibNull.inf
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeC
> p
> + uExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> 
>    #
>    # ICH
> @@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM,
> LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
> 
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiEx
> tractGuidedSectionLib.inf
> 
> MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPl
> atformLib.inf
>    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
> -
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecP
> e
> + iCpuExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
> 
>  !if $(PERFORMANCE_ENABLE) == TRUE
> 
> PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanc
> eLib.inf
> @@ -1292,6 +1294,7 @@ [Components.IA32]
>    #
>    MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
>    MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
> +  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
>    MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index 1784554160..7630b48ea6 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -199,7 +199,8 @@ [LibraryClasses.common]
>    #
>    MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
> 
> LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in
> f
> -
> CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibN
> ull/CpuExceptionHandlerLibNull.inf
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeC
> p
> + uExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> 
>    #
>    # ICH
> @@ -275,6 +276,8 @@ [LibraryClasses.common]
>    I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
>  !endif
>    ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> +
> +
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComma
> ndL
> + ib.inf
> + HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsi
> + ngLib.inf
>    FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>    SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
>  !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -
> 316,7 +319,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE,
> LibraryClasses.IA32.SEC
> 
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiEx
> tractGuidedSectionLib.inf
> 
> MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPl
> atformLib.inf
>    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
> -
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecP
> e
> + iCpuExceptionHandlerLib.inf
> + MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
> 
>  !if $(PERFORMANCE_ENABLE) == TRUE
> 
> PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanc
> eLib.inf
> @@ -1087,6 +1091,7 @@ [Components.X64]
>        PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> 
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
>        HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> +
> +
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecP
> e
> + iCpuExceptionHandlerLib.inf
>  !if $(SOURCE_DEBUG_ENABLE) == TRUE
> 
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAg
> entLib.inf
>  !endif
> @@ -1304,6 +1309,7 @@ [Components.X64]
>    #
>    MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
>    MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
> +  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
>    MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> --
> 2.21.0.windows.1


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

* Re: [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module
  2019-05-09  4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module
> 
> Add the PcdInitSmm module that should not have been removed.  This
> module performs actions at Exit Boot Services to place devices in an OS
> compatible state.
> Wothout this module, so versions of Linux are not bootable.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/PlatformPkg.fdf       | 1 +
>  Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    | 1 +
>  Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 3 +++
>  Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 2 ++
>  Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 2 ++
>  5 files changed, 9 insertions(+)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> index c725cdcf31..098602b9d8 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> @@ -517,6 +517,7 @@ [FV.FVMAIN]
> 
>  !if $(MINNOW2_FSP_BUILD) == FALSE
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchInitDxe.inf
> +INF RuleOverride = BINARY
> +$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE
> _ARCHITECT
> +URE)/PchInitSmm.inf
>  !endif
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchSmiDispatcher.inf
>  !if $(PCIESC_ENABLE) == TRUE
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> index 349fbb2887..40385794a3 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> @@ -473,6 +473,7 @@ [FV.FVMAIN]
> 
>  !if $(MINNOW2_FSP_BUILD) == FALSE
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchInitDxe.inf
> +INF RuleOverride = BINARY
> +$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE
> _ARCHITECT
> +URE)/PchInitSmm.inf
>  !endif
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchSmiDispatcher.inf
>  !if $(PCIESC_ENABLE) == TRUE
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index 44a5806153..b9faf558b7 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -1193,6 +1193,8 @@ [Components.X64]
>      <PcdsPatchableInModule>
>          gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
>    }
> +
> +
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITEC
> + TURE)/PchInitSmm.inf
> +
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchSmiDispatcher.inf
> 
>  !if $(PCIESC_ENABLE) == TRUE
> @@ -1449,6 +1451,7 @@ [Components.X64]
>    }
> 
> 
> +
>  !if $(NETWORK_ENABLE) == TRUE
>    !if $(NETWORK_ISCSI_ENABLE) == TRUE
>      NetworkPkg/IScsiDxe/IScsiDxe.inf
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index bff0fe21af..2324794841 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -1180,6 +1180,8 @@ [Components.IA32]
>      <PcdsPatchableInModule>
>          gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
>    }
> +
> +
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITEC
> + TURE)/PchInitSmm.inf
> +
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchSmiDispatcher.inf
> 
>  !if $(PCIESC_ENABLE) == TRUE
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index 7630b48ea6..10d44d5652 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -1195,6 +1195,8 @@ [Components.X64]
>      <PcdsPatchableInModule>
>          gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
>    }
> +
> +
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITEC
> + TURE)/PchInitSmm.inf
> +
> 
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_
> ARCHITECTURE)/PchSmiDispatcher.inf
> 
>  !if $(PCIESC_ENABLE) == TRUE
> --
> 2.21.0.windows.1


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

* Re: [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
  2019-05-09  4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to
> produce BGRT
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Library/PlatformBdsLib/BdsPlatform.c      | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> index e86c6b3e2e..4d5997d6e9 100644
> --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -1702,6 +1702,8 @@ PlatformBdsPolicyBehavior (
>      EsrtManagement = NULL;
>    }
> 
> +  DEBUG ((DEBUG_INFO, "BDS: BootMode=%02x\n", BootMode));
> +
>    switch (BootMode) {
> 
>    case BOOT_WITH_MINIMAL_CONFIGURATION:
> @@ -1778,9 +1780,8 @@ PlatformBdsPolicyBehavior (
>        goto FULL_CONFIGURATION;
>      }
> 
> -    if (SystemConfiguration.QuietBoot) {
> -      EnableQuietBoot (PcdGetPtr(PcdLogoFile));
> -    } else {
> +    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
> +    if (!SystemConfiguration.QuietBoot) {
>        PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
>      }
> 
> @@ -1864,8 +1865,7 @@ PlatformBdsPolicyBehavior (
>      // Boot with the specific configuration
>      //
>      PlatformBdsConnectConsole (gPlatformConsole);
> -    PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest);
> -    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
> +    PlatformBdsDiagnostics (EXTENSIVE, TRUE, BaseMemoryTest);
> 
>      DEBUG((DEBUG_INFO, "ProcessCapsules Before EndOfDxe......\n"));
>      ProcessCapsules ();
> @@ -1968,10 +1968,9 @@ FULL_CONFIGURATION:
>      // Perform some platform specific connect sequence
>      //
>      PlatformBdsConnectSequence ();
> -    if (SystemConfiguration.QuietBoot) {
> -        EnableQuietBoot (PcdGetPtr(PcdLogoFile));
> -    } else {
> -        PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
> +    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
> +    if (!SystemConfiguration.QuietBoot) {
> +      PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
>      }
> 
>      //
> --
> 2.21.0.windows.1


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

* Re: [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
  2019-05-09  4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
@ 2019-05-09  7:54   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:54 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting
> binary
> 
> Update the binary file that contains the default configuration settings.  This
> file is generated using FCE.exe during a Windows build and this binary file
> needs to be updated when there are changes to the configuration setting
> layout or configuration setting default values.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/PlatformPkgGcc.fdf          |   7 ++++---
>  .../Stitch/Gcc/NvStorageVariable.bin          | Bin 253952 -> 253952 bytes
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> index 40385794a3..1ba6124a69 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> @@ -119,15 +119,15 @@ [FD.Vlv]
>  FV = MICROCODE_FV
>  $(FLASH_REGION_VPD_OFFSET)|$(FLASH_REGION_VPD_SIZE)
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiM
> deModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
> -FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
> +FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
> 
> 
> $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET)
> |$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE)
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gE
> fiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
> -FILE =
> $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
> +FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
> 
> 
> $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(F
> LASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE)
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfi
> MdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
> -FILE =
> $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
> +FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
> 
>  !if $(MINNOW2_FSP_BUILD) == TRUE
> 
> @@ -633,6 +633,7 @@ [FV.FVMAIN]
>  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>  !endif
> 
> +
>    #
>    # SMBIOS
>    #
> diff --git a/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
> b/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
> index
> 6aa2bb5aa530caf0a4a7744a398b16076a9e957f..7f8688b099f1e70491f16161a9
> 8c7b53c6b7a412 100644 GIT binary patch delta 127
> zcmZoTz~69ye?o_@9s>hI0uuv+yZV&bexjPbOU(8cGMw0I?a2_pV8Rg3;LPC9;
> K$&`
> z;K|_5V6?fJv65->ItjJS5sVAiHWzR&;o1Cyy@Hw52xv;mWJ!sslVv4EfC{u2=Wf0!
> eQNTR;r<C}_2d2$|GVOsfj6lq^Jy3=@`XB%=8zwja
> 
> delta 139
> zcmZoTz~69ye?o_=0Rsa=5)j*Oy~?@aOQipTjn(0oWB6EI8PXUs8T^1anZc8xfW
> d^p
> znIWGc4=kF_5XO+mPz01q1nSLUNS$~wb+aDxF}BS!#44CKf8kuhGg&~2g)v~V
> sMOTS
> k`=qoO12?~vDqwEjDA&GGjuD8Nwr`YU_CL7!fLsO>0ART*X#fBK
> 
> --
> 2.21.0.windows.1


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

* Re: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
  2019-05-09  4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
@ 2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:55 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions
> from build scripts
> 
> In preparation for moving Vlv2TbltDevicePkg to the edk2-platforms
> repository, the batch scripts used to build this platform are updated to not
> make any assumptions about the directory location of Vlv2TbltDevicePkg.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/.gitignore            |   2 +
>  Vlv2TbltDevicePkg/Build_IFWI.bat        |  31 +++-
>  Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat |  23 ++-
>  Vlv2TbltDevicePkg/bldX64.bat            | 216 ------------------------
>  Vlv2TbltDevicePkg/bld_vlv.bat           | 129 ++++++++------
>  Vlv2TbltDevicePkg/bld_vlv.sh            |   3 +-
>  6 files changed, 124 insertions(+), 280 deletions(-)  delete mode 100644
> Vlv2TbltDevicePkg/bldX64.bat
> 
> diff --git a/Vlv2TbltDevicePkg/.gitignore b/Vlv2TbltDevicePkg/.gitignore
> index b4699122b8..c7698262ad 100644
> --- a/Vlv2TbltDevicePkg/.gitignore
> +++ b/Vlv2TbltDevicePkg/.gitignore
> @@ -1,3 +1,5 @@
>  AutoPlatformCFG.txt
>  Stitch/Stitching.log
>  Stitch/MNW*.bin
> +Stitch/MNW*.rom
> +Stitch/MNW*.rom.orig
> diff --git a/Vlv2TbltDevicePkg/Build_IFWI.bat
> b/Vlv2TbltDevicePkg/Build_IFWI.bat
> index 9a3063397e..887206703a 100644
> --- a/Vlv2TbltDevicePkg/Build_IFWI.bat
> +++ b/Vlv2TbltDevicePkg/Build_IFWI.bat
> @@ -1,7 +1,7 @@
>  @REM @file
>  @REM   Windows batch file to build BIOS ROM
>  @REM
> -@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights
> +reserved.<BR>
>  @REM SPDX-License-Identifier: BSD-2-Clause-Patent  @REM
> 
> @@ -18,11 +18,26 @@ set exitCode=0
>  set "Build_Flags= "
>  set "Stitch_Flags= "
>  set Arch=X64
> -set WORKSPACE=%CD%
> -set CORE_PATH=%WORKSPACE%\edk2
> -set PLATFORM_PATH=%WORKSPACE%\edk2
>  set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
> 
> +set PLATFORM_PATH=%WORKSPACE%
> +if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% (
> +  if defined PACKAGES_PATH (
> +    for %%i IN (%PACKAGES_PATH%) DO (
> +      if exist %%~fi\%PLATFORM_PACKAGE% (
> +        set PLATFORM_PATH=%%~fi
> +        goto PlatformPackageFound
> +      )
> +    )
> +  ) else (
> +    echo.
> +    echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!!
> +    echo.
> +    goto Exit
> +  )
> +)
> +:PlatformPackageFound
> +
>  :: Parse Optional arguments
>  :OptLoop
>  if /i "%~1"=="/?" goto Usage
> @@ -125,11 +140,11 @@ if %ERRORLEVEL% NEQ 0 (  echo.
>  echo Finished Building BIOS.
>  @REM Set BIOS_ID environment variable here.
> -call %CORE_PATH%\Conf\BiosId.bat
> +call %WORKSPACE%\Conf\BiosId.bat
>  echo BIOS_ID=%BIOS_ID%
> 
>  :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor
> environment variables -find /v "#" %CORE_PATH%\Conf\BiosId.env >
> ver_strings
> +find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
>  for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j  del /f/q
> ver_strings >nul  set
> BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%
> _%VERSION_MINOR%.ROM
> @@ -137,10 +152,10 @@ set
> BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%
> _%VERSION_MINOR%.ROM
>  :: Start Integration process
>  echo
> ==========================================================
> ============
>  echo Build_IFWI:  Calling IFWI Stitching Script...
> -pushd %CORE_PATH%\%PLATFORM_PACKAGE%\Stitch
> +pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch
> 
>    :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/S
> IFWISuffix]
> -  call IFWIStitch.bat %Stitch_Flags% /B ..\..\%BIOS_Name% %IFWI_Suffix%
> +  call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix%
> 
>   @echo off
>  popd
> diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
> b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
> index 7c3ebbd1c6..200ca05a23 100644
> --- a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
> +++ b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
> @@ -1,7 +1,7 @@
>  @REM @file
>  @REM   Windows batch file to build BIOS ROM
>  @REM
> -@REM Copyright (c) 2006   - 2014, Intel Corporation. All rights reserved.<BR>
> +@REM Copyright (c) 2006   - 2019, Intel Corporation. All rights reserved.<BR>
>  @REM
>  @REM   SPDX-License-Identifier: BSD-2-Clause-Patent
>  @REM
> @@ -9,6 +9,25 @@
>  @echo off
>  SetLocal EnableDelayedExpansion EnableExtensions
> 
> +set PLATFORM_BIN_PACKAGE=%WORKSPACE%\Vlv2SocBinPkg
> +if not exist %PLATFORM_BIN_PACKAGE% (
> +  if defined PACKAGES_PATH (
> +    for %%i IN (%PACKAGES_PATH%) DO (
> +      if exist %%~fi\Vlv2SocBinPkg (
> +        set PLATFORM_BIN_PACKAGE=%%~fi\Vlv2SocBinPkg
> +        goto PlatformBinPackageFound
> +      )
> +    )
> +  ) else (
> +    echo.
> +    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
> +    echo.
> +    goto BldFail
> +  )
> +)
> +:PlatformBinPackageFound
> +
> +
>  :: Set script defaults
>  set exitCode=0
>  set BackupRom=1
> @@ -185,7 +204,7 @@ for %%i in (%BIOS_Names%) do (
>      echo Generating IFWI... %BIOS_ID%.bin
>      echo.
> 
> -    copy /b/y !IFWI_HEADER_FILE!
> + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin
> + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\Vacant.bin
> + !BIOS_Rom! %BIOS_ID%.bin
> +    copy /b/y !IFWI_HEADER_FILE! +
> + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin
> +
> + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\Vacant.bin
> + !BIOS_Rom!
> + %BIOS_ID%.bin
>      echo.
>      echo
> ==========================================================
> =================
>  )
> diff --git a/Vlv2TbltDevicePkg/bldX64.bat b/Vlv2TbltDevicePkg/bldX64.bat
> deleted file mode 100644 index 50dc5b1f07..0000000000
> --- a/Vlv2TbltDevicePkg/bldX64.bat
> +++ /dev/null
> @@ -1,216 +0,0 @@
> -@REM @file
> -@REM   Windows batch file to build BIOS ROM
> -@REM
> -@REM Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> -
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM
> -
> -@echo off
> -@echo.
> -@time /t
> -
> -@if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log -@if
> exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log -@if
> exist %WORKSPACE%\Conf\build_rule.txt
> del %WORKSPACE%\Conf\build_rule.txt -@if
> exist %WORKSPACE%\Conf\FrameworkDatabase.db
> del %WORKSPACE%\Conf\FrameworkDatabase.db
> -@if exist %WORKSPACE%\Conf\target.txt
> del %WORKSPACE%\Conf\target.txt -@if
> exist %WORKSPACE%\Conf\tools_def.txt
> del %WORKSPACE%\Conf\tools_def.txt -@if exist conf\.cache rmdir /q /s
> conf\.cache
> -
> -@set target=DEBUG
> -
> -@if /i "%1" == "release" set TARGET=RELEASE -@if /i "%2" == "release" set
> TARGET=RELEASE -@if /i "%3" == "release" set TARGET=RELEASE -@if /i "%4"
> == "release" set TARGET=RELEASE -@if /i "%5" == "release" set
> TARGET=RELEASE
> -
> -@set PlatformType=NO_PLATFORM
> -@set config_file=.\Vlv2TbltDevicePkg\PlatformPkgConfig.dsc
> -@set EVN_debug_file=.\Vlv2TbltDevicePkg\BiosIdx64D.env
> -@set EVN_release_file=.\Vlv2TbltDevicePkg\BiosIdx64R.env
> -@set auto_config_inc=.\Vlv2TbltDevicePkg\AutoPlatformCFG.txt
> -
> -@if  "%1" == "MNW2" (
> -  set %PlatformType% = MNW2
> -  @echo  Setting Baley Bay platform configration and BIOS ID ...
> -  findstr /b /v BOARD_ID %EVN_debug_file% > newfile.env
> -  echo BOARD_ID = MNW2MAX >> newfile.env
> -  type newfile.env > %EVN_debug_file%
> -  findstr /b /v BOARD_ID %EVN_release_file% > newfile.env
> -  echo BOARD_ID = MNW2MAX >> newfile.env
> -  type newfile.env > %EVN_release_file%
> -  echo DEFINE ENBDT_PF_BUILD = TRUE  >> %auto_config_inc%
> -  echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
> -  goto PLATFORM_SETTING_DONE
> -)
> -
> -@if  "%PlatformType%" == "NO_PLATFORM" (
> -  goto BldFail
> -)
> -
> -rem clearup the temp file
> -:PLATFORM_SETTING_DONE
> -@DEL NEWFILE.ENV
> -@DEL NEWFILE.CFG
> -
> -@REM Define platform specific environment variables.
> -@REM
> -@set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
> -@set SCRIPT_ERROR=0
> -
> -@REM Set basic environment.
> -@echo.
> -@echo Run edksetup.bat batch file.
> -@echo.
> -@del Conf\build_rule.txt
> -@REM @del Conf\tools_def.txt
> -@call edksetup.bat
> -
> -
> -@echo.
> -@echo Set the VS2008 environment.
> -@echo.
> -@if defined VS90COMNTOOLS (
> -  if not defined VSINSTALLDIR call "%VS90COMNTOOLS%\vsvars32.bat"
> -  if /I "%VS90COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio
> 9.0\Common7\Tools\" (
> -    set TOOL_CHAIN_TAG=VS2008
> -  ) else (
> -    set TOOL_CHAIN_TAG=VS2008x86
> -  )
> -) else (
> -  echo.
> -  echo !!! ERROR !!! VS2008 not installed correctly. VS90COMNTOOLS not
> defined. !!!
> -  echo.
> -  set SCRIPT_ERROR=1
> -  goto :BldEnd
> -)
> -
> -@echo.
> -@echo Set build environment.
> -@echo.
> -@if not exist
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG% (
> -  mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%
> -)
> -
> -
> -@REM Set clean build option
> -@set CLEAN_BUILD_OPTION=-e
> -
> -@findstr /V "ACTIVE_PLATFORM TARGET TARGET_ARCH TOOL_CHAIN_TAG
> BUILD_RULE_CONF" Conf\target.txt >
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -
> -@echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkgX64.dsc     >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TARGET          = %TARGET%                                  >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TARGET_ARCH     = IA32 X64                                  >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                          >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo BUILD_RULE_CONF = Conf/build_rule.txt                       >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@move /Y
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt Conf
> -
> -
> -
> -@echo.
> -@echo Create BiosIdx64.
> -@echo.
> -@if not exist
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64 (
> -  mkdir
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64
> -)
> -
> -@if "%TARGET%" == "DEBUG" (
> -  set BIOS_ID_FILE=BiosIdx64D.env
> -
> -) else (
> -  set BIOS_ID_FILE=BiosIdx64R.env
> -
> -)
> -
> -
> -GenBiosId.exe -i %PLATFORM_PACKAGE%\%BIOS_ID_FILE% -o
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64\Bio
> sId.bin
> -@if %ERRORLEVEL% NEQ 0 goto BldFail
> -
> -@echo off
> -echo Copy reference code ASL files.
> -
> -
> -@if /i "/s" == "%1" goto BldSilent
> -@if /i "/s" == "%2" goto BldSilent
> -@if /i "/s" == "%3" goto BldSilent
> -@if /i "/s" == "%4" goto BldSilent
> -@if /i "/s" == "%5" goto BldSilent
> -
> -build -n %NUMBER_OF_PROCESSORS%
> -@if %ERRORLEVEL% NEQ 0 goto BldFail
> -
> -@If %SCRIPT_ERROR% EQU 1 goto BldFail
> -@goto BldSuccess
> -
> -:BldSilent
> -
> -build -n %NUMBER_OF_PROCESSORS% 1>>EDK2.log 2>&1 -
> @if %ERRORLEVEL% NEQ 0 goto BldFail
> -
> -
> -@If %SCRIPT_ERROR% EQU 1 goto BldFail
> -
> -:BldSuccess
> -@echo off
> -del
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.beforeconfig.fd 1>>EDK2.log 2>&1 -del
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiD
> efaultData.txt 1>>EDK2.log 2>&1
> -copy /y
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.f
> d
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.beforeconfig.fd 1>>EDK2.log 2>&1
> -
> -@echo.
> -@echo Extract setup default value from VFR
> (Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Hii
> DefaultData.txt)
> -@echo.
> -fce read -i
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.beforeconfig.fd >
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiD
> efaultData.txt
> -
> -
> -@echo Update FD with default Hii value successfully! (both 'Setup' and
> 'SetupDefault') -@echo.
> -fce mirror -i
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.beforeconfig.fd -o
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.fd Setup SetupDefault 1>>EDK2.log 2>&1
> -
> -@echo off
> -del
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.f
> d
> -del Vlv2TbltDevicePkg\RomImage\bios.rom
> -if not exist
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
> goto Gen8MImage -del /q /f
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\*
> -rd /Q
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
> -:Gen8MImage
> -
> -copy /b
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX
> 64.fd Vlv2TbltDevicePkg\RomImage\bios.rom
> -
> -pushd Vlv2TbltDevicePkg\RomImage\
> -@if "%TARGET%" == "DEBUG" (
> -    call signbiosX64_debug.bat
> -) else (
> -    call signbiosX64_release.bat
> -)
> -
> -call ftoolbuild.bat
> -call ftoolbuild_sec_enable.bat
> -popd
> -
> -@echo off
> -mkdir
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
> -move Vlv2TbltDevicePkg\RomImage\SPI_Image\*
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\ >
> NUL
> -
> -call GenBIOS.bat X64
> -
> -@echo on
> -
> -@echo TARGET:               %TARGET%
> -@echo TOOL_CHAIN_TAG:       %TOOL_CHAIN_TAG%
> -@echo BIOS location:
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV
> -@echo SPI Images location:
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
> -@echo.
> -@echo The EDKII BIOS build has successfully completed!
> -@echo.
> -@goto BldEnd
> -
> -:BldFail
> -@echo.
> -@echo The EDKII BIOS Build has failed!
> -@echo.
> -exit /b 1
> -
> -:BldEnd
> -@time /t
> -exit /b 0
> diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.bat
> index c5314833c0..dcc8b1a95a 100644
> --- a/Vlv2TbltDevicePkg/bld_vlv.bat
> +++ b/Vlv2TbltDevicePkg/bld_vlv.bat
> @@ -1,7 +1,7 @@
>  @REM @file
>  @REM   Windows batch file to build BIOS ROM
>  @REM
> -@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights
> +reserved.<BR>
>  @REM SPDX-License-Identifier: BSD-2-Clause-Patent  @REM
> 
> @@ -15,25 +15,60 @@ echo.
>  ::*********************************************************
> *************
>  :: Initial Setup
>  ::*********************************************************
> *************
> -set WORKSPACE=%CD%
>  if %WORKSPACE:~-1%==\ set WORKSPACE=%WORKSPACE:~0,-1%  set /a
> build_threads=1  set "Build_Flags= "
>  set exitCode=0
>  set Arch=X64
>  set Source=0
> -set CORE_PATH=%WORKSPACE%\edk2
> -set PLATFORM_PATH=%WORKSPACE%\edk2
> -cd ./edk2
> +set PLATFORM_NAME=Vlv2TbltDevicePkg
> +
> +set CORE_PATH=%WORKSPACE%
> +if not exist %CORE_PATH%\edksetup.bat (
> +  if defined PACKAGES_PATH (
> +    for %%i IN (%PACKAGES_PATH%) DO (
> +      if exist %%~fi\edksetup.bat (
> +        set CORE_PATH=%%~fi
> +        goto CorePathFound
> +      )
> +    )
> +  ) else (
> +    echo.
> +    echo !!! ERROR !!! Cannot find edksetup.bat !!!
> +    echo.
> +    goto BldFail
> +  )
> +)
> +:CorePathFound
> +
> +set PLATFORM_PACKAGE=%WORKSPACE%\%PLATFORM_NAME%
> +if not exist %PLATFORM_PACKAGE% (
> +  if defined PACKAGES_PATH (
> +    for %%i IN (%PACKAGES_PATH%) DO (
> +      if exist %%~fi\%PLATFORM_NAME% (
> +        set PLATFORM_PACKAGE=%%~fi\%PLATFORM_NAME%
> +        goto PlatformPackageFound
> +      )
> +    )
> +  ) else (
> +    echo.
> +    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
> +    echo.
> +    goto BldFail
> +  )
> +)
> +:PlatformPackageFound
> +
> +cd %CORE_PATH%
> 
>  :: Clean up previous build files.
> -if exist %CORE_PATH%\edk2.log del %CORE_PATH%\edk2.log -if
> exist %CORE_PATH%\unitool.log del %CORE_PATH%\unitool.log -if
> exist %CORE_PATH%\Conf\target.txt del %CORE_PATH%\Conf\target.txt -if
> exist %CORE_PATH%\Conf\tools_def.txt
> del %CORE_PATH%\Conf\tools_def.txt -if
> exist %CORE_PATH%\Conf\build_rule.txt
> del %CORE_PATH%\Conf\build_rule.txt -if
> exist %CORE_PATH%\Conf\FrameworkDatabase.db
> del %CORE_PATH%\Conf\FrameworkDatabase.db
> -if exist conf\.cache rmdir /q/s conf\.cache
> +if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log if exist
> +%WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log if exist
> +%WORKSPACE%\Conf\target.txt del %WORKSPACE%\Conf\target.txt if
> exist
> +%WORKSPACE%\Conf\tools_def.txt
> del %WORKSPACE%\Conf\tools_def.txt if
> +exist %WORKSPACE%\Conf\build_rule.txt del
> +%WORKSPACE%\Conf\build_rule.txt if exist
> +%WORKSPACE%\Conf\FrameworkDatabase.db del
> +%WORKSPACE%\Conf\FrameworkDatabase.db
> +if exist %WORKSPACE%\Conf\.cache rmdir
> /q/s %WORKSPACE%\Conf\.cache
> 
>  :: Setup EDK environment. Edksetup puts new copies of target.txt,
> tools_def.txt, build_rule.txt in WorkSpace\Conf
>  :: Also run edksetup as soon as possible to avoid it from changing
> environment variables we're overriding @@ -41,8 +76,6 @@
> call %CORE_PATH%\edksetup.bat Rebuild  @echo off
> 
>  :: Define platform specific environment variables.
> -set PLATFORM_NAME=Vlv2TbltDevicePkg
> -set PLATFORM_PACKAGE=%PLATFORM_PATH%\Vlv2TbltDevicePkg
>  set config_file=%PLATFORM_PACKAGE%\PlatformPkgConfig.dsc
>  set auto_config_inc=%PLATFORM_PACKAGE%\AutoPlatformCFG.txt
> 
> @@ -82,9 +115,9 @@ if /i "%~1" == "/c" (
>          del /f/s/q build > nul
>          rmdir /s/q build
>      )
> -    if exist conf\.cache (
> -        del /f/s/q conf\.cache > nul
> -        rmdir /s/q conf\.cache
> +    if exist %WORKSPACE%\Conf\.cache (
> +        del /f/s/q %WORKSPACE%\Conf\.cache > nul
> +        rmdir /s/q %WORKSPACE%\Conf\.cache
>      )
>      echo.
>      shift
> @@ -107,17 +140,17 @@ if "%~1"=="" goto Usage
> 
>  ::Remove the values for Platform_Type and Build_Target from BiosIdX.env
> and stage in Conf\  if "%Arch%"=="IA32" (
> -    findstr /b /v "BOARD_ID
> BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > Conf\BiosId.env
> +    findstr /b /v "BOARD_ID
> BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env
> + > %WORKSPACE%\Conf\BiosId.env
>      echo DEFINE X64_CONFIG = FALSE  >> %auto_config_inc%
>  ) else if "%Arch%"=="X64" (
> -    findstr /b /v "BOARD_ID
> BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env > Conf\BiosId.env
> +    findstr /b /v "BOARD_ID  BUILD_TYPE"
> + %PLATFORM_PACKAGE%\BiosIdx64R.env > %WORKSPACE%\Conf\BiosId.
> env
>      echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
>  )
> 
>  :: -- Build flags settings for each Platform --  echo Setting  %1  platform
> configuration and BIOS ID...
>  if /i "%~1" == "MNW2" (
> -    echo BOARD_ID = MNW2MAX >> Conf\BiosId.env
> +    echo BOARD_ID = MNW2MAX >> %WORKSPACE%\Conf\BiosId.env
>      echo DEFINE ENBDT_PF_BUILD = TRUE   >> %auto_config_inc%
> 
>  ) else (
> @@ -128,10 +161,10 @@ set Platform_Type=%~1
> 
>  if /i "%~2" == "RELEASE" (
>      set target=RELEASE
> -    echo BUILD_TYPE = R >> Conf\BiosId.env
> +    echo BUILD_TYPE = R >> %WORKSPACE%\Conf\BiosId.env
>  ) else (
>      set target=DEBUG
> -    echo BUILD_TYPE = D >> Conf\BiosId.env
> +    echo BUILD_TYPE = D >> %WORKSPACE%\Conf\BiosId.env
>  )
> 
>  ::*********************************************************
> *************
> @@ -181,43 +214,40 @@ if defined VS140COMNTOOLS (
>  )
> 
>  echo Ensuring correct build directory is present for GenBiosId...
> -set
> BUILD_PATH=Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
> +set
> +BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%
> TOOL_CHAIN_TAG%
> 
>  echo Modifing Conf files for this build...
>  :: Remove lines with these tags from target.txt -findstr /V "TARGET
> TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF  ACTIVE_PLATFORM
> MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt >
> Conf\target.txt.tmp
> +findstr /V "TARGET  TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF
> +ACTIVE_PLATFORM  MAX_CONCURRENT_THREAD_NUMBER"
> +%WORKSPACE%\Conf\target.txt > %WORKSPACE%\Conf\target.txt.tmp
> 
> -echo TARGET          = %TARGET%                                  >> Conf\target.txt.tmp
> +echo TARGET
> = %TARGET%                                  >> %WORKSPACE%\Conf\target.txt.tmp
>  if "%Arch%"=="IA32" (
> -    echo TARGET_ARCH = IA32                                       >> Conf\target.txt.tmp
> +    echo TARGET_ARCH =
> IA32                                       >> %WORKSPACE%\Conf\target.txt.tmp
>  ) else if "%Arch%"=="X64" (
> -    echo TARGET_ARCH = IA32 X64                                  >> Conf\target.txt.tmp
> +    echo TARGET_ARCH = IA32
> X64                                  >> %WORKSPACE%\Conf\target.txt.tmp
>  )
> -echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                                  >>
> Conf\target.txt.tmp
> -echo BUILD_RULE_CONF = Conf/build_rule.txt                               >>
> Conf\target.txt.tmp
> +echo TOOL_CHAIN_TAG
> = %TOOL_CHAIN_TAG%                                  >> %WORKSPACE%\Conf\target.txt
> .tmp
> +echo BUILD_RULE_CONF =
> Conf/build_rule.txt                               >> %WORKSPACE%\Conf\target.txt.tmp
>  if %Source% == 0 (
> -  echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >>
> Conf\target.txt.tmp
> +  echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >> %WORKSPACE%
> \Conf\target.txt.tmp
>  ) else (
> -  echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc  >>
> Conf\target.txt.tmp
> +  echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc
> + >> %WORKSPACE%\Conf\target.txt.tmp
>  )
> -echo MAX_CONCURRENT_THREAD_NUMBER
> = %build_threads%                      >> Conf\target.txt.tmp
> +echo MAX_CONCURRENT_THREAD_NUMBER
> = %build_threads%                      >> %WORKSPACE%\Conf\target.txt.tmp
> 
> -move /Y Conf\target.txt.tmp Conf\target.txt >nul
> +move
> /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt
> +>nul
> 
>  ::*********************************************************
> *************
>  :: Build BIOS
>  ::*********************************************************
> *************
> 
>  echo Creating BiosId...
> -pushd %PLATFORM_PACKAGE%
> -if not exist %WORKSPACE%\%BUILD_PATH%\IA32
> mkdir %WORKSPACE%\%BUILD_PATH%\IA32
> -  GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -
> o %WORKSPACE%\%BUILD_PATH%\IA32\BiosId.bin -
> ob %CORE_PATH%\Conf\BiosId.bat
> +if not exist %BUILD_PATH%\IA32  mkdir %BUILD_PATH%\IA32
> +%PLATFORM_PACKAGE%\GenBiosId.exe -
> i %WORKSPACE%\Conf\BiosId.env -o
> +%BUILD_PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
>  if "%Arch%"=="X64" (
> -   if not exist %WORKSPACE%\%BUILD_PATH%\X64
> mkdir %WORKSPACE%\%BUILD_PATH%\X64
> -   GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -
> o %WORKSPACE%\%BUILD_PATH%\X64\BiosId.bin -
> ob %CORE_PATH%\Conf\BiosId.bat
> +   if not exist %BUILD_PATH%\X64  mkdir %BUILD_PATH%\X64
> +   %PLATFORM_PACKAGE%\GenBiosId.exe -
> i %WORKSPACE%\Conf\BiosId.env -o
> + %BUILD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
>  )
> -popd
> -
> 
>  if %ERRORLEVEL% NEQ 0 goto BldFail
> 
> @@ -235,23 +265,23 @@ echo Running fce...
> 
>  pushd %PLATFORM_PACKAGE%
>  :: Extract Hii data from build and store in HiiDefaultData.txt -fce read -
> i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd > %WORKSPACE%\%BUILD_PA
> TH%\FV\HiiDefaultData.txt
> +%PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd >
> +%BUILD_PATH%\FV\HiiDefaultData.txt
> 
>  :: save changes to VlvXXX.fd
> -fce update -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd -
> s %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt -
> o %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd
> +%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s
> +%BUILD_PATH%\FV\HiiDefaultData.txt -
> o %BUILD_PATH%\FV\Vlv%Arch%.fd
>  popd
> 
>  if %ERRORLEVEL% NEQ 0 goto BldFail
>  ::echo FD successfully updated with default Hii values.
> 
>  :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor
> environment variables -find /v "#" Conf\BiosId.env > ver_strings
> +find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
>  for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j  del /f/q
> ver_strings >nul
> 
>  set
> BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%
> _%VERSION_MINOR%.ROM
> -copy
> /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %PLATFORM_PAT
> H%\%BIOS_Name% >nul -copy
> /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %WORKSPACE%\
> %BUILD_PATH%\FV\Vlv.ROM >nul
> +copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd
> +%PLATFORM_PACKAGE%\Stitch\%BIOS_Name% >nul copy /y/b
> +%BUILD_PATH%\FV\Vlv%Arch%.fd  %BUILD_PATH%\FV\Vlv.ROM >nul
> 
>  echo.
>  echo Build location:     %BUILD_PATH%
> @@ -261,13 +291,8 @@ echo -------------------- The EDKII BIOS build has
> successfully completed. -----  echo.
> 
>  @REM build capsule here
> -@REMif "%openssl_path%" == "" (
> -@REM    echo -- Error:  OPENSSL_PATH not set.  Capule and Recovery images
> not generated.
> -@REM    set exitCode=1
> -@REM    goto Exit
> -@REM
> -@REM echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
> -@REM build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
> +echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
> +build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
> 
>  goto Exit
> 
> diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh
> index 51d3acacb4..ec3a325db7 100755
> --- a/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -242,9 +242,8 @@ VERSION_MINOR=$(grep '^VERSION_MINOR'
> Conf/BiosId.env | cut -d ' ' -f 3 | cut -c  BOARD_ID=$(grep '^BOARD_ID'
> Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-7)
> BIOS_Name="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_
> "$VERSION_MINOR".ROM
> 
> BIOS_ID="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VE
> RSION_MINOR"_GCC.bin
> -cp -f $BUILD_PATH/FV/VLV.fd  $WORKSPACE/$BIOS_Name
>  SEC_VERSION=1.0.2.1060v5
> -cat
> $IFWI_HEADER_FILE ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/VLV_SEC_RE
> GION.bin ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/Vacant.bin
> $BIOS_Name > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
> +cat $IFWI_HEADER_FILE
> +../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin
> +../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/Vacant.bin
> +$BUILD_PATH/FV/VLV.fd > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
> 
> 
>  echo Skip "Running BIOS_Signing ..."
> --
> 2.21.0.windows.1


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

* Re: [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
  2019-05-09  4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
@ 2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:55 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
> 
> Preserve the UEFI Variable store when a capsule update is performed.  UEFI
> Variables are used to store firmware version information for the sample
> devices (Red, Green, Blue).
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.
> c
> b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.
> c
> index 3d5649164b..a863d69381 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.
> c
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLi
> +++ b.c
> @@ -1,8 +1,8 @@
>  /**
> 
> -Copyright (c) 2016, Microsoft Corporation
> +Copyright (c) 2016, Microsoft Corporation.  All rights reserved.
> +Copyright (c) 2019, Intel Corporation.  All rights reserved.
> 
> -All rights reserved.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -36,8 +36,7 @@ UPDATE_CONFIG_DATA mUpdateConfigData[] = {
>    { PlatformFirmwareTypeSystemFirmware,
> FlashAddressTypeRelativeAddress, 0x000C0000, 0x00050000, 0x000C0000 },
>    { PlatformFirmwareTypeSystemFirmware,
> FlashAddressTypeRelativeAddress, 0x00110000, 0x00210000, 0x00110000 },
>    { PlatformFirmwareTypeSystemFirmware,
> FlashAddressTypeRelativeAddress, 0x00320000, 0x00070000, 0x00320000 },
> -  { PlatformFirmwareTypeSystemFirmware,
> FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 },
> -  { PlatformFirmwareTypeNvRam,          FlashAddressTypeRelativeAddress,
> 0x00040000, 0x00080000, 0x00040000 }
> +  { PlatformFirmwareTypeSystemFirmware,
> + FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 }
>  };
> 
>  /**
> --
> 2.21.0.windows.1


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

* Re: [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools
  2019-05-09  4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
@ 2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:55 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl
> tools
> 
> Remove path to openssl tools from batch scripts.  Instead, the path to the
> openssl tools must be included in PATH for a build to complete.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat     | 2 --
>  .../Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat      | 2 --
>  .../Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat   | 2 --
>  3 files changed, 6 deletions(-)
> 
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> index 80f9be7fb8..50ebb160ee 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ Max.bat
> @@ -69,7 +69,6 @@ if exist "NewCert.pem" (
>      --lsv %FMP_CAPSULE_LSV% ^
>      --capflag PersistAcrossReset ^
>      --capflag InitiateReset ^
> -    --signing-tool-path=c:\OpenSSL-Win32\bin ^
>      --signer-private-cert=NewCert.pem ^
>      --other-public-cert=NewSub.pub.pem ^
>      --trusted-public-cert=NewRoot.pub.pem ^ @@ -106,7 +105,6 @@ call
> GenerateCapsule ^
>    --lsv %FMP_CAPSULE_LSV% ^
>    --capflag PersistAcrossReset ^
>    --capflag InitiateReset ^
> -  --signing-tool-path=c:\OpenSSL-Win32\bin ^
>    --signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.p
> em ^
>    --other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.p
> ub.pem ^
>    --trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.
> pub.pem ^ diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> index c6c78f0285..9d08c86717 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ MaxRelease.bat
> @@ -69,7 +69,6 @@ if exist "NewCert.pem" (
>      --lsv %FMP_CAPSULE_LSV% ^
>      --capflag PersistAcrossReset ^
>      --capflag InitiateReset ^
> -    --signing-tool-path=c:\OpenSSL-Win32\bin ^
>      --signer-private-cert=NewCert.pem ^
>      --other-public-cert=NewSub.pub.pem ^
>      --trusted-public-cert=NewRoot.pub.pem ^ @@ -106,7 +105,6 @@ call
> GenerateCapsule ^
>    --lsv %FMP_CAPSULE_LSV% ^
>    --capflag PersistAcrossReset ^
>    --capflag InitiateReset ^
> -  --signing-tool-path=c:\OpenSSL-Win32\bin ^
>    --signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.p
> em ^
>    --other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.p
> ub.pem ^
>    --trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.
> pub.pem ^ diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> eColor.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> eColor.bat
> index ba4bc0f081..3e9f94c530 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> eColor.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> e
> +++ Color.bat
> @@ -73,7 +73,6 @@ if exist "NewCert.pem" (
>      --lsv %FMP_CAPSULE_LSV% ^
>      --capflag PersistAcrossReset ^
>      --capflag InitiateReset ^
> -    --signing-tool-path=c:\OpenSSL-Win32\bin ^
>      --signer-private-cert=NewCert.pem ^
>      --other-public-cert=NewSub.pub.pem ^
>      --trusted-public-cert=NewRoot.pub.pem ^ @@ -110,7 +109,6 @@ call
> GenerateCapsule ^
>    --lsv %FMP_CAPSULE_LSV% ^
>    --capflag PersistAcrossReset ^
>    --capflag InitiateReset ^
> -  --signing-tool-path=c:\OpenSSL-Win32\bin ^
>    --signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.p
> em ^
>    --other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.p
> ub.pem ^
>    --trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.
> pub.pem ^
> --
> 2.21.0.windows.1


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

* Re: [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
  2019-05-09  4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
@ 2019-05-09  7:55   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:55 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS
> generation scripts
> 
> Add batch scripts to generate the LVFS compatible capsule update driver.
> 
> Add DSC/FDF files to build capsules and invoke post build shell scripts for
> Linux build environments.
> 
> Make versions consistent.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  .../Capsule/GenerateCapsule/GenCapsuleAll.bat |  12 +-
>   .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  28 ++++
>  .../GenerateCapsule/GenCapsuleMinnowMax.bat   |   4 +-
>  .../GenerateCapsule/GenCapsuleMinnowMax.sh    |  65 ++++++++
>  .../GenCapsuleMinnowMaxRelease.bat            |   4 +-
>  .../GenCapsuleMinnowMaxRelease.sh             |  65 ++++++++
>  .../GenerateCapsule/GenCapsuleSampleColor.sh  |  70
> +++++++++  .../Feature/Capsule/GenerateCapsule/Lvfs.ddf  |  14 ++
>  .../LvfsGenCapsuleMinnowMax.bat               | 139 +++++++++++++++++
>  .../LvfsGenCapsuleMinnowMaxRelease.bat        | 139 +++++++++++++++++
>  .../LvfsGenCapsuleSampleColor.bat             | 145 ++++++++++++++++++
>  .../GenerateCapsule/template.metainfo.xml     |  27 ++++
>  Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc      |  38 +++++
>  13 files changed, 743 insertions(+), 7 deletions(-)  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
> Max.sh
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
> MaxRelease.sh
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleC
> olor.sh
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinn
> owMax.bat
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinn
> owMaxRelease.bat
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSam
> pleColor.bat
>  create mode 100644
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.x
> ml
>  create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
> 
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
> index 187797e284..8f589565fa 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.ba
> +++ t
> @@ -24,6 +24,12 @@
> copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\Ca
> psuleApp.efi %W
> 
>  call GenCapsuleMinnowMax.bat
>  call GenCapsuleMinnowMaxRelease.bat
> -call GenCapsuleSampleColor.bat Blue  149DA854-7D19-4FAA-A91E-
> 862EA1324BE6
> -call GenCapsuleSampleColor.bat Green 79179BFD-704D-4C90-9E02-
> 0AB8D968C18A
> -call GenCapsuleSampleColor.bat Red   72E2945A-00DA-448E-9AA7-
> 075AD840F9D4
> +call GenCapsuleSampleColor.bat Blue
> +149da854-7d19-4faa-a91e-862ea1324be6
> +call GenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-
> 0ab8d968c18a
> +call GenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-
> 075ad840f9d4
> +
> +call LvfsGenCapsuleMinnowMax.bat
> +call LvfsGenCapsuleMinnowMaxRelease.bat
> +call LvfsGenCapsuleSampleColor.bat Blue
> +149da854-7d19-4faa-a91e-862ea1324be6
> +call LvfsGenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-
> 0ab8d968c18a
> +call LvfsGenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-
> 075ad840f9d4
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> new file mode 100644
> index 0000000000..040024553a
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> @@ -0,0 +1,28 @@
> +# @file
> +#   Linux script file to generate UEFI capsules for system firmware and
> +#   firmware for sample devices
> +#
> +# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent #
> +
> +cd $(dirname $0)
> +
> +rm -R $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
> +mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
> +mkdir
> $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment
> +mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
> +mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
> +cp
> $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/Ca
> psuleAp
> +p.efi cp
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.
> efi
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/Ca
> psuleAp
> +pRelease.efi cp
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.ef
> i
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleApp.efi
> +cp
> $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.ef
> i
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleAppRel
> ease.e
> +fi cp
> $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleApp.efi
> +cp
> $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.ef
> i
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleAppRel
> ease.
> +efi
> +
> +. GenCapsuleMinnowMax.sh
> +. GenCapsuleMinnowMaxRelease.sh
> +. GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-
> 862EA1324BE6
> +. GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-
> 0AB8D968C18A
> +. GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-
> 075AD840F9D4
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> index 50ebb160ee..6e4afd201e 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ Max.bat
> @@ -11,8 +11,8 @@ setlocal
>  set FMP_CAPSULE_VENDOR=Intel
>  set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
>  set FMP_CAPSULE_FILE=MinnowMax.cap
> -set FMP_CAPSULE_VERSION=0x00000009
> -set FMP_CAPSULE_STRING=0.0.0.9
> +set FMP_CAPSULE_VERSION=0x0000000C
> +set FMP_CAPSULE_STRING=0.0.0.12
>  set FMP_CAPSULE_NAME="Intel MinnowMax DEBUG
> UEFI %FMP_CAPSULE_STRING%"
>  set FMP_CAPSULE_LSV=0x00000000
>  set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.sh
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMax.sh
> new file mode 100644
> index 0000000000..4fb963c93c
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ Max.sh
> @@ -0,0 +1,65 @@
> +# @file
> +#   Linux script file to generate UEFI capsules for system firmware
> +#
> +# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent #
> +
> +FMP_CAPSULE_VENDOR=Intel
> +FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
> +FMP_CAPSULE_FILE=MinnowMax.cap
> +FMP_CAPSULE_VERSION=0x0000000C
> +FMP_CAPSULE_STRING=0.0.0.12
> +FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI
> $FMP_CAPSULE_STRING"
> +FMP_CAPSULE_LSV=0x00000000
> +FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_
> GCC49/FV/V
> +lv.ROM
> +
> +if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
> +  return
> +fi
> +
> +if [ -e NewCert.pem ]; then
> +  #
> +  # Sign capsule using OpenSSL with a new certificate
> +  #
> +  GenerateCapsule \
> +    --encode \
> +    -v \
> +    --guid $FMP_CAPSULE_GUID \
> +    --fw-version $FMP_CAPSULE_VERSION \
> +    --lsv $FMP_CAPSULE_LSV \
> +    --capflag PersistAcrossReset \
> +    --capflag InitiateReset \
> +    --signer-private-cert=NewCert.pem \
> +    --other-public-cert=NewSub.pub.pem \
> +    --trusted-public-cert=NewRoot.pub.pem \
> +    -o $FMP_CAPSULE_FILE \
> +    $FMP_CAPSULE_PAYLOAD
> +
> +  cp $FMP_CAPSULE_FILE
> + $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
> +
> +  rm $FMP_CAPSULE_FILE
> +fi
> +
> +#
> +# Sign capsule using OpenSSL with EDK II Test Certificate #
> +GenerateCapsule \
> +  --encode \
> +  -v \
> +  --guid $FMP_CAPSULE_GUID \
> +  --fw-version $FMP_CAPSULE_VERSION \
> +  --lsv $FMP_CAPSULE_LSV \
> +  --capflag PersistAcrossReset \
> +  --capflag InitiateReset \
> +
> +--signer-private-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestCert.pem \
> +
> +--other-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
> +estSub.pub.pem \
> +
> +--trusted-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestRoot.pub.pem \
> +  -o $FMP_CAPSULE_FILE \
> +  $FMP_CAPSULE_PAYLOAD
> +
> +cp $FMP_CAPSULE_FILE
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
> +
> +rm $FMP_CAPSULE_FILE
> +
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> index 9d08c86717..43c609e4b2 100644
> ---
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.bat
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ MaxRelease.bat
> @@ -11,8 +11,8 @@ setlocal
>  set FMP_CAPSULE_VENDOR=Intel
>  set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
>  set FMP_CAPSULE_FILE=MinnowMaxRelease.cap
> -set FMP_CAPSULE_VERSION=0x00000009
> -set FMP_CAPSULE_STRING=0.0.0.9
> +set FMP_CAPSULE_VERSION=0x0000000C
> +set FMP_CAPSULE_STRING=0.0.0.12
>  set FMP_CAPSULE_NAME="Intel MinnowMax RELEASE
> UEFI %FMP_CAPSULE_STRING%"
>  set FMP_CAPSULE_LSV=0x00000000
>  set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.sh
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> wMaxRelease.sh
> new file mode 100644
> index 0000000000..29d46dad1e
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinno
> w
> +++ MaxRelease.sh
> @@ -0,0 +1,65 @@
> +# @file
> +#   Linux script file to generate UEFI capsules for system firmware
> +#
> +# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent #
> +
> +FMP_CAPSULE_VENDOR=Intel
> +FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
> +FMP_CAPSULE_FILE=MinnowMaxRelease.cap
> +FMP_CAPSULE_VERSION=0x0000000C
> +FMP_CAPSULE_STRING=0.0.0.12
> +FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI
> $FMP_CAPSULE_STRING"
> +FMP_CAPSULE_LSV=0x00000000
> +FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE
> _GCC49/FV
> +/Vlv.ROM
> +
> +if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
> +  return
> +fi
> +
> +if [ -e NewCert.pem ]; then
> +  #
> +  # Sign capsule using OpenSSL with a new certificate
> +  #
> +  GenerateCapsule \
> +    --encode \
> +    -v \
> +    --guid $FMP_CAPSULE_GUID \
> +    --fw-version $FMP_CAPSULE_VERSION \
> +    --lsv $FMP_CAPSULE_LSV \
> +    --capflag PersistAcrossReset \
> +    --capflag InitiateReset \
> +    --signer-private-cert=NewCert.pem \
> +    --other-public-cert=NewSub.pub.pem \
> +    --trusted-public-cert=NewRoot.pub.pem \
> +    -o $FMP_CAPSULE_FILE \
> +    $FMP_CAPSULE_PAYLOAD
> +
> +  cp $FMP_CAPSULE_FILE
> + $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
> +
> +  rm $FMP_CAPSULE_FILE
> +fi
> +
> +#
> +# Sign capsule using OpenSSL with EDK II Test Certificate #
> +GenerateCapsule \
> +  --encode \
> +  -v \
> +  --guid $FMP_CAPSULE_GUID \
> +  --fw-version $FMP_CAPSULE_VERSION \
> +  --lsv $FMP_CAPSULE_LSV \
> +  --capflag PersistAcrossReset \
> +  --capflag InitiateReset \
> +
> +--signer-private-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestCert.pem \
> +
> +--other-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
> +estSub.pub.pem \
> +
> +--trusted-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestRoot.pub.pem \
> +  -o $FMP_CAPSULE_FILE \
> +  $FMP_CAPSULE_PAYLOAD
> +
> +cp $FMP_CAPSULE_FILE
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
> +
> +rm $FMP_CAPSULE_FILE
> +
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> eColor.sh
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> eColor.sh
> new file mode 100644
> index 0000000000..a1c6f28cde
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampl
> e
> +++ Color.sh
> @@ -0,0 +1,70 @@
> +# @file
> +#   Linux script file to generate UEFI capsules for a sample device
> +#
> +# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent #
> +
> +COLOR=$1
> +
> +FMP_CAPSULE_VENDOR=Intel
> +FMP_CAPSULE_GUID=$2
> +FMP_CAPSULE_FILE=$COLOR.cap
> +FMP_CAPSULE_VERSION=0x00000010
> +FMP_CAPSULE_STRING=0.0.0.16
> +FMP_CAPSULE_NAME="$COLOR Progress Bar $FMP_CAPSULE_STRING"
> +FMP_CAPSULE_LSV=0x00000000
> +FMP_CAPSULE_PAYLOAD=Payload.bin
> +
> +echo "$COLOR Progress Bar" > $FMP_CAPSULE_PAYLOAD
> +
> +if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
> +  return
> +fi
> +
> +if [ -e NewCert.pem ]; then
> +  #
> +  # Sign capsule using OpenSSL with a new certificate
> +  #
> +  GenerateCapsule \
> +    --encode \
> +    -v \
> +    --guid $FMP_CAPSULE_GUID \
> +    --fw-version $FMP_CAPSULE_VERSION \
> +    --lsv $FMP_CAPSULE_LSV \
> +    --capflag PersistAcrossReset \
> +    --capflag InitiateReset \
> +    --signer-private-cert=NewCert.pem \
> +    --other-public-cert=NewSub.pub.pem \
> +    --trusted-public-cert=NewRoot.pub.pem \
> +    -o $FMP_CAPSULE_FILE \
> +    $FMP_CAPSULE_PAYLOAD
> +
> +  cp $FMP_CAPSULE_FILE
> + $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
> +
> +  rm $FMP_CAPSULE_FILE
> +fi
> +
> +#
> +# Sign capsule using OpenSSL with EDK II Test Certificate #
> +GenerateCapsule \
> +  --encode \
> +  -v \
> +  --guid $FMP_CAPSULE_GUID \
> +  --fw-version $FMP_CAPSULE_VERSION \
> +  --lsv $FMP_CAPSULE_LSV \
> +  --capflag PersistAcrossReset \
> +  --capflag InitiateReset \
> +
> +--signer-private-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestCert.pem \
> +
> +--other-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
> +estSub.pub.pem \
> +
> +--trusted-public-
> cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
> +/TestRoot.pub.pem \
> +  -o $FMP_CAPSULE_FILE \
> +  $FMP_CAPSULE_PAYLOAD
> +
> +cp $FMP_CAPSULE_FILE
> +$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
> +
> +rm $FMP_CAPSULE_FILE
> +
> +rm $FMP_CAPSULE_PAYLOAD
> diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
> new file mode 100644
> index 0000000000..f2c925a6dd
> --- /dev/null
> +++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
> @@ -0,0 +1,14 @@
> +.OPTION EXPLICIT ; Generate errors on variable typos
> +
> +.Set CabinetNameTemplate=firmware.cab ; The name of the file .set
> +DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
> +.Set Cabinet=on ; .Set Compress=on ; .Set DiskDirectory1=.
> +.Set MaxDiskSize=99999744               ; multiple of 512
> +
> +;*** Files to zip ;
> +;
> +firmware.bin
> +firmware.metainfo.xml
> +;***
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> nnowMax.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> nnowMax.bat
> new file mode 100644
> index 0000000000..dd8274a1cc
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> +++ nnowMax.bat
> @@ -0,0 +1,139 @@
> +@REM @file
> +@REM   Windows batch file to generate UEFI capsules for system firmware
> +@REM
> +@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
> +
> +@echo off
> +setlocal
> +
> +set FMP_CAPSULE_VENDOR=Intel
> +set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
> +set FMP_CAPSULE_BASE_NAME=MinnowMax
> +set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
> +set FMP_CAPSULE_VERSION=0x0000000C
> +set FMP_CAPSULE_VERSION_DECIMAL=12
> +set FMP_CAPSULE_STRING=0.0.0.12
> +set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% DEBUG
> UEFI %FMP_CAPSULE_STRING%"
> +set FMP_CAPSULE_LSV=0x00000000
> +set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +set
> +FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBU
> G_VS2015x86
> +\FV\Vlv.ROM set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +
> +if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
> +
> +if exist "%FMP_CAPSULE_KEY%" (
> +  REM
> +  REM Sign capsule using signtool
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
> +    --pfx-file %FMP_CAPSULE_KEY% ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +if exist "NewCert.pem" (
> +  REM
> +  REM Sign capsule using OpenSSL with a new certificate
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signer-private-cert=NewCert.pem ^
> +    --other-public-cert=NewSub.pub.pem ^
> +    --trusted-public-cert=NewRoot.pub.pem ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +REM
> +REM Sign capsule using OpenSSL with EDK II Test Certificate REM call
> +GenerateCapsule ^
> +  --encode ^
> +  -v ^
> +  --guid %FMP_CAPSULE_GUID% ^
> +  --fw-version %FMP_CAPSULE_VERSION% ^
> +  --lsv %FMP_CAPSULE_LSV% ^
> +  --capflag PersistAcrossReset ^
> +  --capflag InitiateReset ^
> +
> +--signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestCert.pem ^
> +
> +--other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
> +TestSub.pub.pem ^
> +
> +--trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestRoot.pub.pem ^
> +  -o %FMP_CAPSULE_FILE% ^
> +  %FMP_CAPSULE_PAYLOAD%
> +
> +copy %FMP_CAPSULE_FILE%
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
> +
> +copy %FMP_CAPSULE_FILE% firmware.bin
> +copy template.metainfo.xml firmware.metainfo.xml powershell -Command
> +"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +makecab /f Lvfs.ddf
> +copy firmware.cab
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BASE
> +_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +erase firmware.cab
> +erase setup.inf
> +erase setup.rpt
> +
> +erase firmware.metainfo.xml
> +erase firmware.bin
> +erase %FMP_CAPSULE_FILE%
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> nnowMaxRelease.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> nnowMaxRelease.bat
> new file mode 100644
> index 0000000000..2b68a98f98
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
> +++ nnowMaxRelease.bat
> @@ -0,0 +1,139 @@
> +@REM @file
> +@REM   Windows batch file to generate UEFI capsules for system firmware
> +@REM
> +@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
> +
> +@echo off
> +setlocal
> +
> +set FMP_CAPSULE_VENDOR=Intel
> +set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
> +set FMP_CAPSULE_BASE_NAME=MinnowMaxRelease
> +set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
> +set FMP_CAPSULE_VERSION=0x0000000C
> +set FMP_CAPSULE_VERSION_DECIMAL=12
> +set FMP_CAPSULE_STRING=0.0.0.12
> +set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% RELEASE
> UEFI %FMP_CAPSULE_STRING%"
> +set FMP_CAPSULE_LSV=0x00000000
> +set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +set
> +FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEA
> SE_VS2015x
> +86\FV\Vlv.ROM set
> WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +
> +if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
> +
> +if exist "%FMP_CAPSULE_KEY%" (
> +  REM
> +  REM Sign capsule using signtool
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
> +    --pfx-file %FMP_CAPSULE_KEY% ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +if exist "NewCert.pem" (
> +  REM
> +  REM Sign capsule using OpenSSL with a new certificate
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signer-private-cert=NewCert.pem ^
> +    --other-public-cert=NewSub.pub.pem ^
> +    --trusted-public-cert=NewRoot.pub.pem ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +REM
> +REM Sign capsule using OpenSSL with EDK II Test Certificate REM call
> +GenerateCapsule ^
> +  --encode ^
> +  -v ^
> +  --guid %FMP_CAPSULE_GUID% ^
> +  --fw-version %FMP_CAPSULE_VERSION% ^
> +  --lsv %FMP_CAPSULE_LSV% ^
> +  --capflag PersistAcrossReset ^
> +  --capflag InitiateReset ^
> +
> +--signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestCert.pem ^
> +
> +--other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
> +TestSub.pub.pem ^
> +
> +--trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestRoot.pub.pem ^
> +  -o %FMP_CAPSULE_FILE% ^
> +  %FMP_CAPSULE_PAYLOAD%
> +
> +copy %FMP_CAPSULE_FILE%
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
> +
> +copy %FMP_CAPSULE_FILE% firmware.bin
> +copy template.metainfo.xml firmware.metainfo.xml powershell -Command
> +"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +makecab /f Lvfs.ddf
> +copy firmware.cab
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BASE
> +_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +erase firmware.cab
> +erase setup.inf
> +erase setup.rpt
> +
> +erase firmware.metainfo.xml
> +erase firmware.bin
> +erase %FMP_CAPSULE_FILE%
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSa
> mpleColor.bat
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSa
> mpleColor.bat
> new file mode 100644
> index 0000000000..1dbbe7341d
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSa
> +++ mpleColor.bat
> @@ -0,0 +1,145 @@
> +@REM @file
> +@REM   Windows batch file to generate UEFI capsules for a sample device
> +@REM
> +@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
> +
> +@echo off
> +setlocal
> +
> +set COLOR=%1
> +
> +set FMP_CAPSULE_VENDOR=Intel
> +set FMP_CAPSULE_GUID=%2
> +set FMP_CAPSULE_BASE_NAME=%COLOR%
> +set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
> +set FMP_CAPSULE_VERSION=0x00000010
> +set FMP_CAPSULE_VERSION_DECIMAL=16
> +set FMP_CAPSULE_STRING=0.0.0.16
> +set FMP_CAPSULE_NAME="%FMP_CAPSULE_BASE_NAME% Progress
> Bar %FMP_CAPSULE_STRING%"
> +set FMP_CAPSULE_LSV=0x00000000
> +set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +set FMP_CAPSULE_PAYLOAD=Payload.bin
> +set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
> +
> +echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD%
> +
> +if not exist "%FMP_CAPSULE_PAYLOAD%" exit
> +
> +if exist "%FMP_CAPSULE_KEY%" (
> +  REM
> +  REM Sign capsule using signtool
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
> +    --pfx-file %FMP_CAPSULE_KEY% ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +if exist "NewCert.pem" (
> +  REM
> +  REM Sign capsule using OpenSSL with a new certificate
> +  REM
> +  call GenerateCapsule ^
> +    --encode ^
> +    -v ^
> +    --guid %FMP_CAPSULE_GUID% ^
> +    --fw-version %FMP_CAPSULE_VERSION% ^
> +    --lsv %FMP_CAPSULE_LSV% ^
> +    --capflag PersistAcrossReset ^
> +    --capflag InitiateReset ^
> +    --signer-private-cert=NewCert.pem ^
> +    --other-public-cert=NewSub.pub.pem ^
> +    --trusted-public-cert=NewRoot.pub.pem ^
> +    -o %FMP_CAPSULE_FILE% ^
> +    %FMP_CAPSULE_PAYLOAD%
> +
> +  copy %FMP_CAPSULE_FILE%
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
> +
> +  copy %FMP_CAPSULE_FILE% firmware.bin
> +  copy template.metainfo.xml firmware.metainfo.xml  powershell -
> Command
> + "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +  powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +  makecab /f Lvfs.ddf
> +  copy firmware.cab
> + %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BAS
> + E_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +  erase firmware.cab
> +  erase setup.inf
> +  erase setup.rpt
> +
> +  erase firmware.metainfo.xml
> +  erase firmware.bin
> +  erase %FMP_CAPSULE_FILE%
> +)
> +
> +REM
> +REM Sign capsule using OpenSSL with EDK II Test Certificate REM call
> +GenerateCapsule ^
> +  --encode ^
> +  -v ^
> +  --guid %FMP_CAPSULE_GUID% ^
> +  --fw-version %FMP_CAPSULE_VERSION% ^
> +  --lsv %FMP_CAPSULE_LSV% ^
> +  --capflag PersistAcrossReset ^
> +  --capflag InitiateReset ^
> +
> +--signer-private-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestCert.pem ^
> +
> +--other-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
> +TestSub.pub.pem ^
> +
> +--trusted-public-
> cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
> +n\TestRoot.pub.pem ^
> +  -o %FMP_CAPSULE_FILE% ^
> +  %FMP_CAPSULE_PAYLOAD%
> +
> +copy %FMP_CAPSULE_FILE%
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
> +
> +copy %FMP_CAPSULE_FILE% firmware.bin
> +copy template.metainfo.xml firmware.metainfo.xml powershell -Command
> +"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID',
> '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding
> ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_VERSION_DECIMAL',
> '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File
> firmware.metainfo.xml -encoding ASCII"
> +powershell -Command "(gc firmware.metainfo.xml) -replace
> 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -
> encoding ASCII"
> +makecab /f Lvfs.ddf
> +copy firmware.cab
> +%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPS
> ULE_BASE
> +_NAME%-%FMP_CAPSULE_STRING%.cab
> +
> +erase firmware.cab
> +erase setup.inf
> +erase setup.rpt
> +
> +erase firmware.metainfo.xml
> +erase firmware.bin
> +erase %FMP_CAPSULE_FILE%
> +
> +erase %FMP_CAPSULE_PAYLOAD%
> diff --git
> a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo
> .xml
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo
> .xml
> new file mode 100644
> index 0000000000..5d550c1f48
> --- /dev/null
> +++
> b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainf
> +++ o.xml
> @@ -0,0 +1,27 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<component type="firmware">
> +  <id>com.intel.FMP_CAPSULE_BASE_NAME.firmware</id>
> +  <name>FMP_CAPSULE_BASE_NAME</name>
> +  <summary>System firmware for the
> FMP_CAPSULE_BASE_NAME</summary>
> +  <description>
> +    Description of System firmware for the FMP_CAPSULE_BASE_NAME
> +  </description>
> +  <provides>
> +    <firmware type="flashed">FMP_CAPSULE_GUID</firmware>
> +  </provides>
> +  <url type="homepage">http://www.tianocore.org</url>
> +  <metadata_license>CC0-1.0</metadata_license>
> +  <project_license>BSD</project_license>
> +  <developer_name>Tianocore</developer_name>
> +  <releases>
> +    <release version="FMP_CAPSULE_VERSION_DECIMAL"
> date="FMP_CAPSULE_DATE">
> +      <description>
> +        Build FMP_CAPSULE_STRING
> +      </description>
> +    </release>
> +  </releases>
> +  <!-- most OEMs do not need to do this... -->
> +  <custom>
> +    <value key="LVFS::InhibitDownload"/>
> +  </custom>
> +</component>
> diff --git a/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
> b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
> new file mode 100644
> index 0000000000..1856ac349b
> --- /dev/null
> +++ b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
> @@ -0,0 +1,38 @@
> +#/** @file
> +# Platform capsule description.
> +#
> +# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # #**/
> +
> +[Defines]
> +  PLATFORM_NAME                  = Vlv2TbltDevicePkg
> +  PLATFORM_GUID                  = EE87F258-6ECC-4415-B1D8-23771BEE26E7
> +  PLATFORM_VERSION               = 0.1
> +  FLASH_DEFINITION               = Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
> +  OUTPUT_DIRECTORY               = Build/Vlv2TbltDevicePkg
> +  SUPPORTED_ARCHITECTURES        = IA32|X64
> +  BUILD_TARGETS                  = DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  POSTBUILD                      =
> Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> +
> +#########################################################
> ##############
> +############################
> +#
> +# Components Section - list of the modules and components that will be
> processed by compilation
> +#                      tools and the EDK II tools to generate PE32/PE32+/Coff image
> files.
> +#
> +# Note: The EDK II DSC file is not used to specify how compiled binary
> images get placed
> +#       into firmware volume images. This section is just a list of modules to
> compile from
> +#       source into UEFI-compliant binaries.
> +#       It is the FDF file that contains information on combining binary files into
> firmware
> +#       volume images, whose concept is beyond UEFI and is described in PI
> specification.
> +#       Binary modules do not need to be listed in this section, as they should
> be
> +#       specified in the FDF file. For example: Shell binary, FAT binary (Fat.efi),
> +#       Logo (Logo.bmp), and etc.
> +#       There may also be modules listed in this section that are not required
> in the FDF file,
> +#       When a module listed here is excluded from FDF file, then UEFI-
> compliant binary will be
> +#       generated for it, but the binary will not be put into any firmware
> volume.
> +#
> +#########################################################
> ##############
> +############################
> --
> 2.21.0.windows.1


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

* Re: [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md
  2019-05-09  4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
@ 2019-05-09  7:58   ` Sun, Zailiang
  2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  7:58 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Hi Michael,

It seems that GCC build instructions does not work. Tried adding a line "cd .." before the
line "mkdir Conf" then it worked.

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/Readme.md | 232 +++++++++++++++++++++++++++++-
> ------
>  1 file changed, 190 insertions(+), 42 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/Readme.md b/Vlv2TbltDevicePkg/Readme.md
> index 139aa4ea61..647d0ba361 100644
> --- a/Vlv2TbltDevicePkg/Readme.md
> +++ b/Vlv2TbltDevicePkg/Readme.md
> @@ -1,39 +1,18 @@
>  # **EDK II firmware for Minnowboard Max/Turbot which is based on Intel
> Valleyview2 SoC (Byatrail platform)**
> 
>  ----------
> -
> -
> -## **How to Create a Full Source Tree for Minnowboard Max/Turbot under
> Windows** -### Pre-requisites
> +# Windows Pre-requisites
> 
>  * GIT client: Available from https://git-scm.com/downloads
> 
> -### Download Source Code
> -* Create a new directory C:\WORKSPACE as an EDK II work space.
> -
> -* GIT clone operations required to pull the EDK II source tree and the edk2-
> non-osi repository. Run below command in git bash or windows command
> line.
> -
> -  - cd C:\WORKSPACE
> -  - git clone https://github.com/tianocore/edk2.git
> -  - git clone https://github.com/tianocore/edk2-non-osi.git
> -
> -    Note: The EDK II [Multiple
> Workspace](https://github.com/tianocore/tianocore.github.io/wiki/Multiple
> _Workspace)
> -feature is used by this project.
> -
> -* Follow the instructions found in the file "OpenSSL-HOWTO.txt" in your
> work space (e.g.
> "C:\WORKSPACE\edk2\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt")
> to install the Openssl source code.
> -
> -## **Windows Build Instructions**
> -
> -### Pre-requisites Tools
> -
>  * Microsoft Visual Studio.
>    - Visual Studio 2015 recommended and is used in the examples below.
> Visual Studio 2013 is also supported.
> -
> +
>  * WINDDK
>    - Download Microsoft Windows Driver Development Kit 3790.1830 and
> install it to C:\WINDDK\3790.1830.
> -
> -* Python 2.7
> -  - Available from http://www.python.org. Install Python to C:\Python27,
> and add the path "C:\Python27" to system environment variable
> **PYTHON_HOME**.
> +
> +* Python 3
> +  - https://www.python.org/downloads/
> 
>  * Install iASL
>     - Install the iasl compiler by downloading iasl-win-20160527.zip from the
> following @@ -42,34 +21,203 @@ feature is used by this project.
>     (create the folder "C:\ASL" if it does not exist).
> 
>  * Install the NASM* assembly language compiler
> -   - Download NASM* 2.12.02 binaries from
> +   - Download NASM* 2.12.02 binaries from
>     http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-
> 2.12.02-win64.zip and place the
>     unzipped content ("nasm.exe") into the directory "C:\NASM" on your local
> hard drive
>     (create the folder "C:\NASM" if it does not exist). Add the path
> "C:\NASM\" to system environment variable **NASM_PREFIX**.
> 
>  * Install Openssl
> -   - Download a pre-compiled Openssl Windows binary from
> -   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary
> in the list
> -   of "Third Party OpenSSL Related Binary Distributions". Go to the third party
> site to
> -   download the latest version. Download and extract to C:\Openssl, add the
> path of openssl.exe
> +   - Download a pre-compiled Openssl Windows binary from
> +   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary
> in the list
> +   of "Third Party OpenSSL Related Binary Distributions". Go to the third
> party site to
> +   download the latest version. Download and extract to C:\Openssl, add
> + the path of openssl.exe
>     ("C:\openssl") to system environment variable **OPENSSL_PATH**.
> 
> +# Download and Build MinnowMax using Windows/Visual Studio
> 
> +Run the script below from an empty directory.  The script clones the
> +EDK II repository from GitHub and downloads and unzips the binary
> +support files for the MinnowBoard MAX.  It then sets up the environment
> +for EDK II builds and builds the MinnowBoard MAX firmware and generates
> +UEFI Capsules that can be used to update the MinnowBoard MAX firmware
> and three sample devices.
> 
> -### Build Commands
> -  * cd C:\WORKSPACE\edk2\Vlv2TbltDevicePkg
> +```
> +git clone --recurse-submodules https://github.com/tianocore/edk2.git
> 
> -  * To build 64-bit release version image: Build_IFWI.bat MNW2 Release
> +powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile
> openssl-1.0.2r-x64_86-win64.zip"}"
> +powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip
> 
> -  * To build 64-bit debug version image: Build_IFWI.bat MNW2 Debug
> -
> -  * To build 32-bit release version image: Build_IFWI.bat /IA32 MNW2
> Release
> +powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://firmware.intel.com/sites/default/files/MinnowBoardMax-
> Development190216.zip -OutFile MinnowBoardMax-
> Development190216.zip"}"
> +powershell Expand-Archive MinnowBoardMax-Development190216.zip
> +sleep 1
> +rename MinnowBoardMax-Development190216 Vlv2Binaries cd
> Vlv2Binaries
> +powershell Expand-Archive Vlv2SocBinPkg.zip .
> +sleep 1
> +cd ..
> 
> -  * To build 32-bit debug version image: Build_IFWI.bat /IA32 MNW2 Debug
> +powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-
> 2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
> +powershell Expand-Archive nasm-2.13.03-win64.zip .
> 
> -### Output
> -* After the build process successfully completes, the 8MB firmware binary
> image will -be located in the following location on your local hard drive:
> -"C:\WORKSPACE\edk2\Vlv2TbltDevicePkg\Stitch\"
> +mkdir Conf
> 
> +set WORKSPACE=%CD%
> +set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
> +set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
> +set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
> +path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-
> 1.0.2r-x64_8
> +6-win64 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
> 
> +cd %WORKSPACE%\edk2
> +
> +call edkSetup.bat Rebuild
> +
> +cd Vlv2TbltDevicePkg
> +
> +Build_IFWI.bat /m /y MNW2 Debug
> +```
> +
> +Once all the code and tools are downloaded and installed, only the
> +following commands are required to setup the environment.  Run these
> +from the same directory used to install the source and binaries.
> +
> +```
> +set WORKSPACE=%CD%
> +set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
> +set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
> +set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
> +path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-
> 1.0.2r-x64_8
> +6-win64 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
> +
> +cd %WORKSPACE%\edk2
> +
> +call edkSetup.bat Rebuild
> +```
> +
> +Once the environment is setup, the MinnowBoard MAX firmware and
> +capsules can be rebuilt using the following commands.
> +
> +* Build Debug Image
> +
> +```
> +cd Vlv2TbltDevicePkg
> +Build_IFWI.bat /m /y MNW2 Debug
> +```
> +
> +* Build Release Image
> +
> +```
> +cd Vlv2TbltDevicePkg
> +Build_IFWI.bat /m /y MNW2 Release
> +```
> +
> +The generated firmware image is the newest `.bin` file in
> `edk2/Vlv2TbltDevicePkg/Stitch`.
> +The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.
> +
> +The CapsuleApp and generated UEFI Capsules are in
> +`Build/Vlv2TbltDevicePkg/Capsules`
> +
> +# Download and Build MinnowMax using Linux/GCC
> +
> +Run the script below from an empty directory.  The script clones the
> +EDK II repository from GitHub and downloads and unzips the binary
> +support files for the MinnowBoard MAX.  It then sets up the environment
> +for EDK II builds and builds the MinnowBoard MAX firmware and generates
> +UEFI Capsules that can be used to update the MinnowBoard MAX firmware
> and three sample devices.
> +
> +```
> +git clone --recurse-submodules https://github.com/tianocore/edk2.git
> +
> +mkdir Vlv2Binaries
> +cd Vlv2Binaries
> +wget
> +https://firmware.intel.com/sites/default/files/MinnowBoardMax-
> Developme
> +nt190216.zip unzip MinnowBoardMax-Development190216.zip
> +unzip Vlv2SocBinPkg.zip
> +
> +mkdir Conf
> +
> +export WORKSPACE=$PWD/edk2
> +export PACKAGES_PATH=$PWD/Vlv2Binaries
> +export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
> +
> +cd edk2
> +cd Vlv2TbltDevicePkg
> +. Build_IFWI.sh MNW2 Debug
> +```
> +
> +Once all the code is downloaded and installed, only the following
> +commands are required to setup the environment.  Run these from the
> +same directory used to install the source and binaries.
> +
> +```
> +export WORKSPACE=$PWD/edk2
> +export PACKAGES_PATH=$PWD/Vlv2Binaries
> +export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
> +
> +cd edk2
> +cd Vlv2TbltDevicePkg
> +```
> +
> +Once the environment is setup, the MinnowBoard MAX firmware and
> +capsules can be rebuilt using the following commands.
> +
> +
> +* Build Debug Image
> +
> +```
> +cd Vlv2TbltDevicePkg
> +./Build_IFWI.sh MNW2 Debug
> +```
> +
> +* Build Release Image
> +
> +```
> +cd Vlv2TbltDevicePkg
> +./Build_IFWI.sh MNW2 Release
> +```
> +
> +The generated firmware image is the
> `MNW2MAX_X64_D_0084_01_GCC.bin`
> +file in `edk2\Vlv2TbltDevicePkg\Stitch`
> +
> +The CapsuleApp and generated UEFI Capsules are in
> +`Build\Vlv2TbltDevicePkg\Capsules`
> +
> +# Use DediProg to update FLASH image on a MinnowBoard MAX Target
> +
> +# Update MinnowBoard MAX Firmware from UEFI Capsules
> +
> +* Copy the `Build/Vlv2TbltDevicePkg/Capsules` directory to a USB FLASH
> +drive
> +* Connect USB FLASH Drive to MinnowBoard MAX
> +* Boot MinnowBoard MAX to the Boot Manager
> +* Boot the `EFI Internal Shell` boot option
> +* Mount the USB FLASH Drive (usually `FS1`)
> +* Use `cd` command to go to `Capsules/TestCert` directory
> +* Run the following command to apply all four capsules
> +
> +```
> +CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap ```
> +
> +* The MinnowBoard MAX should reboot and the four capsules are applied
> +in the
> +  order listed.  The progress bar matches the color name of the capsule.
> +  MinnowMax.cap uses the color purple.  Once all capsules are
> +processed, the
> +  MinnowBoard MAX should reboot again using the new firmware images.
> +
> +# Generate and Test a UX BitMap Capsule
> +
> +* Use bitmap editor to generate a BMP file.  Recommend resolution of
> +600 wide
> +  by 100 tell and either 24 or 32 bits per pixel.
> +* Save BMP file to USB FLASH drive
> +* Use CapsuleApp.efi to convert BMP file to a UX Capsule
> +
> +```
> +CapsuleApp.efi -G MyImage.bmp -O MyImage.cap ```
> +
> +* When updating firmware using capsules, add UX capsule to the list of
> +capsules
> +  passed into CapsuleApp.efi.
> +
> +```
> +CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap
> ```
> +
> +* When the capsules are processed the UX bitmap image should be
> +displayed at the
> +  bottom of the screen.
> --
> 2.21.0.windows.1


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

* Re: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
  2019-05-09  4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
@ 2019-05-09  8:15   ` Sun, Zailiang
  2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Sun, Zailiang @ 2019-05-09  8:15 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Qian, Yi

Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to
> UINTN
> 
> Change the type of the local variable Size in the function
> AcpiPlatformEntryPoint() from UINT32 to UINTN.  This local variable is passed
> into the function ReadSection() that returns a value of type UINTN.  Using
> type UINT32 can potentially corrupt an adjacent local on the stack.
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> index 0bd375391e..5c03f66edb 100644
> --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2004  - 2019, Intel Corporation. All rights
> + reserved.<BR>
> 
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent @@ -778,7 +778,7 @@
> AcpiPlatformEntryPoint (
>    EFI_ACPI_COMMON_HEADER        *CurrentTable;
>    UINTN                         TableHandle;
>    UINT32                        FvStatus;
> -  UINT32                        Size;
> +  UINTN                         Size;
>    EFI_EVENT                     Event;
>    EFI_ACPI_TABLE_VERSION        TableVersion;
>    UINTN                         VarSize;
> @@ -1223,7 +1223,7 @@ AcpiPlatformEntryPoint (
>                        EFI_SECTION_RAW,
>                        Instance,
>                        (VOID **) &CurrentTable,
> -                      (UINTN *) &Size,
> +                      &Size,
>                        &FvStatus
>                        );
> 
> --
> 2.21.0.windows.1


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

* Re: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
  2019-05-09  7:53   ` Sun, Zailiang
  2019-05-09  7:53   ` Sun, Zailiang
@ 2019-05-09 13:18   ` Qian, Yi
  2 siblings, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:18 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return

If the FLASH device cannot be erased or written, then the flag FlashError is set to TRUE.

Add the missing logic to return an error if FlashError is TRUE.  The missing logic was found from a GCC build that noticed a local variable was declared and assigned, but was not being used.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
index 052ccb891c..079c3ef2d6 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/P
+++ latformFlashAccessLib.c
@@ -1,7 +1,7 @@
 /** @file
   Platform Flash Access library.
 
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2016 - 2019, Intel Corporation. All rights 
+ reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -529,6 +529,10 @@ Done:
     Progress (EndPercentage);
   }
 
+  if (FlashError) {
+    return EFI_WRITE_PROTECTED;
+  }
+
   return EFI_SUCCESS;
 }
 
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
  2019-05-09  4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
  2019-05-09  7:53   ` Sun, Zailiang
@ 2019-05-09 13:18   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:18 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex

Add the arch protocols gEfiVariableArchProtocolGuid and gEfiVariableWriteArchProtocolGuid to the dependency expression for the AcpiPlatform module to guarantee that the variables that AcpiPlatform depends upon are set before they are used by this module.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
index 8422985764..c59920db03 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
@@ -1,10 +1,12 @@
 #
 #
-# Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
-#                                                                        

+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved #
+
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 
-#                                                                        

+#
+
 #
 #
 #  Module Name:
@@ -79,6 +81,8 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile
 
 [Depex]
+  gEfiVariableArchProtocolGuid        AND
+  gEfiVariableWriteArchProtocolGuid   AND
   gEfiAcpiSupportProtocolGuid AND
   gEfiMpServiceProtocolGuid AND
   gEfiCpuIoProtocolGuid
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master
  2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
                   ` (15 preceding siblings ...)
  2019-05-09  4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
@ 2019-05-09 13:18 ` Qian, Yi
  16 siblings, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:18 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master

Fix a number of small issues for MinnowMax to build and boot with latest edk2/master and to prepare MinnowMax for move to edk2-platforms/master.
 
Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Michael D Kinney (16):
  Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
  Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
  Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
  Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
  Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
  Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
  Vlv2TbltDevicePkg: Build full UEFI Shell from sources
  Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
  Vlv2TbltDevicePkg: Add PchInitSmm module
  Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
  Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
  Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
  Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
  Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools
  Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
  Vlv2TbltDevicePkg: Update Readme.md

 Vlv2TbltDevicePkg/.gitignore                  |   2 +
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c |   6 +-
 .../AcpiPlatform/AcpiPlatform.inf             |  10 +-
 Vlv2TbltDevicePkg/Build_IFWI.bat              |  31 ++-
 .../Capsule/GenerateCapsule/GenCapsuleAll.bat |  12 +-  .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  28 +++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat   |   6 +-
 .../GenerateCapsule/GenCapsuleMinnowMax.sh    |  65 +++++
 .../GenCapsuleMinnowMaxRelease.bat            |   6 +-
 .../GenCapsuleMinnowMaxRelease.sh             |  65 +++++
 .../GenerateCapsule/GenCapsuleSampleColor.bat |   2 -
 .../GenerateCapsule/GenCapsuleSampleColor.sh  |  70 ++++++  .../Feature/Capsule/GenerateCapsule/Lvfs.ddf  |  14 ++
 .../LvfsGenCapsuleMinnowMax.bat               | 139 +++++++++++
 .../LvfsGenCapsuleMinnowMaxRelease.bat        | 139 +++++++++++
 .../LvfsGenCapsuleSampleColor.bat             | 145 +++++++++++
 .../GenerateCapsule/template.metainfo.xml     |  27 ++
 .../Library/FmpDeviceLib/FmpDeviceLib.c       |   7 +-
 .../PlatformFlashAccessLib.c                  |   6 +-
 .../Library/PlatformBdsLib/BdsPlatform.c      |  23 +-
 .../Library/PlatformBdsLib/PlatformBdsLib.inf |  10 +-
 .../Library/GenericBdsLib/BdsBoot.c           |   8 +-
 .../Library/GenericBdsLib/GenericBdsLib.inf   |   5 +-
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc      |  38 +++
 Vlv2TbltDevicePkg/PlatformPkg.fdf             |   3 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf          |  10 +-
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc       |  31 ++-
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc         |  31 ++-
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc          |  30 ++-
 Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c       |   5 +-
 Vlv2TbltDevicePkg/Readme.md                   | 232 ++++++++++++++----
 ...MiscNumberOfInstallableLanguagesFunction.c |  10 +-
 .../Stitch/Gcc/NvStorageVariable.bin          | Bin 253952 -> 253952 bytes
 Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat       |  23 +-
 Vlv2TbltDevicePkg/bldX64.bat                  | 216 ----------------
 Vlv2TbltDevicePkg/bld_vlv.bat                 | 129 ++++++----
 Vlv2TbltDevicePkg/bld_vlv.sh                  |   3 +-
 37 files changed, 1194 insertions(+), 393 deletions(-)  create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
 create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
 delete mode 100644 Vlv2TbltDevicePkg/bldX64.bat

--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
  2019-05-09  4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:18   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:18 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg

Use CpuDxe module from UefiCPuPkg instead of pre-built binary module MpCpu.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf       |  2 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    |  2 +-
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc |  8 ++++++--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   |  7 +++++--
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 10 ++++++++--
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index be05fa136b..c725cdcf31 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -458,7 +458,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MpCpu.inf
+INF UefiCpuPkg/CpuDxe/CpuDxe.inf
 INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index d3c7409c4b..349fbb2887 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -414,7 +414,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MpCpu.inf
+INF UefiCpuPkg/CpuDxe/CpuDxe.inf
 INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index eb1a732683..44a5806153 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCp
+ uExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
+ iCpuExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1087,6 +1089,7 @@ [Components.X64]
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
       MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
       HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
+ iCpuExceptionHandlerLib.inf
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
       DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
 !endif
@@ -1304,6 +1307,7 @@ [Components.X64]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index d1144db9d9..bff0fe21af 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCp
+ uExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -316,7 +317,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
+ iCpuExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1292,6 +1294,7 @@ [Components.IA32]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 1784554160..7630b48ea6 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -199,7 +199,8 @@ [LibraryClasses.common]
   #
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
-  CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCp
+ uExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
 
   #
   # ICH
@@ -275,6 +276,8 @@ [LibraryClasses.common]
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+
+ ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandL
+ ib.inf
+ HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsi
+ ngLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -316,7 +319,8 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
   MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatformLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
-
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
+ iCpuExceptionHandlerLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
 
 !if $(PERFORMANCE_ENABLE) == TRUE
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
@@ -1087,6 +1091,7 @@ [Components.X64]
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
       MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
       HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
+ iCpuExceptionHandlerLib.inf
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
       DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
 !endif
@@ -1304,6 +1309,7 @@ [Components.X64]
   #
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+  UefiCpuPkg/CpuDxe/CpuDxe.inf
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
  2019-05-09  4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol

The NumberOfEnabledProcessors parameter to the MP Services Protocol service GetNumberOfProcessors() is not optional and is not allowed to be NULL.  Add the CpuEnabledCount local variable and pass it into GetNumberOfProcessors().

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
index 28de8457ce..3583e324e6 100644
--- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
+++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c
@@ -1,5 +1,5 @@
 /**
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2019, Intel Corporation. All rights 
+ reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 
@@ -40,6 +40,7 @@ PpmPolicyEntry(
   EFI_HANDLE                Handle;
   EFI_STATUS                Status;
   UINTN                     CpuCount;
+  UINTN                     CpuEnabledCount;
   UINT8                     CPUMobileFeature;
 
   PCH_STEPPING              Stepping;
@@ -63,7 +64,7 @@ PpmPolicyEntry(
   //
   // Get processor count from MP service.
   //
-  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, NULL);
+  Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, 
+ &CpuEnabledCount);
   ASSERT_EFI_ERROR (Status);
 
   //
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
  2019-05-09  4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
  2019-05-09  8:15   ` Sun, Zailiang
@ 2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN

Change the type of the local variable Size in the function
AcpiPlatformEntryPoint() from UINT32 to UINTN.  This local variable is passed into the function ReadSection() that returns a value of type UINTN.  Using type UINT32 can potentially corrupt an adjacent local on the stack.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index 0bd375391e..5c03f66edb 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights 
+ reserved.<BR>
 
 
   SPDX-License-Identifier: BSD-2-Clause-Patent @@ -778,7 +778,7 @@ AcpiPlatformEntryPoint (
   EFI_ACPI_COMMON_HEADER        *CurrentTable;
   UINTN                         TableHandle;
   UINT32                        FvStatus;
-  UINT32                        Size;
+  UINTN                         Size;
   EFI_EVENT                     Event;
   EFI_ACPI_TABLE_VERSION        TableVersion;
   UINTN                         VarSize;
@@ -1223,7 +1223,7 @@ AcpiPlatformEntryPoint (
                       EFI_SECTION_RAW,
                       Instance,
                       (VOID **) &CurrentTable,
-                      (UINTN *) &Size,
+                      &Size,
                       &FvStatus
                       );
 
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources
  2019-05-09  4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources

Update DSC files to build full UEFI Shell from sources.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 20 ++++++++++++++++++--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 22 ++++++++++++++++++----
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 22 ++++++++++++++++++----
 3 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 4a10840c5c..eb1a732683 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -274,7 +274,6 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
@@ -1378,7 +1377,24 @@ [Components.X64]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index a99a5dfd5a..d1144db9d9 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -274,10 +274,7 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
-  HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -1368,7 +1365,24 @@ [Components.IA32]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 0fac892bd5..1784554160 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -274,10 +274,7 @@ [LibraryClasses.common]  !if $(RC_BINARY_RELEASE) == TRUE
   I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf
 !endif
-  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
-  HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 !if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE @@ -1380,7 +1377,24 @@ [Components.X64]
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
-  ShellPkg/Application/Shell/Shell.inf
+  ShellPkg/Application/Shell/Shell.inf {
+    <LibraryClasses>
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+    <PcdsFixedAtBuild>
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+  }
 !if $(SATA_ENABLE) == TRUE
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
  2019-05-09  4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid

Remove use of PCD PcdShellFile from the IntelFrameworkModulePkg and instead use gUefiShellFileGuid to find the UEFI Shell in an FV.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c |  4 ++--
 .../Library/PlatformBdsLib/PlatformBdsLib.inf          | 10 ++++++----
 .../Library/GenericBdsLib/BdsBoot.c                    |  8 ++++----
 .../Library/GenericBdsLib/GenericBdsLib.inf            |  5 +++--
 4 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
index 0f0e15c64a..e86c6b3e2e 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -1356,7 +1356,7 @@ PlatformBdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
@@ -1528,7 +1528,7 @@ PlatformBdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
index 5831569fae..d3bef0fa39 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
@@ -1,11 +1,13 @@
 #/** @file
 # Component name for module PlatformBootManagerLib  # -# Copyright (c) 2008  - 2016, Intel Corporation. All rights reserved.<BR>
-#                                                                        

+# Copyright (c) 2008  - 2019, Intel Corporation. All rights 
+reserved.<BR> #
+
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 
-#                                                                        

+#
+
 #
 #
 #
@@ -97,6 +99,7 @@ [Guids]
   gEfiNormalSetupGuid
   gEfiPartTypeSystemPartGuid
   gEfiEndOfDxeEventGroupGuid
+  gUefiShellFileGuid
 
 [Pcd]
   gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKeyFileGuid
@@ -111,7 +114,6 @@ [Pcd]
   gPlatformModuleTokenSpaceGuid.PcdFlashFvShellSize
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
   gPlatformModuleTokenSpaceGuid.PcdIFWISigBaseAddress
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
index b875041880..3034853695 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/Generic
+++ BdsLib/BdsBoot.c
@@ -1,7 +1,7 @@
 /** @file
   BDS Lib functions which relate with create or process the boot option.
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -2342,7 +2342,7 @@ BdsLibBootViaBootOption (
     //
     // If the boot option point to Internal FV shell, make sure it is valid
     //
-    Status = BdsLibUpdateFvFileDevicePath (&DevicePath, PcdGetPtr(PcdShellFile));
+    Status = BdsLibUpdateFvFileDevicePath (&DevicePath, 
+ &gUefiShellFileGuid);
     if (!EFI_ERROR(Status)) {
       if (Option->DevicePath != NULL) {
         FreePool(Option->DevicePath);
@@ -3544,7 +3544,7 @@ BdsLibEnumerateAllBootOption (
 
     Status = Fv->ReadFile (
                   Fv,
-                  PcdGetPtr(PcdShellFile),
+                  &gUefiShellFileGuid,
                   NULL,
                   &Size,
                   &Type,
@@ -3629,7 +3629,7 @@ BdsLibBuildOptionFromShell (
   //
   // Build the shell device path
   //
-  EfiInitializeFwVolDevicepathNode (&ShellNode, PcdGetPtr(PcdShellFile));
+  EfiInitializeFwVolDevicepathNode (&ShellNode, &gUefiShellFileGuid);
 
   DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *) &ShellNode);
 
diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
index a978b5cbfa..e3c8a6fa27 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/Generic
+++ BdsLib/GenericBdsLib.inf
@@ -6,7 +6,7 @@
 #  2) BDS boot device connect interface;  #  3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
 #
-#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2019, Intel Corporation. All rights 
+reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -43,6 +43,7 @@ [Packages]
   MdeModulePkg/MdeModulePkg.dec
   IntelFrameworkPkg/IntelFrameworkPkg.dec
   IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+  ShellPkg/ShellPkg.dec
 
 [LibraryClasses]
   DevicePathLib
@@ -98,6 +99,7 @@ [Guids]
   ## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder"
   gEfiLegacyDevOrderVariableGuid
   gEdkiiStatusCodeDataTypeVariableGuid          ## SOMETIMES_CONSUMES ## GUID
+  gUefiShellFileGuid
 
 [Protocols]
   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES
@@ -131,7 +133,6 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad  ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable      ## CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile      ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed                       ## CONSUMES
 
 #
-- 
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
  2019-05-09  4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:19   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Michael D Kinney, Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Michael D Kinney <mdkinney@mdkinney-desk.amr.corp.intel.com>; Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue

From: Michael D Kinney <mdkinney@mdkinney-desk.amr.corp.intel.com>

Fix loop comparison for end of languages.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../MiscNumberOfInstallableLanguagesFunction.c         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
index 9fff8d8850..4a96a2c465 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c
@@ -1,10 +1,12 @@
 /*++
 
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

+Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
+
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-                                                                                   

+
+
 
 
 Module Name:
@@ -68,7 +70,7 @@ CurrentLanguageMatch (
     // Find the best matching RFC 4646 language, compute the offset.
     //
     CompareLength = AsciiStrLen (BestLanguage);
-    for (MatchLang = Languages, (*Offset) = 0; MatchLang != '\0'; (*Offset)++) {
+    for (MatchLang = Languages, (*Offset) = 0; *MatchLang != '\0'; (*Offset)++) {
       //
       // Seek to the end of current match language.
       //
-- 
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
  2019-05-09  4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:20 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary

Update the binary file that contains the default configuration settings.  This file is generated using FCE.exe during a Windows build and this binary file needs to be updated when there are changes to the configuration setting layout or configuration setting default values.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf          |   7 ++++---
 .../Stitch/Gcc/NvStorageVariable.bin          | Bin 253952 -> 253952 bytes
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 40385794a3..1ba6124a69 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -119,15 +119,15 @@ [FD.Vlv]
 FV = MICROCODE_FV
 $(FLASH_REGION_VPD_OFFSET)|$(FLASH_REGION_VPD_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
 
 $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwWorking.bin
 
 $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
-FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
+FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
 
 !if $(MINNOW2_FSP_BUILD) == TRUE
 
@@ -633,6 +633,7 @@ [FV.FVMAIN]
 INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
 !endif
 
+
   #
   # SMBIOS
   #
diff --git a/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin b/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
index 6aa2bb5aa530caf0a4a7744a398b16076a9e957f..7f8688b099f1e70491f16161a98c7b53c6b7a412 100644 GIT binary patch delta 127 zcmZoTz~69ye?o_@9s>hI0uuv+yZV&bexjPbOU(8cGMw0I?a2_pV8Rg3;LPC9;K$&`
z;K|_5V6?fJv65->ItjJS5sVAiHWzR&;o1Cyy@Hw52xv;mWJ!sslVv4EfC{u2=Wf0!
eQNTR;r<C}_2d2$|GVOsfj6lq^Jy3=@`XB%=8zwja

delta 139
zcmZoTz~69ye?o_=0Rsa=5)j*Oy~?@aOQipTjn(0oWB6EI8PXUs8T^1anZc8xfWd^p
znIWGc4=kF_5XO+mPz01q1nSLUNS$~wb+aDxF}BS!#44CKf8kuhGg&~2g)v~VsMOTS
k`=qoO12?~vDqwEjDA&GGjuD8Nwr`YU_CL7!fLsO>0ART*X#fBK

--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
  2019-05-09  4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:20 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Library/PlatformBdsLib/BdsPlatform.c      | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
index e86c6b3e2e..4d5997d6e9 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
                                                                          
   SPDX-License-Identifier: BSD-2-Clause-Patent
                                                                          
@@ -1702,6 +1702,8 @@ PlatformBdsPolicyBehavior (
     EsrtManagement = NULL;
   }
 
+  DEBUG ((DEBUG_INFO, "BDS: BootMode=%02x\n", BootMode));
+
   switch (BootMode) {
 
   case BOOT_WITH_MINIMAL_CONFIGURATION:
@@ -1778,9 +1780,8 @@ PlatformBdsPolicyBehavior (
       goto FULL_CONFIGURATION;
     }
 
-    if (SystemConfiguration.QuietBoot) {
-      EnableQuietBoot (PcdGetPtr(PcdLogoFile));
-    } else {
+    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    if (!SystemConfiguration.QuietBoot) {
       PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
     }
 
@@ -1864,8 +1865,7 @@ PlatformBdsPolicyBehavior (
     // Boot with the specific configuration
     //
     PlatformBdsConnectConsole (gPlatformConsole);
-    PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest);
-    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    PlatformBdsDiagnostics (EXTENSIVE, TRUE, BaseMemoryTest);
 
     DEBUG((DEBUG_INFO, "ProcessCapsules Before EndOfDxe......\n"));
     ProcessCapsules ();
@@ -1968,10 +1968,9 @@ FULL_CONFIGURATION:
     // Perform some platform specific connect sequence
     //
     PlatformBdsConnectSequence ();
-    if (SystemConfiguration.QuietBoot) {
-        EnableQuietBoot (PcdGetPtr(PcdLogoFile));
-    } else {
-        PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
+    EnableQuietBoot (PcdGetPtr(PcdLogoFile));
+    if (!SystemConfiguration.QuietBoot) {
+      PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest);
     }
 
     //
-- 
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module
  2019-05-09  4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
  2019-05-09  7:54   ` Sun, Zailiang
@ 2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:20 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module

Add the PcdInitSmm module that should not have been removed.  This module performs actions at Exit Boot Services to place devices in an OS compatible state.
Wothout this module, so versions of Linux are not bootable.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf       | 1 +
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf    | 1 +
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 3 +++
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 2 ++
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc    | 2 ++
 5 files changed, 9 insertions(+)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index c725cdcf31..098602b9d8 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -517,6 +517,7 @@ [FV.FVMAIN]
 
 !if $(MINNOW2_FSP_BUILD) == FALSE
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY 
+$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT
+URE)/PchInitSmm.inf
 !endif
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 349fbb2887..40385794a3 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -473,6 +473,7 @@ [FV.FVMAIN]
 
 !if $(MINNOW2_FSP_BUILD) == FALSE
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY 
+$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT
+URE)/PchInitSmm.inf
 !endif
 INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 44a5806153..b9faf558b7 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1193,6 +1193,8 @@ [Components.X64]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+
+ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITEC
+ TURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
@@ -1449,6 +1451,7 @@ [Components.X64]
   }
 
 
+
 !if $(NETWORK_ENABLE) == TRUE
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
     NetworkPkg/IScsiDxe/IScsiDxe.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index bff0fe21af..2324794841 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1180,6 +1180,8 @@ [Components.IA32]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+
+ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITEC
+ TURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 7630b48ea6..10d44d5652 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1195,6 +1195,8 @@ [Components.X64]
     <PcdsPatchableInModule>
         gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
   }
+
+ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITEC
+ TURE)/PchInitSmm.inf
+
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 
 !if $(PCIESC_ENABLE) == TRUE
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
  2019-05-09  4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
@ 2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:20 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore

Preserve the UEFI Variable store when a capsule update is performed.  UEFI Variables are used to store firmware version information for the sample devices (Red, Green, Blue).

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
index 3d5649164b..a863d69381 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLi
+++ b.c
@@ -1,8 +1,8 @@
 /**
 
-Copyright (c) 2016, Microsoft Corporation
+Copyright (c) 2016, Microsoft Corporation.  All rights reserved.
+Copyright (c) 2019, Intel Corporation.  All rights reserved.
 
-All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -36,8 +36,7 @@ UPDATE_CONFIG_DATA mUpdateConfigData[] = {
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x000C0000, 0x00050000, 0x000C0000 },
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00110000, 0x00210000, 0x00110000 },
   { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00320000, 0x00070000, 0x00320000 },
-  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 },
-  { PlatformFirmwareTypeNvRam,          FlashAddressTypeRelativeAddress, 0x00040000, 0x00080000, 0x00040000 }
+  { PlatformFirmwareTypeSystemFirmware, 
+ FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 }
 };
 
 /**
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools
  2019-05-09  4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
@ 2019-05-09 13:20   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:20 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools

Remove path to openssl tools from batch scripts.  Instead, the path to the openssl tools must be included in PATH for a build to complete.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat     | 2 --
 .../Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat      | 2 --
 .../Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat   | 2 --
 3 files changed, 6 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
index 80f9be7fb8..50ebb160ee 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ Max.bat
@@ -69,7 +69,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^ @@ -106,7 +105,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^ diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
index c6c78f0285..9d08c86717 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ MaxRelease.bat
@@ -69,7 +69,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^ @@ -106,7 +105,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^ diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
index ba4bc0f081..3e9f94c530 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSample
+++ Color.bat
@@ -73,7 +73,6 @@ if exist "NewCert.pem" (
     --lsv %FMP_CAPSULE_LSV% ^
     --capflag PersistAcrossReset ^
     --capflag InitiateReset ^
-    --signing-tool-path=c:\OpenSSL-Win32\bin ^
     --signer-private-cert=NewCert.pem ^
     --other-public-cert=NewSub.pub.pem ^
     --trusted-public-cert=NewRoot.pub.pem ^ @@ -110,7 +109,6 @@ call GenerateCapsule ^
   --lsv %FMP_CAPSULE_LSV% ^
   --capflag PersistAcrossReset ^
   --capflag InitiateReset ^
-  --signing-tool-path=c:\OpenSSL-Win32\bin ^
   --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
   --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
   --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md
  2019-05-09  4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
  2019-05-09  7:58   ` Sun, Zailiang
@ 2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:21 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/Readme.md | 232 +++++++++++++++++++++++++++++-------
 1 file changed, 190 insertions(+), 42 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Readme.md b/Vlv2TbltDevicePkg/Readme.md index 139aa4ea61..647d0ba361 100644
--- a/Vlv2TbltDevicePkg/Readme.md
+++ b/Vlv2TbltDevicePkg/Readme.md
@@ -1,39 +1,18 @@
 # **EDK II firmware for Minnowboard Max/Turbot which is based on Intel Valleyview2 SoC (Byatrail platform)**
 
 ----------
-
-
-## **How to Create a Full Source Tree for Minnowboard Max/Turbot under Windows** -### Pre-requisites
+# Windows Pre-requisites
 
 * GIT client: Available from https://git-scm.com/downloads
 
-### Download Source Code
-* Create a new directory C:\WORKSPACE as an EDK II work space.
-
-* GIT clone operations required to pull the EDK II source tree and the edk2-non-osi repository. Run below command in git bash or windows command line.
-
-  - cd C:\WORKSPACE
-  - git clone https://github.com/tianocore/edk2.git
-  - git clone https://github.com/tianocore/edk2-non-osi.git
-
-    Note: The EDK II [Multiple Workspace](https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace)
-feature is used by this project.
-
-* Follow the instructions found in the file "OpenSSL-HOWTO.txt" in your work space (e.g. "C:\WORKSPACE\edk2\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt") to install the Openssl source code.
-
-## **Windows Build Instructions**
-
-### Pre-requisites Tools
-
 * Microsoft Visual Studio.
   - Visual Studio 2015 recommended and is used in the examples below. Visual Studio 2013 is also supported.
-
+
 * WINDDK
   - Download Microsoft Windows Driver Development Kit 3790.1830 and install it to C:\WINDDK\3790.1830.
-
-* Python 2.7
-  - Available from http://www.python.org. Install Python to C:\Python27, and add the path "C:\Python27" to system environment variable **PYTHON_HOME**.
+
+* Python 3
+  - https://www.python.org/downloads/
 
 * Install iASL
    - Install the iasl compiler by downloading iasl-win-20160527.zip from the following @@ -42,34 +21,203 @@ feature is used by this project.
    (create the folder "C:\ASL" if it does not exist).
 
 * Install the NASM* assembly language compiler
-   - Download NASM* 2.12.02 binaries from 
+   - Download NASM* 2.12.02 binaries from
    http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-win64.zip and place the
    unzipped content ("nasm.exe") into the directory "C:\NASM" on your local hard drive
    (create the folder "C:\NASM" if it does not exist). Add the path "C:\NASM\" to system environment variable **NASM_PREFIX**.
 
 * Install Openssl
-   - Download a pre-compiled Openssl Windows binary from 
-   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list 
-   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to 
-   download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe 
+   - Download a pre-compiled Openssl Windows binary from
+   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list
+   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to
+   download the latest version. Download and extract to C:\Openssl, add 
+ the path of openssl.exe
    ("C:\openssl") to system environment variable **OPENSSL_PATH**.
 
+# Download and Build MinnowMax using Windows/Visual Studio
 
+Run the script below from an empty directory.  The script clones the 
+EDK II repository from GitHub and downloads and unzips the binary 
+support files for the MinnowBoard MAX.  It then sets up the environment 
+for EDK II builds and builds the MinnowBoard MAX firmware and generates 
+UEFI Capsules that can be used to update the MinnowBoard MAX firmware and three sample devices.
 
-### Build Commands
-  * cd C:\WORKSPACE\edk2\Vlv2TbltDevicePkg
+```
+git clone --recurse-submodules https://github.com/tianocore/edk2.git
 
-  * To build 64-bit release version image: Build_IFWI.bat MNW2 Release
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile openssl-1.0.2r-x64_86-win64.zip"}"
+powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip
 
-  * To build 64-bit debug version image: Build_IFWI.bat MNW2 Debug
-
-  * To build 32-bit release version image: Build_IFWI.bat /IA32 MNW2 Release
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip -OutFile MinnowBoardMax-Development190216.zip"}"
+powershell Expand-Archive MinnowBoardMax-Development190216.zip
+sleep 1
+rename MinnowBoardMax-Development190216 Vlv2Binaries cd Vlv2Binaries 
+powershell Expand-Archive Vlv2SocBinPkg.zip .
+sleep 1
+cd ..
 
-  * To build 32-bit debug version image: Build_IFWI.bat /IA32 MNW2 Debug
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
+powershell Expand-Archive nasm-2.13.03-win64.zip .
 
-### Output
-* After the build process successfully completes, the 8MB firmware binary image will -be located in the following location on your local hard drive:
-"C:\WORKSPACE\edk2\Vlv2TbltDevicePkg\Stitch\"
+mkdir Conf
 
+set WORKSPACE=%CD%
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_8
+6-win64 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
 
+cd %WORKSPACE%\edk2
+
+call edkSetup.bat Rebuild
+
+cd Vlv2TbltDevicePkg
+
+Build_IFWI.bat /m /y MNW2 Debug
+```
+
+Once all the code and tools are downloaded and installed, only the 
+following commands are required to setup the environment.  Run these 
+from the same directory used to install the source and binaries.
+
+```
+set WORKSPACE=%CD%
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_8
+6-win64 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
+
+cd %WORKSPACE%\edk2
+
+call edkSetup.bat Rebuild
+```
+
+Once the environment is setup, the MinnowBoard MAX firmware and 
+capsules can be rebuilt using the following commands.
+
+* Build Debug Image
+
+```
+cd Vlv2TbltDevicePkg
+Build_IFWI.bat /m /y MNW2 Debug
+```
+
+* Build Release Image
+
+```
+cd Vlv2TbltDevicePkg
+Build_IFWI.bat /m /y MNW2 Release
+```
+
+The generated firmware image is the newest `.bin` file in `edk2/Vlv2TbltDevicePkg/Stitch`.
+The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.
+
+The CapsuleApp and generated UEFI Capsules are in 
+`Build/Vlv2TbltDevicePkg/Capsules`
+
+# Download and Build MinnowMax using Linux/GCC
+
+Run the script below from an empty directory.  The script clones the 
+EDK II repository from GitHub and downloads and unzips the binary 
+support files for the MinnowBoard MAX.  It then sets up the environment 
+for EDK II builds and builds the MinnowBoard MAX firmware and generates 
+UEFI Capsules that can be used to update the MinnowBoard MAX firmware and three sample devices.
+
+```
+git clone --recurse-submodules https://github.com/tianocore/edk2.git
+
+mkdir Vlv2Binaries
+cd Vlv2Binaries
+wget 
+https://firmware.intel.com/sites/default/files/MinnowBoardMax-Developme
+nt190216.zip unzip MinnowBoardMax-Development190216.zip
+unzip Vlv2SocBinPkg.zip
+
+mkdir Conf
+
+export WORKSPACE=$PWD/edk2
+export PACKAGES_PATH=$PWD/Vlv2Binaries
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
+
+cd edk2
+cd Vlv2TbltDevicePkg
+. Build_IFWI.sh MNW2 Debug
+```
+
+Once all the code is downloaded and installed, only the following 
+commands are required to setup the environment.  Run these from the 
+same directory used to install the source and binaries.
+
+```
+export WORKSPACE=$PWD/edk2
+export PACKAGES_PATH=$PWD/Vlv2Binaries
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
+
+cd edk2
+cd Vlv2TbltDevicePkg
+```
+
+Once the environment is setup, the MinnowBoard MAX firmware and 
+capsules can be rebuilt using the following commands.
+
+
+* Build Debug Image
+
+```
+cd Vlv2TbltDevicePkg
+./Build_IFWI.sh MNW2 Debug
+```
+
+* Build Release Image
+
+```
+cd Vlv2TbltDevicePkg
+./Build_IFWI.sh MNW2 Release
+```
+
+The generated firmware image is the `MNW2MAX_X64_D_0084_01_GCC.bin` 
+file in `edk2\Vlv2TbltDevicePkg\Stitch`
+
+The CapsuleApp and generated UEFI Capsules are in 
+`Build\Vlv2TbltDevicePkg\Capsules`
+
+# Use DediProg to update FLASH image on a MinnowBoard MAX Target
+
+# Update MinnowBoard MAX Firmware from UEFI Capsules
+
+* Copy the `Build/Vlv2TbltDevicePkg/Capsules` directory to a USB FLASH 
+drive
+* Connect USB FLASH Drive to MinnowBoard MAX
+* Boot MinnowBoard MAX to the Boot Manager
+* Boot the `EFI Internal Shell` boot option
+* Mount the USB FLASH Drive (usually `FS1`)
+* Use `cd` command to go to `Capsules/TestCert` directory
+* Run the following command to apply all four capsules
+
+```
+CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap ```
+
+* The MinnowBoard MAX should reboot and the four capsules are applied 
+in the
+  order listed.  The progress bar matches the color name of the capsule.
+  MinnowMax.cap uses the color purple.  Once all capsules are 
+processed, the
+  MinnowBoard MAX should reboot again using the new firmware images.
+
+# Generate and Test a UX BitMap Capsule
+
+* Use bitmap editor to generate a BMP file.  Recommend resolution of 
+600 wide
+  by 100 tell and either 24 or 32 bits per pixel.
+* Save BMP file to USB FLASH drive
+* Use CapsuleApp.efi to convert BMP file to a UX Capsule
+
+```
+CapsuleApp.efi -G MyImage.bmp -O MyImage.cap ```
+
+* When updating firmware using capsules, add UX capsule to the list of 
+capsules
+  passed into CapsuleApp.efi.
+
+```
+CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap ```
+
+* When the capsules are processed the UX bitmap image should be 
+displayed at the
+  bottom of the screen.
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
  2019-05-09  4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
@ 2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:21 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts

In preparation for moving Vlv2TbltDevicePkg to the edk2-platforms repository, the batch scripts used to build this platform are updated to not make any assumptions about the directory location of Vlv2TbltDevicePkg.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/.gitignore            |   2 +
 Vlv2TbltDevicePkg/Build_IFWI.bat        |  31 +++-
 Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat |  23 ++-
 Vlv2TbltDevicePkg/bldX64.bat            | 216 ------------------------
 Vlv2TbltDevicePkg/bld_vlv.bat           | 129 ++++++++------
 Vlv2TbltDevicePkg/bld_vlv.sh            |   3 +-
 6 files changed, 124 insertions(+), 280 deletions(-)  delete mode 100644 Vlv2TbltDevicePkg/bldX64.bat

diff --git a/Vlv2TbltDevicePkg/.gitignore b/Vlv2TbltDevicePkg/.gitignore index b4699122b8..c7698262ad 100644
--- a/Vlv2TbltDevicePkg/.gitignore
+++ b/Vlv2TbltDevicePkg/.gitignore
@@ -1,3 +1,5 @@
 AutoPlatformCFG.txt
 Stitch/Stitching.log
 Stitch/MNW*.bin
+Stitch/MNW*.rom
+Stitch/MNW*.rom.orig
diff --git a/Vlv2TbltDevicePkg/Build_IFWI.bat b/Vlv2TbltDevicePkg/Build_IFWI.bat
index 9a3063397e..887206703a 100644
--- a/Vlv2TbltDevicePkg/Build_IFWI.bat
+++ b/Vlv2TbltDevicePkg/Build_IFWI.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights 
+reserved.<BR>
 @REM SPDX-License-Identifier: BSD-2-Clause-Patent  @REM
 
@@ -18,11 +18,26 @@ set exitCode=0
 set "Build_Flags= "
 set "Stitch_Flags= "
 set Arch=X64
-set WORKSPACE=%CD%
-set CORE_PATH=%WORKSPACE%\edk2
-set PLATFORM_PATH=%WORKSPACE%\edk2
 set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
+set PLATFORM_PATH=%WORKSPACE%
+if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\%PLATFORM_PACKAGE% (
+        set PLATFORM_PATH=%%~fi
+        goto PlatformPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!!
+    echo.
+    goto Exit
+  )
+)
+:PlatformPackageFound
+
 :: Parse Optional arguments
 :OptLoop
 if /i "%~1"=="/?" goto Usage
@@ -125,11 +140,11 @@ if %ERRORLEVEL% NEQ 0 (  echo.
 echo Finished Building BIOS.
 @REM Set BIOS_ID environment variable here.
-call %CORE_PATH%\Conf\BiosId.bat
+call %WORKSPACE%\Conf\BiosId.bat
 echo BIOS_ID=%BIOS_ID%
 
 :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables -find /v "#" %CORE_PATH%\Conf\BiosId.env > ver_strings
+find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
 for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j  del /f/q ver_strings >nul  set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
@@ -137,10 +152,10 @@ set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
 :: Start Integration process
 echo ======================================================================
 echo Build_IFWI:  Calling IFWI Stitching Script...
-pushd %CORE_PATH%\%PLATFORM_PACKAGE%\Stitch
+pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch
 
   :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/S IFWISuffix]
-  call IFWIStitch.bat %Stitch_Flags% /B ..\..\%BIOS_Name% %IFWI_Suffix%
+  call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix%

  @echo off
 popd
diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
index 7c3ebbd1c6..200ca05a23 100644
--- a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
+++ b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006   - 2014, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006   - 2019, Intel Corporation. All rights reserved.<BR>
 @REM 
 @REM   SPDX-License-Identifier: BSD-2-Clause-Patent
 @REM
@@ -9,6 +9,25 @@
 @echo off
 SetLocal EnableDelayedExpansion EnableExtensions
 
+set PLATFORM_BIN_PACKAGE=%WORKSPACE%\Vlv2SocBinPkg
+if not exist %PLATFORM_BIN_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\Vlv2SocBinPkg (
+        set PLATFORM_BIN_PACKAGE=%%~fi\Vlv2SocBinPkg
+        goto PlatformBinPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
+    echo.
+    goto BldFail
+  )
+)
+:PlatformBinPackageFound
+
+
 :: Set script defaults
 set exitCode=0
 set BackupRom=1
@@ -185,7 +204,7 @@ for %%i in (%BIOS_Names%) do (
     echo Generating IFWI... %BIOS_ID%.bin
     echo.
 
-    copy /b/y !IFWI_HEADER_FILE! + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\Vacant.bin + !BIOS_Rom! %BIOS_ID%.bin
+    copy /b/y !IFWI_HEADER_FILE! + 
+ %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + 
+ %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\Vacant.bin + !BIOS_Rom! 
+ %BIOS_ID%.bin
     echo.
     echo ===========================================================================
 )
diff --git a/Vlv2TbltDevicePkg/bldX64.bat b/Vlv2TbltDevicePkg/bldX64.bat deleted file mode 100644 index 50dc5b1f07..0000000000
--- a/Vlv2TbltDevicePkg/bldX64.bat
+++ /dev/null
@@ -1,216 +0,0 @@
-@REM @file
-@REM   Windows batch file to build BIOS ROM
-@REM
-@REM Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM
-
-@echo off
-@echo.
-@time /t
-
-@if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log -@if exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log -@if exist %WORKSPACE%\Conf\build_rule.txt del %WORKSPACE%\Conf\build_rule.txt -@if exist %WORKSPACE%\Conf\FrameworkDatabase.db del %WORKSPACE%\Conf\FrameworkDatabase.db
-@if exist %WORKSPACE%\Conf\target.txt del %WORKSPACE%\Conf\target.txt -@if exist %WORKSPACE%\Conf\tools_def.txt del %WORKSPACE%\Conf\tools_def.txt -@if exist conf\.cache rmdir /q /s conf\.cache
-
-@set target=DEBUG
-
-@if /i "%1" == "release" set TARGET=RELEASE -@if /i "%2" == "release" set TARGET=RELEASE -@if /i "%3" == "release" set TARGET=RELEASE -@if /i "%4" == "release" set TARGET=RELEASE -@if /i "%5" == "release" set TARGET=RELEASE
-
-@set PlatformType=NO_PLATFORM
-@set config_file=.\Vlv2TbltDevicePkg\PlatformPkgConfig.dsc
-@set EVN_debug_file=.\Vlv2TbltDevicePkg\BiosIdx64D.env
-@set EVN_release_file=.\Vlv2TbltDevicePkg\BiosIdx64R.env
-@set auto_config_inc=.\Vlv2TbltDevicePkg\AutoPlatformCFG.txt
-
-@if  "%1" == "MNW2" (
-  set %PlatformType% = MNW2
-  @echo  Setting Baley Bay platform configration and BIOS ID ...
-  findstr /b /v BOARD_ID %EVN_debug_file% > newfile.env
-  echo BOARD_ID = MNW2MAX >> newfile.env
-  type newfile.env > %EVN_debug_file%
-  findstr /b /v BOARD_ID %EVN_release_file% > newfile.env
-  echo BOARD_ID = MNW2MAX >> newfile.env
-  type newfile.env > %EVN_release_file%
-  echo DEFINE ENBDT_PF_BUILD = TRUE  >> %auto_config_inc%
-  echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
-  goto PLATFORM_SETTING_DONE
-)
-
-@if  "%PlatformType%" == "NO_PLATFORM" (
-  goto BldFail
-)
-
-rem clearup the temp file
-:PLATFORM_SETTING_DONE
-@DEL NEWFILE.ENV
-@DEL NEWFILE.CFG
-
-@REM Define platform specific environment variables.
-@REM
-@set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
-@set SCRIPT_ERROR=0
-
-@REM Set basic environment.
-@echo.
-@echo Run edksetup.bat batch file.
-@echo.
-@del Conf\build_rule.txt
-@REM @del Conf\tools_def.txt
-@call edksetup.bat
-
-
-@echo.
-@echo Set the VS2008 environment.
-@echo.
-@if defined VS90COMNTOOLS (
-  if not defined VSINSTALLDIR call "%VS90COMNTOOLS%\vsvars32.bat"
-  if /I "%VS90COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\" (
-    set TOOL_CHAIN_TAG=VS2008
-  ) else (
-    set TOOL_CHAIN_TAG=VS2008x86
-  )
-) else (
-  echo.
-  echo !!! ERROR !!! VS2008 not installed correctly. VS90COMNTOOLS not defined. !!!
-  echo.
-  set SCRIPT_ERROR=1
-  goto :BldEnd
-)
-
-@echo.
-@echo Set build environment.
-@echo.
-@if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG% (
-  mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%
-)
-
-
-@REM Set clean build option
-@set CLEAN_BUILD_OPTION=-e
-
-@findstr /V "ACTIVE_PLATFORM TARGET TARGET_ARCH TOOL_CHAIN_TAG BUILD_RULE_CONF" Conf\target.txt > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-
-@echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkgX64.dsc     >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TARGET          = %TARGET%                                  >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TARGET_ARCH     = IA32 X64                                  >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                          >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@echo BUILD_RULE_CONF = Conf/build_rule.txt                       >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
-@move /Y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt Conf
-
-
-
-@echo.
-@echo Create BiosIdx64.
-@echo.
-@if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64 (
-  mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64
-)
-
-@if "%TARGET%" == "DEBUG" (
-  set BIOS_ID_FILE=BiosIdx64D.env
-
-) else (
-  set BIOS_ID_FILE=BiosIdx64R.env
-
-)
-
-
-GenBiosId.exe -i %PLATFORM_PACKAGE%\%BIOS_ID_FILE% -o Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64\BiosId.bin
-@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-@echo off
-echo Copy reference code ASL files.
-
-
-@if /i "/s" == "%1" goto BldSilent
-@if /i "/s" == "%2" goto BldSilent
-@if /i "/s" == "%3" goto BldSilent
-@if /i "/s" == "%4" goto BldSilent
-@if /i "/s" == "%5" goto BldSilent
-
-build -n %NUMBER_OF_PROCESSORS%
-@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-@If %SCRIPT_ERROR% EQU 1 goto BldFail
-@goto BldSuccess
-
-:BldSilent
-
-build -n %NUMBER_OF_PROCESSORS% 1>>EDK2.log 2>&1 -@if %ERRORLEVEL% NEQ 0 goto BldFail
-
-
-@If %SCRIPT_ERROR% EQU 1 goto BldFail
-
-:BldSuccess
-@echo off
-del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1 -del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt 1>>EDK2.log 2>&1
-copy /y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd     Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1
-
-@echo.
-@echo Extract setup default value from VFR (Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt)
-@echo.
-fce read -i Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt
-
-
-@echo Update FD with default Hii value successfully! (both 'Setup' and 'SetupDefault') -@echo.
-fce mirror -i Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd -o Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.fd Setup SetupDefault 1>>EDK2.log 2>&1
-
-@echo off
-del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd
-del Vlv2TbltDevicePkg\RomImage\bios.rom
-if not exist Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM goto Gen8MImage -del /q /f Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\*
-rd /Q Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-:Gen8MImage
-
-copy /b Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.fd Vlv2TbltDevicePkg\RomImage\bios.rom
-
-pushd Vlv2TbltDevicePkg\RomImage\
-@if "%TARGET%" == "DEBUG" (
-    call signbiosX64_debug.bat
-) else (
-    call signbiosX64_release.bat
-)
-
-call ftoolbuild.bat
-call ftoolbuild_sec_enable.bat
-popd
-
-@echo off
-mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-move Vlv2TbltDevicePkg\RomImage\SPI_Image\* Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\ > NUL
-
-call GenBIOS.bat X64
-
-@echo on
-
-@echo TARGET:               %TARGET%
-@echo TOOL_CHAIN_TAG:       %TOOL_CHAIN_TAG%
-@echo BIOS location:        Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV
-@echo SPI Images location:  Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM
-@echo.
-@echo The EDKII BIOS build has successfully completed!
-@echo.
-@goto BldEnd
-
-:BldFail
-@echo.
-@echo The EDKII BIOS Build has failed!
-@echo.
-exit /b 1
-
-:BldEnd
-@time /t
-exit /b 0
diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.bat index c5314833c0..dcc8b1a95a 100644
--- a/Vlv2TbltDevicePkg/bld_vlv.bat
+++ b/Vlv2TbltDevicePkg/bld_vlv.bat
@@ -1,7 +1,7 @@
 @REM @file
 @REM   Windows batch file to build BIOS ROM
 @REM
-@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights 
+reserved.<BR>
 @REM SPDX-License-Identifier: BSD-2-Clause-Patent  @REM
 
@@ -15,25 +15,60 @@ echo.
 ::**********************************************************************
 :: Initial Setup
 ::**********************************************************************
-set WORKSPACE=%CD%
 if %WORKSPACE:~-1%==\ set WORKSPACE=%WORKSPACE:~0,-1%  set /a build_threads=1  set "Build_Flags= "
 set exitCode=0
 set Arch=X64
 set Source=0
-set CORE_PATH=%WORKSPACE%\edk2
-set PLATFORM_PATH=%WORKSPACE%\edk2
-cd ./edk2
+set PLATFORM_NAME=Vlv2TbltDevicePkg
+
+set CORE_PATH=%WORKSPACE%
+if not exist %CORE_PATH%\edksetup.bat (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\edksetup.bat (
+        set CORE_PATH=%%~fi
+        goto CorePathFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find edksetup.bat !!!
+    echo.
+    goto BldFail
+  )
+)
+:CorePathFound
+
+set PLATFORM_PACKAGE=%WORKSPACE%\%PLATFORM_NAME%
+if not exist %PLATFORM_PACKAGE% (
+  if defined PACKAGES_PATH (
+    for %%i IN (%PACKAGES_PATH%) DO (
+      if exist %%~fi\%PLATFORM_NAME% (
+        set PLATFORM_PACKAGE=%%~fi\%PLATFORM_NAME%
+        goto PlatformPackageFound
+      )
+    )
+  ) else (
+    echo.
+    echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
+    echo.
+    goto BldFail
+  )
+)
+:PlatformPackageFound
+
+cd %CORE_PATH%
 
 :: Clean up previous build files.
-if exist %CORE_PATH%\edk2.log del %CORE_PATH%\edk2.log -if exist %CORE_PATH%\unitool.log del %CORE_PATH%\unitool.log -if exist %CORE_PATH%\Conf\target.txt del %CORE_PATH%\Conf\target.txt -if exist %CORE_PATH%\Conf\tools_def.txt del %CORE_PATH%\Conf\tools_def.txt -if exist %CORE_PATH%\Conf\build_rule.txt del %CORE_PATH%\Conf\build_rule.txt -if exist %CORE_PATH%\Conf\FrameworkDatabase.db del %CORE_PATH%\Conf\FrameworkDatabase.db
-if exist conf\.cache rmdir /q/s conf\.cache
+if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log if exist 
+%WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log if exist 
+%WORKSPACE%\Conf\target.txt del %WORKSPACE%\Conf\target.txt if exist 
+%WORKSPACE%\Conf\tools_def.txt del %WORKSPACE%\Conf\tools_def.txt if 
+exist %WORKSPACE%\Conf\build_rule.txt del 
+%WORKSPACE%\Conf\build_rule.txt if exist 
+%WORKSPACE%\Conf\FrameworkDatabase.db del 
+%WORKSPACE%\Conf\FrameworkDatabase.db
+if exist %WORKSPACE%\Conf\.cache rmdir /q/s %WORKSPACE%\Conf\.cache
 
 :: Setup EDK environment. Edksetup puts new copies of target.txt, tools_def.txt, build_rule.txt in WorkSpace\Conf
 :: Also run edksetup as soon as possible to avoid it from changing environment variables we're overriding @@ -41,8 +76,6 @@ call %CORE_PATH%\edksetup.bat Rebuild  @echo off
 
 :: Define platform specific environment variables.
-set PLATFORM_NAME=Vlv2TbltDevicePkg
-set PLATFORM_PACKAGE=%PLATFORM_PATH%\Vlv2TbltDevicePkg
 set config_file=%PLATFORM_PACKAGE%\PlatformPkgConfig.dsc
 set auto_config_inc=%PLATFORM_PACKAGE%\AutoPlatformCFG.txt
 
@@ -82,9 +115,9 @@ if /i "%~1" == "/c" (
         del /f/s/q build > nul
         rmdir /s/q build
     )
-    if exist conf\.cache (
-        del /f/s/q conf\.cache > nul
-        rmdir /s/q conf\.cache
+    if exist %WORKSPACE%\Conf\.cache (
+        del /f/s/q %WORKSPACE%\Conf\.cache > nul
+        rmdir /s/q %WORKSPACE%\Conf\.cache
     )
     echo.
     shift
@@ -107,17 +140,17 @@ if "%~1"=="" goto Usage
 
 ::Remove the values for Platform_Type and Build_Target from BiosIdX.env and stage in Conf\  if "%Arch%"=="IA32" (
-    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > Conf\BiosId.env
+    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env 
+ > %WORKSPACE%\Conf\BiosId.env
     echo DEFINE X64_CONFIG = FALSE  >> %auto_config_inc%
 ) else if "%Arch%"=="X64" (
-    findstr /b /v "BOARD_ID  BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env > Conf\BiosId.env
+    findstr /b /v "BOARD_ID  BUILD_TYPE" 
+ %PLATFORM_PACKAGE%\BiosIdx64R.env > %WORKSPACE%\Conf\BiosId.env
     echo DEFINE X64_CONFIG = TRUE  >> %auto_config_inc%
 )
 
 :: -- Build flags settings for each Platform --  echo Setting  %1  platform configuration and BIOS ID...
 if /i "%~1" == "MNW2" (
-    echo BOARD_ID = MNW2MAX >> Conf\BiosId.env
+    echo BOARD_ID = MNW2MAX >> %WORKSPACE%\Conf\BiosId.env
     echo DEFINE ENBDT_PF_BUILD = TRUE   >> %auto_config_inc%
     
 ) else (
@@ -128,10 +161,10 @@ set Platform_Type=%~1
 
 if /i "%~2" == "RELEASE" (
     set target=RELEASE
-    echo BUILD_TYPE = R >> Conf\BiosId.env
+    echo BUILD_TYPE = R >> %WORKSPACE%\Conf\BiosId.env
 ) else (
     set target=DEBUG
-    echo BUILD_TYPE = D >> Conf\BiosId.env
+    echo BUILD_TYPE = D >> %WORKSPACE%\Conf\BiosId.env
 )
 
 ::**********************************************************************
@@ -181,43 +214,40 @@ if defined VS140COMNTOOLS (
 )
 
 echo Ensuring correct build directory is present for GenBiosId...
-set BUILD_PATH=Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
+set 
+BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
 
 echo Modifing Conf files for this build...
 :: Remove lines with these tags from target.txt -findstr /V "TARGET  TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF  ACTIVE_PLATFORM  MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt > Conf\target.txt.tmp
+findstr /V "TARGET  TARGET_ARCH  TOOL_CHAIN_TAG  BUILD_RULE_CONF
+ACTIVE_PLATFORM  MAX_CONCURRENT_THREAD_NUMBER" 
+%WORKSPACE%\Conf\target.txt > %WORKSPACE%\Conf\target.txt.tmp
 
-echo TARGET          = %TARGET%                                  >> Conf\target.txt.tmp
+echo TARGET          = %TARGET%                                  >> %WORKSPACE%\Conf\target.txt.tmp
 if "%Arch%"=="IA32" (
-    echo TARGET_ARCH = IA32                                       >> Conf\target.txt.tmp
+    echo TARGET_ARCH = IA32                                       >> %WORKSPACE%\Conf\target.txt.tmp
 ) else if "%Arch%"=="X64" (
-    echo TARGET_ARCH = IA32 X64                                  >> Conf\target.txt.tmp
+    echo TARGET_ARCH = IA32 X64                                  >> %WORKSPACE%\Conf\target.txt.tmp
 )
-echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                                  >> Conf\target.txt.tmp
-echo BUILD_RULE_CONF = Conf/build_rule.txt                               >> Conf\target.txt.tmp
+echo TOOL_CHAIN_TAG  = %TOOL_CHAIN_TAG%                                  >> %WORKSPACE%\Conf\target.txt.tmp
+echo BUILD_RULE_CONF = Conf/build_rule.txt                               >> %WORKSPACE%\Conf\target.txt.tmp
 if %Source% == 0 (
-  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >> Conf\target.txt.tmp
+  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc        >> %WORKSPACE%\Conf\target.txt.tmp
 ) else (
-  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc  >> Conf\target.txt.tmp
+  echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc
+ >> %WORKSPACE%\Conf\target.txt.tmp
 )
-echo MAX_CONCURRENT_THREAD_NUMBER = %build_threads%                      >> Conf\target.txt.tmp
+echo MAX_CONCURRENT_THREAD_NUMBER = %build_threads%                      >> %WORKSPACE%\Conf\target.txt.tmp
 
-move /Y Conf\target.txt.tmp Conf\target.txt >nul
+move /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt 
+>nul
 
 ::**********************************************************************
 :: Build BIOS
 ::**********************************************************************
 
 echo Creating BiosId...
-pushd %PLATFORM_PACKAGE%
-if not exist %WORKSPACE%\%BUILD_PATH%\IA32  mkdir %WORKSPACE%\%BUILD_PATH%\IA32
-  GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -o %WORKSPACE%\%BUILD_PATH%\IA32\BiosId.bin -ob %CORE_PATH%\Conf\BiosId.bat
+if not exist %BUILD_PATH%\IA32  mkdir %BUILD_PATH%\IA32 
+%PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o 
+%BUILD_PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
 if "%Arch%"=="X64" (
-   if not exist %WORKSPACE%\%BUILD_PATH%\X64  mkdir %WORKSPACE%\%BUILD_PATH%\X64
-   GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env -o %WORKSPACE%\%BUILD_PATH%\X64\BiosId.bin -ob %CORE_PATH%\Conf\BiosId.bat
+   if not exist %BUILD_PATH%\X64  mkdir %BUILD_PATH%\X64
+   %PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o 
+ %BUILD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
 )
-popd
-
 
 if %ERRORLEVEL% NEQ 0 goto BldFail
 
@@ -235,23 +265,23 @@ echo Running fce...
 
 pushd %PLATFORM_PACKAGE%
 :: Extract Hii data from build and store in HiiDefaultData.txt -fce read -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd > %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt
+%PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd > 
+%BUILD_PATH%\FV\HiiDefaultData.txt
 
 :: save changes to VlvXXX.fd
-fce update -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd -s %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt -o %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd
+%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s 
+%BUILD_PATH%\FV\HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv%Arch%.fd
 popd
 
 if %ERRORLEVEL% NEQ 0 goto BldFail
 ::echo FD successfully updated with default Hii values.
 
 :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables -find /v "#" Conf\BiosId.env > ver_strings
+find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
 for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j  del /f/q ver_strings >nul
 
 set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
-copy /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %PLATFORM_PATH%\%BIOS_Name% >nul -copy /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd  %WORKSPACE%\%BUILD_PATH%\FV\Vlv.ROM >nul
+copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd
+%PLATFORM_PACKAGE%\Stitch\%BIOS_Name% >nul copy /y/b 
+%BUILD_PATH%\FV\Vlv%Arch%.fd  %BUILD_PATH%\FV\Vlv.ROM >nul
 
 echo.
 echo Build location:     %BUILD_PATH%
@@ -261,13 +291,8 @@ echo -------------------- The EDKII BIOS build has successfully completed. -----  echo.
 
 @REM build capsule here
-@REMif "%openssl_path%" == "" (
-@REM    echo -- Error:  OPENSSL_PATH not set.  Capule and Recovery images not generated.
-@REM    set exitCode=1
-@REM    goto Exit
-@REM
-@REM echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
-@REM build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
+build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
 
 goto Exit
 
diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh index 51d3acacb4..ec3a325db7 100755
--- a/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -242,9 +242,8 @@ VERSION_MINOR=$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c  BOARD_ID=$(grep '^BOARD_ID' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-7)  BIOS_Name="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR".ROM
 BIOS_ID="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR"_GCC.bin
-cp -f $BUILD_PATH/FV/VLV.fd  $WORKSPACE/$BIOS_Name
 SEC_VERSION=1.0.2.1060v5
-cat $IFWI_HEADER_FILE ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/Vacant.bin $BIOS_Name > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
+cat $IFWI_HEADER_FILE 
+../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin 
+../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/Vacant.bin 
+$BUILD_PATH/FV/VLV.fd > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID
 
 
 echo Skip "Running BIOS_Signing ..."
--
2.21.0.windows.1



-- 
Qian Yi

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

* Re: [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
  2019-05-09  4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
  2019-05-09  7:55   ` Sun, Zailiang
@ 2019-05-09 13:21   ` Qian, Yi
  1 sibling, 0 replies; 51+ messages in thread
From: Qian, Yi @ 2019-05-09 13:21 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sun, Zailiang

Reviewed by Qian, Yi <yi.qian@intel.com>

Thanks
QianYi

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 9, 2019 12:31 PM
To: devel@edk2.groups.io
Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts

Add batch scripts to generate the LVFS compatible capsule update driver.

Add DSC/FDF files to build capsules and invoke post build shell scripts for Linux build environments.

Make versions consistent.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Capsule/GenerateCapsule/GenCapsuleAll.bat |  12 +-  .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  28 ++++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat   |   4 +-
 .../GenerateCapsule/GenCapsuleMinnowMax.sh    |  65 ++++++++
 .../GenCapsuleMinnowMaxRelease.bat            |   4 +-
 .../GenCapsuleMinnowMaxRelease.sh             |  65 ++++++++
 .../GenerateCapsule/GenCapsuleSampleColor.sh  |  70 +++++++++  .../Feature/Capsule/GenerateCapsule/Lvfs.ddf  |  14 ++
 .../LvfsGenCapsuleMinnowMax.bat               | 139 +++++++++++++++++
 .../LvfsGenCapsuleMinnowMaxRelease.bat        | 139 +++++++++++++++++
 .../LvfsGenCapsuleSampleColor.bat             | 145 ++++++++++++++++++
 .../GenerateCapsule/template.metainfo.xml     |  27 ++++
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc      |  38 +++++
 13 files changed, 743 insertions(+), 7 deletions(-)  create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
 create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
index 187797e284..8f589565fa 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.ba
+++ t
@@ -24,6 +24,12 @@ copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.efi %W
 
 call GenCapsuleMinnowMax.bat
 call GenCapsuleMinnowMaxRelease.bat
-call GenCapsuleSampleColor.bat Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
-call GenCapsuleSampleColor.bat Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
-call GenCapsuleSampleColor.bat Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
+call GenCapsuleSampleColor.bat Blue
+149da854-7d19-4faa-a91e-862ea1324be6
+call GenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c18a
+call GenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-075ad840f9d4
+
+call LvfsGenCapsuleMinnowMax.bat
+call LvfsGenCapsuleMinnowMaxRelease.bat
+call LvfsGenCapsuleSampleColor.bat Blue
+149da854-7d19-4faa-a91e-862ea1324be6
+call LvfsGenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c18a
+call LvfsGenCapsuleSampleColor.bat Red   72e2945a-00da-448e-9aa7-075ad840f9d4
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
new file mode 100644
index 0000000000..040024553a
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
@@ -0,0 +1,28 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware and
+#   firmware for sample devices
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+cd $(dirname $0)
+
+rm -R $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleAp
+p.efi cp 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleAp
+pRelease.efi cp 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleApp.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleAppRelease.e
+fi cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleApp.efi
+cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleAppRelease.
+efi
+
+. GenCapsuleMinnowMax.sh
+. GenCapsuleMinnowMaxRelease.sh
+. GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
+. GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
+. GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
index 50ebb160ee..6e4afd201e 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ Max.bat
@@ -11,8 +11,8 @@ setlocal
 set FMP_CAPSULE_VENDOR=Intel
 set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 set FMP_CAPSULE_FILE=MinnowMax.cap
-set FMP_CAPSULE_VERSION=0x00000009
-set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_STRING=0.0.0.12
 set FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI %FMP_CAPSULE_STRING%"
 set FMP_CAPSULE_LSV=0x00000000
 set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
new file mode 100644
index 0000000000..4fb963c93c
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ Max.sh
@@ -0,0 +1,65 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+FMP_CAPSULE_FILE=MinnowMax.cap
+FMP_CAPSULE_VERSION=0x0000000C
+FMP_CAPSULE_STRING=0.0.0.12
+FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/FV/V
+lv.ROM
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE 
+ $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate # 
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+
+--signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestCert.pem \
+
+--other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
+estSub.pub.pem \
+
+--trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
index 9d08c86717..43c609e4b2 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ MaxRelease.bat
@@ -11,8 +11,8 @@ setlocal
 set FMP_CAPSULE_VENDOR=Intel
 set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 set FMP_CAPSULE_FILE=MinnowMaxRelease.cap
-set FMP_CAPSULE_VERSION=0x00000009
-set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_STRING=0.0.0.12
 set FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI %FMP_CAPSULE_STRING%"
 set FMP_CAPSULE_LSV=0x00000000
 set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
new file mode 100644
index 0000000000..29d46dad1e
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnow
+++ MaxRelease.sh
@@ -0,0 +1,65 @@
+# @file
+#   Linux script file to generate UEFI capsules for system firmware
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+FMP_CAPSULE_FILE=MinnowMaxRelease.cap
+FMP_CAPSULE_VERSION=0x0000000C
+FMP_CAPSULE_STRING=0.0.0.12
+FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/FV
+/Vlv.ROM
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE 
+ $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate # 
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+
+--signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestCert.pem \
+
+--other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
+estSub.pub.pem \
+
+--trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
new file mode 100644
index 0000000000..a1c6f28cde
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSample
+++ Color.sh
@@ -0,0 +1,70 @@
+# @file
+#   Linux script file to generate UEFI capsules for a sample device
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+COLOR=$1
+
+FMP_CAPSULE_VENDOR=Intel
+FMP_CAPSULE_GUID=$2
+FMP_CAPSULE_FILE=$COLOR.cap
+FMP_CAPSULE_VERSION=0x00000010
+FMP_CAPSULE_STRING=0.0.0.16
+FMP_CAPSULE_NAME="$COLOR Progress Bar $FMP_CAPSULE_STRING"
+FMP_CAPSULE_LSV=0x00000000
+FMP_CAPSULE_PAYLOAD=Payload.bin
+
+echo "$COLOR Progress Bar" > $FMP_CAPSULE_PAYLOAD
+
+if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
+  return
+fi
+
+if [ -e NewCert.pem ]; then
+  #
+  # Sign capsule using OpenSSL with a new certificate
+  #
+  GenerateCapsule \
+    --encode \
+    -v \
+    --guid $FMP_CAPSULE_GUID \
+    --fw-version $FMP_CAPSULE_VERSION \
+    --lsv $FMP_CAPSULE_LSV \
+    --capflag PersistAcrossReset \
+    --capflag InitiateReset \
+    --signer-private-cert=NewCert.pem \
+    --other-public-cert=NewSub.pub.pem \
+    --trusted-public-cert=NewRoot.pub.pem \
+    -o $FMP_CAPSULE_FILE \
+    $FMP_CAPSULE_PAYLOAD
+
+  cp $FMP_CAPSULE_FILE 
+ $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
+
+  rm $FMP_CAPSULE_FILE
+fi
+
+#
+# Sign capsule using OpenSSL with EDK II Test Certificate # 
+GenerateCapsule \
+  --encode \
+  -v \
+  --guid $FMP_CAPSULE_GUID \
+  --fw-version $FMP_CAPSULE_VERSION \
+  --lsv $FMP_CAPSULE_LSV \
+  --capflag PersistAcrossReset \
+  --capflag InitiateReset \
+
+--signer-private-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestCert.pem \
+
+--other-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/T
+estSub.pub.pem \
+
+--trusted-public-cert=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign
+/TestRoot.pub.pem \
+  -o $FMP_CAPSULE_FILE \
+  $FMP_CAPSULE_PAYLOAD
+
+cp $FMP_CAPSULE_FILE 
+$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
+
+rm $FMP_CAPSULE_FILE
+
+rm $FMP_CAPSULE_PAYLOAD
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
new file mode 100644
index 0000000000..f2c925a6dd
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs.ddf
@@ -0,0 +1,14 @@
+.OPTION EXPLICIT ; Generate errors on variable typos
+
+.Set CabinetNameTemplate=firmware.cab ; The name of the file .set 
+DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory 
+.Set Cabinet=on ; .Set Compress=on ; .Set DiskDirectory1=.
+.Set MaxDiskSize=99999744               ; multiple of 512
+
+;*** Files to zip ;
+;
+firmware.bin
+firmware.metainfo.xml
+;***
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat
new file mode 100644
index 0000000000..dd8274a1cc
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
+++ nnowMax.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> 
+@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
+set FMP_CAPSULE_BASE_NAME=MinnowMax
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_VERSION_DECIMAL=12
+set FMP_CAPSULE_STRING=0.0.0.12
+set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% DEBUG UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set 
+FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86
+\FV\Vlv.ROM set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate REM call 
+GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+
+--signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestCert.pem ^
+
+--other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
+TestSub.pub.pem ^
+
+--trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml powershell -Command 
+"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE
+_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat
new file mode 100644
index 0000000000..2b68a98f98
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleMi
+++ nnowMaxRelease.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> 
+@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267b-da0a-42eb-b5eb-fef31d207cb4
+set FMP_CAPSULE_BASE_NAME=MinnowMaxRelease
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x0000000C
+set FMP_CAPSULE_VERSION_DECIMAL=12
+set FMP_CAPSULE_STRING=0.0.0.12
+set FMP_CAPSULE_NAME="Intel %FMP_CAPSULE_BASE_NAME% RELEASE UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set 
+FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x
+86\FV\Vlv.ROM set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate REM call 
+GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+
+--signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestCert.pem ^
+
+--other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
+TestSub.pub.pem ^
+
+--trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml powershell -Command 
+"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE
+_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat
new file mode 100644
index 0000000000..1dbbe7341d
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/LvfsGenCapsuleSa
+++ mpleColor.bat
@@ -0,0 +1,145 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for a sample device
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> 
+@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
+
+@echo off
+setlocal
+
+set COLOR=%1
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=%2
+set FMP_CAPSULE_BASE_NAME=%COLOR%
+set FMP_CAPSULE_FILE=%FMP_CAPSULE_BASE_NAME%.cap
+set FMP_CAPSULE_VERSION=0x00000010
+set FMP_CAPSULE_VERSION_DECIMAL=16
+set FMP_CAPSULE_STRING=0.0.0.16
+set FMP_CAPSULE_NAME="%FMP_CAPSULE_BASE_NAME% Progress Bar %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=Payload.bin
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD%
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  copy %FMP_CAPSULE_FILE% firmware.bin
+  copy template.metainfo.xml firmware.metainfo.xml  powershell -Command 
+ "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+  makecab /f Lvfs.ddf
+  copy firmware.cab 
+ %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BAS
+ E_NAME%-%FMP_CAPSULE_STRING%.cab
+
+  erase firmware.cab
+  erase setup.inf
+  erase setup.rpt
+
+  erase firmware.metainfo.xml
+  erase firmware.bin
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate REM call 
+GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+
+--signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestCert.pem ^
+
+--other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\
+TestSub.pub.pem ^
+
+--trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sig
+n\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+copy %FMP_CAPSULE_FILE% firmware.bin
+copy template.metainfo.xml firmware.metainfo.xml powershell -Command 
+"(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCII"
+powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII"
+makecab /f Lvfs.ddf
+copy firmware.cab 
+%WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%FMP_CAPSULE_BASE
+_NAME%-%FMP_CAPSULE_STRING%.cab
+
+erase firmware.cab
+erase setup.inf
+erase setup.rpt
+
+erase firmware.metainfo.xml
+erase firmware.bin
+erase %FMP_CAPSULE_FILE%
+
+erase %FMP_CAPSULE_PAYLOAD%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainfo.xml
new file mode 100644
index 0000000000..5d550c1f48
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/template.metainf
+++ o.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="firmware">
+  <id>com.intel.FMP_CAPSULE_BASE_NAME.firmware</id>
+  <name>FMP_CAPSULE_BASE_NAME</name>
+  <summary>System firmware for the FMP_CAPSULE_BASE_NAME</summary>
+  <description>
+    Description of System firmware for the FMP_CAPSULE_BASE_NAME
+  </description>
+  <provides>
+    <firmware type="flashed">FMP_CAPSULE_GUID</firmware>
+  </provides>
+  <url type="homepage">http://www.tianocore.org</url>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>BSD</project_license>
+  <developer_name>Tianocore</developer_name>
+  <releases>
+    <release version="FMP_CAPSULE_VERSION_DECIMAL" date="FMP_CAPSULE_DATE">
+      <description>
+        Build FMP_CAPSULE_STRING
+      </description>
+    </release>
+  </releases>
+  <!-- most OEMs do not need to do this... -->
+  <custom>
+    <value key="LVFS::InhibitDownload"/>
+  </custom>
+</component>
diff --git a/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
new file mode 100644
index 0000000000..1856ac349b
--- /dev/null
+++ b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.dsc
@@ -0,0 +1,38 @@
+#/** @file
+# Platform capsule description.
+#
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent # #**/
+
+[Defines]
+  PLATFORM_NAME                  = Vlv2TbltDevicePkg
+  PLATFORM_GUID                  = EE87F258-6ECC-4415-B1D8-23771BEE26E7
+  PLATFORM_VERSION               = 0.1
+  FLASH_DEFINITION               = Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
+  OUTPUT_DIRECTORY               = Build/Vlv2TbltDevicePkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+  POSTBUILD                      = Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
+
+#######################################################################
+############################
+#
+# Components Section - list of the modules and components that will be processed by compilation
+#                      tools and the EDK II tools to generate PE32/PE32+/Coff image files.
+#
+# Note: The EDK II DSC file is not used to specify how compiled binary images get placed
+#       into firmware volume images. This section is just a list of modules to compile from
+#       source into UEFI-compliant binaries.
+#       It is the FDF file that contains information on combining binary files into firmware
+#       volume images, whose concept is beyond UEFI and is described in PI specification.
+#       Binary modules do not need to be listed in this section, as they should be
+#       specified in the FDF file. For example: Shell binary, FAT binary (Fat.efi),
+#       Logo (Logo.bmp), and etc.
+#       There may also be modules listed in this section that are not required in the FDF file,
+#       When a module listed here is excluded from FDF file, then UEFI-compliant binary will be
+#       generated for it, but the binary will not be put into any firmware volume.
+#
+#######################################################################
+############################
--
2.21.0.windows.1



-- 
Qian Yi

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

end of thread, other threads:[~2019-05-09 13:21 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09  4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
2019-05-09  4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
2019-05-09  7:53   ` Sun, Zailiang
2019-05-09  7:53   ` Sun, Zailiang
2019-05-09 13:18   ` Qian, Yi
2019-05-09  4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
2019-05-09  8:15   ` Sun, Zailiang
2019-05-09 13:19   ` Qian, Yi
2019-05-09  4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
2019-05-09  7:53   ` Sun, Zailiang
2019-05-09 13:18   ` Qian, Yi
2019-05-09  4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:19   ` Qian, Yi
2019-05-09  4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:19   ` Qian, Yi
2019-05-09  4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:19   ` Qian, Yi
2019-05-09  4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:19   ` Qian, Yi
2019-05-09  4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:18   ` Qian, Yi
2019-05-09  4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:20   ` Qian, Yi
2019-05-09  4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:20   ` Qian, Yi
2019-05-09  4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
2019-05-09  7:54   ` Sun, Zailiang
2019-05-09 13:20   ` Qian, Yi
2019-05-09  4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
2019-05-09  7:55   ` Sun, Zailiang
2019-05-09 13:21   ` Qian, Yi
2019-05-09  4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
2019-05-09  7:55   ` Sun, Zailiang
2019-05-09 13:20   ` Qian, Yi
2019-05-09  4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
2019-05-09  7:55   ` Sun, Zailiang
2019-05-09 13:20   ` Qian, Yi
2019-05-09  4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
2019-05-09  7:55   ` Sun, Zailiang
2019-05-09 13:21   ` Qian, Yi
2019-05-09  4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
2019-05-09  7:58   ` Sun, Zailiang
2019-05-09 13:21   ` Qian, Yi
2019-05-09 13:18 ` [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Qian, Yi

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