From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zailiang.sun@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Wed, 10 Jul 2019 21:48:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 21:48:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,476,1557212400"; d="scan'208";a="166281502" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 10 Jul 2019 21:48:08 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jul 2019 21:48:08 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jul 2019 21:48:08 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.109]) with mapi id 14.03.0439.000; Thu, 11 Jul 2019 12:48:06 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Gary Lin , "Qian, Yi" Subject: Re: [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the script to fit edk2-platforms Thread-Topic: [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the script to fit edk2-platforms Thread-Index: AQHVN1JzBKRFgn4p7kmd1M368QY8YabE2P6A Date: Thu, 11 Jul 2019 04:48:05 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C95D8D@SHSMSX104.ccr.corp.intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> <20190710190516.6012-7-michael.d.kinney@intel.com> In-Reply-To: <20190710190516.6012-7-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, July 11, 2019 3:05 AM > To: devel@edk2.groups.io > Cc: Gary Lin ; Sun, Zailiang ; Qia= n, > Yi > Subject: [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Updat= e > the script to fit edk2-platforms >=20 > From: Gary Lin >=20 > * Add "set -e" to exit immediately on error >=20 > * Update the paths to fit the directory changes >=20 > WORKSPACE > +------edk2 (CORE) > | > +------edk2-platforms > | | > | +---Platform > | | | > | | +---Intel > | | | > | | +---Vlv2TbltDevicePkg (PLATFORM) > | | > | +---Silicon > | | > | +---Intel > | | > | +---Vlv2DeviceRefCodePkg (SILICON) > | > +------edk2-non-osi > | > +---Silicon > | > +---Intel > | > +---Vlv2SocBinPkg (BINARY) >=20 > * Sync a part of bld_vlv.sh from the devel-MinnowBoardMax-UDK2017 > branch > to enable capsule building >=20 > * Export TARGET and TOOL_CHAIN_TAG so that the GenerateCapsule scripts > can use those variables >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Cc: Michael D Kinney > Signed-off-by: Gary Lin > --- > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 57 ++++++++++++--------- > 1 file changed, 33 insertions(+), 24 deletions(-) >=20 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > index 27772f47de..0aa1edfb22 100755 > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > @@ -7,7 +7,7 @@ function Usage() { > echo > "********************************************************** > *****************" > echo "Build BIOS rom for VLV platforms." > echo > - echo "Usage: bld_vlv.bat PlatformType [Build Target]" > + echo "Usage: bld_vlv.sh PlatformType [Build Target]" > echo > echo > echo " Platform Types: MNW2" > @@ -19,44 +19,52 @@ function Usage() { > exit 0 > } >=20 > +set -e >=20 > +cd .. > echo -e $(date) >=20 > ##******************************************************** > ************** > ## Initial Setup >=20 > ##******************************************************** > ************** > -#WORKSPACE=3D$(pwd) > +export WORKSPACE=3D$(pwd) > #build_threads=3D($NUMBER_OF_PROCESSORS)+1 > Build_Flags=3D > exitCode=3D0 > Arch=3DX64 > SpiLock=3D0 >=20 > +export CORE_PATH=3D$WORKSPACE/edk2 > +export PLATFORM_PATH=3D$WORKSPACE/edk2-platforms/Platform/Intel/ > +export SILICON_PATH=3D$WORKSPACE/edk2-platforms/Silicon/Intel/ > +export BINARY_PATH=3D$WORKSPACE/edk2-non-osi/Silicon/Intel/ > +export > +PACKAGES_PATH=3D$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$CO > RE_PATH > +cd ./edk2 > + > ## Clean up previous build files. > -if [ -e $(pwd)/EDK2.log ]; then > - rm $(pwd)/EDK2.log > +if [ -e $CORE_PATH/EDK2.log ]; then > + rm $CORE_PATH/EDK2.log > fi >=20 > -if [ -e $(pwd)/Unitool.log ]; then > - rm $(pwd)/Unitool.log > +if [ -e $CORE_PATH/Unitool.log ]; then > + rm $CORE_PATH/Unitool.log > fi >=20 > -if [ -e $(pwd)/Conf/target.txt ]; then > - rm $(pwd)/Conf/target.txt > +if [ -e $CORE_PATH/Conf/target.txt ]; then > + rm $CORE_PATH/Conf/target.txt > fi >=20 > -if [ -e $(pwd)/Conf/BiosId.env ]; then > - rm $(pwd)/Conf/BiosId.env > +if [ -e $CORE_PATH/Conf/BiosId.env ]; then > + rm $CORE_PATH/Conf/BiosId.env > fi >=20 > -if [ -e $(pwd)/Conf/tools_def.txt ]; then > - rm $(pwd)/Conf/tools_def.txt > +if [ -e $CORE_PATH/Conf/tools_def.txt ]; then > + rm $CORE_PATH/Conf/tools_def.txt > fi >=20 > -if [ -e $(pwd)/Conf/build_rule.txt ]; then > - rm $(pwd)/Conf/build_rule.txt > +if [ -e $CORE_PATH/Conf/build_rule.txt ]; then > + rm $CORE_PATH/Conf/build_rule.txt > fi >=20 > - > ## 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 . edksetup.sh BaseTools @@ -64,8 +72,9 @@ make -C BaseTools >=20 > ## Define platform specific environment variables. > PLATFORM_PACKAGE=3DVlv2TbltDevicePkg > -config_file=3D$WORKSPACE/$PLATFORM_PACKAGE/PlatformPkgConfig.dsc > - > auto_config_inc=3D$WORKSPACE/$PLATFORM_PACKAGE/AutoPlatformCFG.tx > t > +PLATFORM_PKG_PATH=3D$PLATFORM_PATH/$PLATFORM_PACKAGE > +config_file=3D$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc > +auto_config_inc=3D$PLATFORM_PKG_PATH/AutoPlatformCFG.txt >=20 > ## create new AutoPlatformCFG.txt file > if [ -f "$auto_config_inc" ]; then > @@ -112,10 +121,10 @@ fi >=20 > ## Remove the values for Platform_Type and Build_Target from BiosIdX.env > and stage in Conf if [ $Arch =3D=3D "IA32" ]; then > - cp $PLATFORM_PACKAGE/BiosIdR.env Conf/BiosId.env > + cp $PLATFORM_PKG_PATH/BiosIdR.env Conf/BiosId.env > echo DEFINE X64_CONFIG =3D FALSE >> $auto_config_inc > else > - cp $PLATFORM_PACKAGE/BiosIdx64R.env Conf/BiosId.env > + cp $PLATFORM_PKG_PATH/BiosIdx64R.env Conf/BiosId.env > echo DEFINE X64_CONFIG =3D TRUE >> $auto_config_inc > fi > sed -i '/^BOARD_ID/d' Conf/BiosId.env > @@ -142,11 +151,11 @@ fi > Platform_Type=3D$1 >=20 > if [ "$(echo $2 | tr 'a-z' 'A-Z')" =3D=3D "RELEASE" ]; then > - TARGET=3DRELEASE > + export TARGET=3DRELEASE > BUILD_TYPE=3DR > echo BUILD_TYPE =3D R >> Conf/BiosId.env else > - TARGET=3DDEBUG > + export TARGET=3DDEBUG > BUILD_TYPE=3DD > echo BUILD_TYPE =3D D >> Conf/BiosId.env fi @@ -157,7 +166,7 @@ fi >=20 > ##******************************************************** > ************** > echo "Ensuring correct build directory is present for GenBiosId..." >=20 > -echo Modifing Conf files for this build... > +echo Modifying Conf files for this build... > ## Remove lines with these tags from target.txt sed -i > '/^ACTIVE_PLATFORM/d' Conf/target.txt sed -i '/^TARGET /d' > Conf/target.txt @@ -182,8 +191,8 @@ case $gcc_version in > ;; > esac >=20 > -ACTIVE_PLATFORM=3D$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc > -TOOL_CHAIN_TAG=3D$TARGET_TOOLS > +ACTIVE_PLATFORM=3D$PLATFORM_PKG_PATH/PlatformPkgGcc"$Arch".dsc > +export TOOL_CHAIN_TAG=3D$TARGET_TOOLS > MAX_CONCURRENT_THREAD_NUMBER=3D1 > echo ACTIVE_PLATFORM =3D $ACTIVE_PLATFORM >> > Conf/target.txt > echo TARGET =3D $TARGET >> C= onf/target.txt > -- > 2.21.0.windows.1