public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wei, David" <david.wei@intel.com>
To: "Lu, ShifeiX A" <shifeix.a.lu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script.
Date: Wed, 20 Dec 2017 06:04:33 +0000	[thread overview]
Message-ID: <89954A0B46707A448411A627AD4EEE3468FCFC84@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <0c8d6888-f6d5-46d9-925f-c09447698240@SHWDEOPENPSI011.local>

Reviewed-by: zwei4  <david.wei@intel.com> 

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS                                 

> -----Original Message-----
> From: Lu, ShifeiX A
> Sent: Wednesday, December 20, 2017 2:02 PM
> To: edk2-devel@lists.01.org
> Cc: Wei, David <david.wei@intel.com>
> Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script.
> 
> Add build script for E0 stepping LeafHill FAB D CRB board.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: lushifex <shifeix.a.lu@intel.com>
> ---
>  BuildBIOS.bat                                      |  4 ++-
>  BuildBIOS.sh                                       | 12 ++++++++-
>  Platform/BroxtonPlatformPkg/BuildBxtBios.bat       | 20 +++++++++++++++
>  Platform/BroxtonPlatformPkg/BuildBxtBios.sh        | 29
> +++++++++++++++++++++-
>  Platform/BroxtonPlatformPkg/BuildIFWI.bat          | 13 ++++++++++
>  Platform/BroxtonPlatformPkg/BuildIFWI.sh           | 10 ++++++++
>  .../SmBiosMiscDxe/MiscSystemManufacturerFunction.c |  7 ++++++
>  .../Common/Tools/Stitch/IFWIStitch_Simple.bat      | 11 ++++++++
>  .../BroxtonSiPkg/Include/Library/SteppingLib.h     |  3 ++-
>  .../BroxtonSiPkg/Library/SteppingLib/SteppingLib.c |  6 ++++-
>  10 files changed, 110 insertions(+), 5 deletions(-)
> 
> diff --git a/BuildBIOS.bat b/BuildBIOS.bat
> index 051c0a9..96c34f9 100644
> --- a/BuildBIOS.bat
> +++ b/BuildBIOS.bat
> @@ -54,11 +54,13 @@ echo        /m     Set the build thread count to number
> of processors
>  echo        /vs13  Set Compiler to vs2013 build (default: vs2013)
>  echo        /x64   Set Arch to X64  (default: X64)
>  echo        /IA32  Set Arch to IA32 (default: X64)
> -echo        /A     Set FabId to A (default:  FAB_B)
> +echo        /A     Set FabId to A
>  echo        /B     Set FabId to B (default:  FAB_B)
> +echo        /D     Set FabId to D
>  echo        /MN    MinnowBoard 3(default: MN)
>  echo        /MX    MinnowBoard 3 Module
>  echo        /BG    Benson Glacier Board
> +echo        /LH    LeafHill CRB Board
>  echo        PlatformName:  Broxton
>  echo        BuildTargets:  Release, Debug
> 
> diff --git a/BuildBIOS.sh b/BuildBIOS.sh
> index b8d21d7..91d6bd6 100755
> --- a/BuildBIOS.sh
> +++ b/BuildBIOS.sh
> @@ -21,8 +21,10 @@ function Usage () {
>    echo "       Build_Flags:                 /MN    MinnowBoard3 (default: MN)"
>    echo "       Build_Flags:                 /BG    Benson Glacier Board"
>    echo "       Build_Flags:                 /MX    MinnowBoard3 Module"
> -  echo "       Build_Flags:                 /A     Set FabId to A (default:  FAB_B)"
> +  echo "       Build_Flags:                 /LH    LeafHill CRB Board"
> +  echo "       Build_Flags:                 /A     Set FabId to A "
>    echo "       Build_Flags:                 /B     Set FabId to B (default:  FAB_B)"
> +  echo "       Build_Flags:                 /D     Set FabId to D "
>    echo "       PlatformName [optional]:     Broxton  "
>    echo "       Target_Flag:                 Release, Debug       "
>    echo
> @@ -64,6 +66,14 @@ for (( i=1; i<=$#; ))
>        BoardId=MX
>        Build_Flags="$Build_Flags /MX"
>        shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/LH" ]; then
> +      BoardId=LH
> +      Build_Flags="$Build_Flags /LH"
> +      shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/D" ]; then
> +      FabId=D
> +      Build_Flags="$Build_Flags /D"
> +      shift
>      elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
>        FabId=B
>        Build_Flags="$Build_Flags /B"
> diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
> b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
> index 994bb3a..5aa545e 100644
> --- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
> +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
> @@ -165,6 +165,12 @@ if /i "%~1"=="/B" (
>      shift
>      goto OptLoop
>  )
> +if /i "%~1"=="/D" (
> +    set FabId=D
> +    echo.
> +    shift
> +    goto OptLoop
> +)
>  if /i "%~1"=="/MN" (
>      set BoardId=MN
>      echo.
> @@ -183,6 +189,12 @@ if /i "%~1"=="/MX" (
>      shift
>      goto OptLoop
>  )
> +if /i "%~1"=="/LH" (
> +    set BoardId=LH
> +    echo.
> +    shift
> +    goto OptLoop
> +)
>  if /i "%~1"=="/m" (
>      if defined NUMBER_OF_PROCESSORS (
>          set /a build_threads=%NUMBER_OF_PROCESSORS%
> @@ -209,6 +221,8 @@ if /i "%~1" == "%Minnow_RVP%" (
>      set BOARD_ID=BENSONV
>    ) else if %BoardId%==MX (
>      set BOARD_ID=M3MODUL
> +  ) else if %BoardId%==LH (
> +    set BOARD_ID=LEAFHIL
>    )
>      set ENBDT_PF_BUILD=TRUE
>      set PLATFORM_NAME=BroxtonPlatformPkg
> @@ -285,6 +299,12 @@ if %BoardId%==MX (
>    )
>  )
> 
> +if %BoardId%==LH (
> +  if %FabId%==D (
> +    echo BOARD_REV = D >> Conf\BiosId.env
> +  )
> +)
> +
>  :: Set the Build_Type, Version_Major, and Version_Minor environment
> variables
>  find /v "#" Conf\BiosId.env > ver_strings
>  for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j
> diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
> b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
> index ef261e6..74aa782 100755
> --- a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
> +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
> @@ -107,6 +107,12 @@ for (( i=1; i<=$#; ))
>      elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/MX" ]; then
>        BoardId=MX
>        shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/LH" ]; then
> +      BoardId=LH
> +      shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/D" ]; then
> +      FabId=D
> +      shift
>      elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
>        FabId=B
>        shift
> @@ -138,9 +144,14 @@ if [ $BoardId == "MN" ]; then
>  elif [ $BoardId == "MX" ]; then
>    BOARD_ID=M3MO
>    echo BOARD_ID = M3MODUL >> $WORKSPACE/Conf/BiosId.env
> -else
> +elif [ $BoardId == "BG" ]; then
>    BOARD_ID=BEN1
>    echo BOARD_ID = BENSONV >> $WORKSPACE/Conf/BiosId.env
> +elif [ $BoardId == "LH" ]; then
> +  BOARD_ID=LEAF
> +  echo BOARD_ID = LEAFHIL >> $WORKSPACE/Conf/BiosId.env
> +else
> +  break
>  fi
> 
>  ENBDT_PF_BUILD=TRUE
> @@ -212,6 +223,13 @@ if [ $BoardId == "MX" ]; then
>    fi
>  fi
> 
> +if [ $BoardId == "LH" ]; then
> +  if [ $FabId == "D" ]; then
> +    BOARD_REV=D
> +    echo BOARD_REV = D >> $WORKSPACE/Conf/BiosId.env
> +  fi
> +fi
> +
> 
> ##********************************************************
> **************
>  ## Additional EDK Build Setup/Configuration
> 
> ##********************************************************
> **************
> @@ -353,6 +371,15 @@ if [ $BoardId == "MX" ]; then
>    fi
>  fi
> 
> +if [ $BoardId == "LH" ]; then
> +  if [ $FabId == "D" ]; then
> +    cp -f
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/LeafHi
> ll/FAB_D/SpiChunk1.bin
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
> +    cp -f
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/LeafHi
> ll/FAB_D/SpiChunk2.bin
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
> +    cp -f
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/LeafHi
> ll/FAB_D/SpiChunk3.bin
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
> +    cp -f
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/LeafHi
> ll/FAB_D/GCC/NvStorage.Fv
> $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
> +  fi
> +fi
> +
>  #
>  # Assmeble components
>  #
> diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> index 556bd4a..2742103 100644
> --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> @@ -93,6 +93,12 @@ if /i "%~1"=="/B" (
>      shift
>      goto OptLoop
>  )
> +if /i "%~1"=="/D" (
> +    set FabId=D
> +    set Build_Flags=%Build_Flags% /D
> +    shift
> +    goto OptLoop
> +)
>  if /i "%~1"=="/MN" (
>      set BoardId=MN
>      set Build_Flags=%Build_Flags% /MN
> @@ -113,6 +119,13 @@ if /i "%~1"=="/MX" (
>      goto OptLoop
>  )
> 
> +if /i "%~1"=="/LH" (
> +    set BoardId=LH
> +    set Build_Flags=%Build_Flags% /LH
> +    shift
> +    goto OptLoop
> +)
> +
>  if /i "%~1"=="/m" (
>      set buildthread=/m
>      echo.
> diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
> b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
> index 33dd249..6138fb4 100755
> --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
> +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
> @@ -22,8 +22,10 @@ function Usage () {
>    echo "       Build_Flags:                 /MN    Minnowboard 3 (default) "
>    echo "       Build_Flags:                 /BG    Benson Glacier Board "
>    echo "       Build_Flags:                 /MX    Minnowboard 3 Next "
> +  echo "       Build_Flags:                 /LH    LeafHill CRB Board "
>    echo "       Build_Flags:                 /A     Set FabId to A"
>    echo "       Build_Flags:                 /B     Set FabId to B (default)"
> +  echo "       Build_Flags:                 /D     Set FabId to D"
>    echo "       Platform_Type [optional]:    Broxton "
>    echo "       Build_Target:                Release, Debug "
>    echo
> @@ -71,6 +73,14 @@ for (( i=1; i<=$#; ))
>        BoardId=MX
>        Build_Flags="$Build_Flags /MX"
>        shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/LH" ]; then
> +      BoardId=LH
> +      Build_Flags="$Build_Flags /LH"
> +      shift
> +    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/D" ]; then
> +      FabId=D
> +      Build_Flags="$Build_Flags /D"
> +      shift
>      elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
>        FabId=B
>        Build_Flags="$Build_Flags /B"
> diff --git
> a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe
> /MiscSystemManufacturerFunction.c
> b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDx
> e/MiscSystemManufacturerFunction.c
> index bcb0c51..1878ce5 100644
> ---
> a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe
> /MiscSystemManufacturerFunction.c
> +++
> b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDx
> e/MiscSystemManufacturerFunction.c
> @@ -144,6 +144,13 @@ AddSmbiosManuCallback (
>        HiiSetString (mHiiHandle, STRING_TOKEN (STR_MISC_SYSTEM_VERSION),
> Buffer, NULL);
>        DEBUG ((EFI_D_ERROR, "C0 Stepping Detected\n"));
>        break;
> +    case BxtPE0:
> +      UnicodeSPrint (Buffer, sizeof (Buffer), L"%s%s", PlatformNameBuffer,
> L"E0 PLATFORM");
> +      HiiSetString (mHiiHandle, STRING_TOKEN
> (STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
> +      UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", L"E0");
> +      HiiSetString (mHiiHandle, STRING_TOKEN
> (STR_MISC_SYSTEM_VERSION), Buffer, NULL);
> +      DEBUG ((EFI_D_ERROR, "E0 Stepping Detected\n"));
> +      break;
>      default:
>        DEBUG ((EFI_D_ERROR, "Unknow Stepping Detected\n"));
>        break;
> diff --git
> a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.b
> at
> b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.b
> at
> index 01e56c5..4c1fcb1 100644
> ---
> a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.b
> at
> +++
> b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.b
> at
> @@ -52,6 +52,10 @@ if /i "%~3"=="MX" (
>      set BoardId=MX
>  )
> 
> +if /i "%~3"=="LH" (
> +    set BoardId=LH
> +)
> +
>  :OptLoop1
> 
>  if /i "%~1"=="/FspW" (
> @@ -112,6 +116,8 @@ if /i "!Platform_Type!"=="MINN" (
>      set Platform_Type=BENS
>  ) else if /i "!Platform_Type!"=="M3MO" (
>      set Platform_Type=M3MO
> +) else if /i "!Platform_Type!"=="LEAF" (
> +    set Platform_Type=LEAF
>  ) else (
>      echo Error - Unsupported PlatformType: !Platform_Type!
>      goto Usage
> @@ -165,6 +171,11 @@ if %BoardId%==BG (
>             copy /y
> /b ..\..\Binaries\IFWI\MinnowBoard3Next\FAB_A\SpiChunk2.bin .
>             copy /y
> /b ..\..\Binaries\IFWI\MinnowBoard3Next\FAB_A\SpiChunk3.bin .
>             copy /y /b
> SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.F
> v+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\Nv
> Storage.Fv+SpiChunk3.bin spi_out.bin
> +) else if %BoardId%==LH (
> +           copy /y /b ..\..\Binaries\IFWI\LeafHill\FAB_D\SpiChunk1.bin .
> +           copy /y /b ..\..\Binaries\IFWI\LeafHill\FAB_D\SpiChunk2.bin .
> +           copy /y /b ..\..\Binaries\IFWI\LeafHill\FAB_D\SpiChunk3.bin .
> +           copy /y /b
> SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.F
> v+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\Nv
> Storage.Fv+SpiChunk3.bin spi_out.bin
>  )
>  move /y spi_out.bin %BIOS_ID%.bin  >> Stitching.log
> 
> diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Include/Library/SteppingLib.h
> b/Silicon/BroxtonSoC/BroxtonSiPkg/Include/Library/SteppingLib.h
> index c14911b..f27da46 100644
> --- a/Silicon/BroxtonSoC/BroxtonSiPkg/Include/Library/SteppingLib.h
> +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Include/Library/SteppingLib.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Get Soc ID library implementation.
> 
> -  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2014 - 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
> @@ -42,6 +42,7 @@ typedef enum {
>    BxtPB0         = 0x50,
>    BxtPB1,
>    BxtPB2,
> +  BxtPE0         = 0x60,
>    BxtSteppingMax = 0xFF
>  } BXT_STEPPING;
> 
> diff --git
> a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/SteppingLib/SteppingLib.c
> b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/SteppingLib/SteppingLib.c
> index d4930d1..64ea576 100644
> --- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/SteppingLib/SteppingLib.c
> +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/SteppingLib/SteppingLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>    This file contains routines that get Soc Stepping.
> 
> -  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2014 - 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
> @@ -110,6 +110,10 @@ BxtStepping (
>          DEBUG ((DEBUG_INFO, "BXTP-B2 detected!\n"));
>          return BxtPB2;
>          break;
> +      case V_SA_MC_RID_C:
> +        DEBUG ((DEBUG_INFO, "BXTP-E0 detected!\n"));
> +        return BxtPE0;
> +        break;
>        default:
>          DEBUG ((DEBUG_ERROR, "Unsupported BXT-P stepping.\n"));
>          return BxtSteppingMax;
> --
> 2.7.0.windows.1
> 



  reply	other threads:[~2017-12-20  5:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 16:40 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script lushifex
2017-12-20  6:04 ` Wei, David [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-30  1:58 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script lushifex
2017-10-30  2:15 ` Wei, David
2017-09-14  5:59 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script lushifex
2017-09-14  6:24 ` Wei, David
2017-07-11 22:20 lushifex
2017-07-11 22:20 lushifex
2017-06-16  2:48 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script lushifex
2017-06-16  2:50 ` Wei, David
2017-06-08  7:58 lushifex
2017-06-08  8:01 ` Wei, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89954A0B46707A448411A627AD4EEE3468FCFC84@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox