[edk2] [Patch][edk2-platforms] Toolchain

lushifex posted 1 patch 54 weeks ago
Failed in applying to current master (apply log)
.../PlatformSetupDxe/SetupInfoRecords.c            | 30 +++++++--------
.../SmBiosMiscDxe/MiscProcessorCacheFunction.c     |  8 ++--
.../VlvPlatformInitDxe/VlvPlatformInit.c           |  4 +-
Vlv2TbltDevicePkg/bld_vlv.bat                      | 45 +++++++++++++---------
4 files changed, 47 insertions(+), 40 deletions(-)

[edk2] [Patch][edk2-platforms] Toolchain

Posted by lushifex 54 weeks ago
Add toolchain for VS2015 build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
 .../PlatformSetupDxe/SetupInfoRecords.c            | 30 +++++++--------
 .../SmBiosMiscDxe/MiscProcessorCacheFunction.c     |  8 ++--
 .../VlvPlatformInitDxe/VlvPlatformInit.c           |  4 +-
 Vlv2TbltDevicePkg/bld_vlv.bat                      | 45 +++++++++++++---------
 4 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
index 8979b41..6a17643 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2004  - 2017, Intel Corporation. All rights reserved.<BR>
                                                                                    

   This program and the accompanying materials are licensed and made available under

   the terms and conditions of the BSD License that accompanies this distribution.  

@@ -1186,7 +1186,7 @@ UpdatePlatformInformation (
   EFI_STATUS               Status;
   UINT8                    CpuFlavor=0;
   EFI_PEI_HOB_POINTERS     GuidHob;
-  EFI_PLATFORM_INFO_HOB    *mPlatformInfo=NULL;
+  EFI_PLATFORM_INFO_HOB    *PlatformInfo=NULL;
   UINTN                    NumHandles;
   EFI_HANDLE                        *HandleBuffer;
   UINTN                             Index;
@@ -1205,7 +1205,7 @@ UpdatePlatformInformation (
   GuidHob.Raw = GetHobList ();
   if (GuidHob.Raw != NULL) {
     if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) {
-      mPlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
+      PlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
     }
   }
 
@@ -1274,41 +1274,41 @@ UpdatePlatformInformation (
   }
   HiiSetString(mHiiHandle,STRING_TOKEN(STR_CPU_FLAVOR_VALUE), Buffer, NULL);
 
-  if ( NULL != mPlatformInfo) {
+  if ( NULL != PlatformInfo) {
     //
     //BoardId
     //
-    switch(mPlatformInfo->BoardId){
+    switch(PlatformInfo->BoardId){
       case 0x2:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE RVP(%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE RVP(%02x)", PlatformInfo->BoardId);
         break;
 
       case 0x4:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFRD(%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFRD(%02x)", PlatformInfo->BoardId);
         break;
 
       case 0x5:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY ROCK RVP DDR3L (%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY ROCK RVP DDR3L (%02x)", PlatformInfo->BoardId);
         break;
 
       case 0x20:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAYLEY BAY (%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAYLEY BAY (%02x)", PlatformInfo->BoardId);
         break;
 
       case 0x30:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAKER SPORT (%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAKER SPORT (%02x)", PlatformInfo->BoardId);
         break;
 
       case 0x0:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"ALPINE VALLEY (%x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"ALPINE VALLEY (%x)", PlatformInfo->BoardId);
         break;
 
       case 0x3:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFD8 (%x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFD8 (%x)", PlatformInfo->BoardId);
         break;
 
       default:
-        UnicodeSPrint (Buffer, sizeof (Buffer), L"Unknown BOARD (%02x)", mPlatformInfo->BoardId);
+        UnicodeSPrint (Buffer, sizeof (Buffer), L"Unknown BOARD (%02x)", PlatformInfo->BoardId);
         break;
     }
     HiiSetString(mHiiHandle,STRING_TOKEN(STR_BOARD_ID_VALUE), Buffer, NULL);
@@ -1318,11 +1318,11 @@ UpdatePlatformInformation (
     // Get Board FAB ID Info from protocol, update into the NVS area.
     // bit0~bit3 are for Fab ID, 0x0F means unknow FAB.
     //
-    if(mPlatformInfo->BoardRev == 0x0F) {
+    if(PlatformInfo->BoardRev == 0x0F) {
       UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", L"Unknown FAB");
       HiiSetString(mHiiHandle,STRING_TOKEN(STR_FAB_ID_VALUE), Buffer, NULL);
     } else {
-      UnicodeSPrint (Buffer, sizeof (Buffer), L"%2x", mPlatformInfo->BoardRev);
+      UnicodeSPrint (Buffer, sizeof (Buffer), L"%2x", PlatformInfo->BoardRev);
       HiiSetString(mHiiHandle,STRING_TOKEN(STR_FAB_ID_VALUE), Buffer, NULL);
     }
   }
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c
index b18a6aa..f38bfc4 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c) 2006  - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006  - 2017, Intel Corporation. All rights reserved.<BR>
                                                                                    

   This program and the accompanying materials are licensed and made available under

   the terms and conditions of the BSD License that accompanies this distribution.  

@@ -29,9 +29,9 @@ Abstract:
 #include <Guid/DataHubRecords.h>
 
 
-extern  SMBIOS_TABLE_TYPE7            *SmbiosRecordL1;
-extern  SMBIOS_TABLE_TYPE7            *SmbiosRecordL2;
-extern  SMBIOS_TABLE_TYPE7            *SmbiosRecordL3;
+extern  SMBIOS_TABLE_TYPE7            *mSmbiosRecordL1;
+extern  SMBIOS_TABLE_TYPE7            *mSmbiosRecordL2;
+extern  SMBIOS_TABLE_TYPE7            *mSmbiosRecordL3;
 
 
 UINT32
diff --git a/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInit.c b/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInit.c
index 5e8d95a..5bbafa6 100644
--- a/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInit.c
+++ b/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInit.c
@@ -1,7 +1,7 @@
 
 /*++
 
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
+Copyright (c)  1999  - 2017, Intel Corporation. All rights reserved
                                                                                    

   This program and the accompanying materials are licensed and made available under

   the terms and conditions of the BSD License that accompanies this distribution.  

@@ -147,7 +147,7 @@ PostPmInitCallBack (
 EFI_STATUS
 IgdPmHook (
   IN EFI_HANDLE                      ImageHandle,
-  IN DXE_VLV_PLATFORM_POLICY_PROTOCOL *DxePlatformSaPolicy
+  IN DXE_VLV_PLATFORM_POLICY_PROTOCOL *mDxePlatformSaPolicy
   )
 {
 
diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.bat
index 1f3695b..d3fac09 100644
--- a/Vlv2TbltDevicePkg/bld_vlv.bat
+++ b/Vlv2TbltDevicePkg/bld_vlv.bat
@@ -135,20 +135,20 @@ if /i "%~2" == "RELEASE" (
 :: Additional EDK Build Setup/Configuration
 ::**********************************************************************
 echo.
-echo Setting the Build environment for VS2008/VS2010/VS2012/VS2013...
-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 if defined VS100COMNTOOLS (
-  if not defined VSINSTALLDIR call "%VS100COMNTOOLS%\vsvars32.bat"
-  if /I "%VS100COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\" (
-    set TOOL_CHAIN_TAG=VS2010
+echo Setting the Build environment for VS2015/VS2013/VS2012/VS2010/VS2008...
+if defined VS140COMNTOOLS (
+  if not defined VSINSTALLDIR call "%VS140COMNTOOLS%\vsvars32.bat"
+  if /I "%VS140COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 14.0\Common7\Tools\" (
+    set TOOL_CHAIN_TAG=VS2015
   ) else (
-    set TOOL_CHAIN_TAG=VS2010x86
+    set TOOL_CHAIN_TAG=VS2015x86
+  ) 
+) else if defined VS120COMNTOOLS (
+  if not defined VSINSTALLDIR call "%VS120COMNTOOLS%\vsvars32.bat"
+  if /I "%VS120COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools\" (
+    set TOOL_CHAIN_TAG=VS2013
+  ) else (
+    set TOOL_CHAIN_TAG=VS2013x86
   )
 ) else if defined VS110COMNTOOLS (
   if not defined VSINSTALLDIR call "%VS110COMNTOOLS%\vsvars32.bat"
@@ -157,15 +157,22 @@ if defined VS90COMNTOOLS (
   ) else (
     set TOOL_CHAIN_TAG=VS2012x86
   )
-) else if defined VS120COMNTOOLS (
-  if not defined VSINSTALLDIR call "%VS120COMNTOOLS%\vsvars32.bat"
-  if /I "%VS120COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools\" (
-    set TOOL_CHAIN_TAG=VS2013
+) else if defined VS100COMNTOOLS (
+  if not defined VSINSTALLDIR call "%VS100COMNTOOLS%\vsvars32.bat"
+  if /I "%VS100COMNTOOLS%" == "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\" (
+    set TOOL_CHAIN_TAG=VS2010
   ) else (
-    set TOOL_CHAIN_TAG=VS2013x86
+    set TOOL_CHAIN_TAG=VS2010x86
   )
+) else 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  --ERROR: VS2008/VS2010/VS2012/VS2013 not installed correctly. VS90COMNTOOLS/VS100COMNTOOLS/VS110COMNTOOLS/VS120COMNTOOLS not defined ^^!
+  echo  --ERROR: VS2015/VS2013/VS2012/VS2010/VS2008 not installed correctly. VS140COMNTOOLS/VS120COMNTOOLS/VS110COMNTOOLS/VS100COMNTOOLS/VS90COMNTOOLS not defined ^^!
   echo.
   goto :BldFail
 )
-- 
2.7.0.windows.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel