From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5B27C81E9E for ; Fri, 11 Nov 2016 00:32:49 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 11 Nov 2016 00:32:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,620,1473145200"; d="scan'208";a="190253456" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 11 Nov 2016 00:32:52 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Nov 2016 00:32:52 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Nov 2016 00:32:52 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.142]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Fri, 11 Nov 2016 16:32:50 +0800 From: "Ni, Ruiyu" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH 3/3] DuetPkg: Add POSTBUILD in DSC files to run post-build automatically Thread-Index: AQHSO/VqCpjtsPaPtUu6Vq1pS9S93qDTdFUQ Date: Fri, 11 Nov 2016 08:32:49 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E73BDB@SHSMSX104.ccr.corp.intel.com> References: <1478852805-11900-1-git-send-email-hao.a.wu@intel.com> <1478852805-11900-4-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1478852805-11900-4-git-send-email-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODFiYzM4MDEtNzJlYi00NDcyLWIyM2EtZDYyODljNjZlZDkxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjBMTW96UTVFUjVDOHYyWURVTFwveEU3Ym9aN2pVQ0lWNTBMK3JleXJuem5rPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 3/3] DuetPkg: Add POSTBUILD in DSC files to run post-build automatically X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2016 08:32:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hao, Thanks for making this helpful updates. Reviewed-by: Ruiyu Ni >-----Original Message----- >From: Wu, Hao A >Sent: Friday, November 11, 2016 4:27 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH 3/3] DuetPkg: Add POSTBUILD in DSC files to run post-build= automatically > >https://bugzilla.tianocore.org/show_bug.cgi?id=3D220 > >Currently, the post-build scripts PostBuild.bat/PostBuild.sh in DuetPkg >need to be run manually. Especially for Windows batch script, it also >requires users to set the build options (like tool chain, target and arch) >in file Conf/target.txt. If users using command line options via '-t' or >'-a', the post-build script won't work properly. > >The package DSC files now support the feature to execute post-build script >automatically by adding a 'POSTBUILD' definition. This feature also passes >the build options into the post-build script as parameters. This commit >uses this feature to make the post-build works for DuetPkg more >user-friendly. Also, ReadMe.txt is updated to reflect the new steps for >UEFI Emulation (DUET) development. > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Hao Wu >--- > DuetPkg/CreateBootDisk.bat | 8 ++---- > DuetPkg/CreateBootDisk.sh | 10 ++----- > DuetPkg/DuetPkgIa32.dsc | 5 ++++ > DuetPkg/DuetPkgX64.dsc | 5 ++++ > DuetPkg/GetVariables.bat | 39 ------------------------- > DuetPkg/PostBuild.bat | 49 ++++++++++++++++++++------------ > DuetPkg/PostBuild.sh | 60 ++++++++++++++++----------------------- > DuetPkg/ReadMe.txt | 71 +++++++++++++++++++++--------------------= ----- > DuetPkg/build32.sh | 4 +-- > DuetPkg/build64.sh | 4 +-- > 10 files changed, 105 insertions(+), 150 deletions(-) > delete mode 100644 DuetPkg/GetVariables.bat > >diff --git a/DuetPkg/CreateBootDisk.bat b/DuetPkg/CreateBootDisk.bat >index 7265837..cee04b8 100644 >--- a/DuetPkg/CreateBootDisk.bat >+++ b/DuetPkg/CreateBootDisk.bat >@@ -1,7 +1,7 @@ > @echo off > @REM ## @file > @REM # >-@REM # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved= .
>+@REM # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved= .
> @REM # > @REM # This program and the accompanying materials > @REM # are licensed and made available under the terms and conditions of= the BSD License >@@ -15,14 +15,11 @@ > > @REM Set up environment at first. > >-set BASETOOLS_DIR=3D%WORKSPACE_TOOLS_PATH%\Bin\Win32 >+set BASETOOLS_DIR=3D%EDK_TOOLS_BIN% > set BOOTSECTOR_BIN_DIR=3D%WORKSPACE%\DuetPkg\BootSector\bin > set DISK_LABEL=3DDUET > set PROCESSOR=3D"" > set STEP=3D1 >-call %WORKSPACE%\DuetPkg\GetVariables.bat >- >-echo on > > if "%1"=3D=3D"" goto Help > if "%2"=3D=3D"" goto Help >@@ -35,6 +32,7 @@ set EFI_BOOT_DISK=3D%2 > if "%TARGET_ARCH%"=3D=3D"IA32" set PROCESSOR=3DIA32 > if "%TARGET_ARCH%"=3D=3D"X64" set PROCESSOR=3DX64 > if %PROCESSOR%=3D=3D"" goto WrongArch >+call %WORKSPACE%\DuetPkg\SetEnv_%PROCESSOR%.bat > set BUILD_DIR=3D%WORKSPACE%\Build\DuetPkg%PROCESSOR%\%TARGET%_%TOOL_CHAIN= _TAG% > > if "%1"=3D=3D"floppy" goto CreateFloppy >diff --git a/DuetPkg/CreateBootDisk.sh b/DuetPkg/CreateBootDisk.sh >index fa00408..897ba9b 100755 >--- a/DuetPkg/CreateBootDisk.sh >+++ b/DuetPkg/CreateBootDisk.sh >@@ -34,7 +34,7 @@ if [ \ > "$*" =3D "--help" \ > ] > then >- echo "Usage: CreateBootDisk [usb|floppy|ide|file] MediaPath DevicePat= h [FAT12|FAT16|FAT32] [IA32|X64] >[GCC44|UNIXGCC]" >+ echo "Usage: CreateBootDisk [usb|floppy|ide|file] MediaPath DevicePat= h [FAT12|FAT16|FAT32] [IA32|X64]" > echo "e.g. : CreateBootDisk floppy /media/floppy0 /dev/fd0 FAT12 IA32= " > PROCESS_MARK=3DFALSE > fi >@@ -51,13 +51,7 @@ case "$5" in > return 1 > esac > >-if [ -z "$6" ] >-then >- TOOLCHAIN=3DGCC44 >-else >- TOOLCHAIN=3D$6 >-fi >- >+. $WORKSPACE/DuetPkg/SetEnv_$PROCESSOR.sh > export BUILD_DIR=3D$WORKSPACE/Build/DuetPkg$PROCESSOR/DEBUG_$TOOLCHAIN > > >diff --git a/DuetPkg/DuetPkgIa32.dsc b/DuetPkg/DuetPkgIa32.dsc >index 86346f3..3b59343 100644 >--- a/DuetPkg/DuetPkgIa32.dsc >+++ b/DuetPkg/DuetPkgIa32.dsc >@@ -31,6 +31,11 @@ > BUILD_TARGETS =3D DEBUG > SKUID_IDENTIFIER =3D DEFAULT > FLASH_DEFINITION =3D DuetPkg/DuetPkg.fdf >+!if $(TOOL_CHAIN_TAG) =3D=3D GCC47 || $(TOOL_CHAIN_TAG) =3D=3D GCC48 || $= (TOOL_CHAIN_TAG) =3D=3D GCC49 || >$(TOOL_CHAIN_TAG) =3D=3D GCC5 >+ POSTBUILD =3D DuetPkg/PostBuild.sh >+!else >+ POSTBUILD =3D DuetPkg/PostBuild.bat >+!endif > > #########################################################################= ####### > # >diff --git a/DuetPkg/DuetPkgX64.dsc b/DuetPkg/DuetPkgX64.dsc >index e0aeb5c..c23354a 100644 >--- a/DuetPkg/DuetPkgX64.dsc >+++ b/DuetPkg/DuetPkgX64.dsc >@@ -31,6 +31,11 @@ > BUILD_TARGETS =3D DEBUG > SKUID_IDENTIFIER =3D DEFAULT > FLASH_DEFINITION =3D DuetPkg/DuetPkg.fdf >+!if $(TOOL_CHAIN_TAG) =3D=3D GCC47 || $(TOOL_CHAIN_TAG) =3D=3D GCC48 || $= (TOOL_CHAIN_TAG) =3D=3D GCC49 || >$(TOOL_CHAIN_TAG) =3D=3D GCC5 >+ POSTBUILD =3D DuetPkg/PostBuild.sh >+!else >+ POSTBUILD =3D DuetPkg/PostBuild.bat >+!endif > > #########################################################################= ####### > # >diff --git a/DuetPkg/GetVariables.bat b/DuetPkg/GetVariables.bat >deleted file mode 100644 >index c81d3d1..0000000 >--- a/DuetPkg/GetVariables.bat >+++ /dev/null >@@ -1,39 +0,0 @@ >-@echo off >-@REM ## @file >-@REM # >-@REM # Copyright (c) 2011, Intel Corporation. All rights reserved.
>-@REM # >-@REM # This program and the accompanying materials >-@REM # are licensed and made available under the terms and conditions of= the BSD License >-@REM # which accompanies this distribution. The full text of the license= may be found at >-@REM # http://opensource.org/licenses/bsd-license.php >-@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BA= SIS, >-@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS= OR IMPLIED. >-@REM # >-@REM # >-@REM ## >- >- >-@REM Read the variables from Conf/target.txt >-@REM Because we can't add '=3D' as a delimiter in 'for', each variable is= read in 2 parts: >-@REM First we read the "=3D xyz" part of the variable assignation which w= e use, along with >-@REM the original equal sign for our first assignation. Then we trim any = left whitespaces. >-@REM NB: default token delimiters for "for /f" are tab and space. >- >-set CONFIG_FILE=3D%WORKSPACE%\Conf\target.txt >- >-for /f "tokens=3D1*" %%i in ('type %CONFIG_FILE% ^| find "TOOL_CHAIN_TAG"= ^| find /V "#"') do @set TOOL_CHAIN_TAG%%j >-for /f "tokens=3D*" %%i in ("%TOOL_CHAIN_TAG%") do @set TOOL_CHAIN_TAG=3D= %%i >- >-for /f "tokens=3D1*" %%i in ('type %CONFIG_FILE% ^| find "TARGET" ^| find= /V "#" ^| find /V "TARGET_ARCH"') do @set >TARGET%%j >-for /f "tokens=3D*" %%i in ("%TARGET%") do @set TARGET=3D%%i >- >-for /f "tokens=3D1*" %%i in ('type %CONFIG_FILE% ^| find "TARGET_ARCH" ^|= find /V "#"') do @set TARGET_ARCH%%j >-for /f "tokens=3D*" %%i in ("%TARGET_ARCH%") do @set TARGET_ARCH=3D%%i >- >- >-REM Set defaults if above variables are undefined in target.txt >- >-if "%TOOL_CHAIN_TAG%%"=3D=3D"" @set TOOL_CHAIN_TAG=3DMYTOOLS >-if "%TARGET%"=3D=3D"" @set TARGET=3DDEBUG >-if "%TARGET_ARCH%"=3D=3D"" @set TARGET_ARCH=3DIA32 >diff --git a/DuetPkg/PostBuild.bat b/DuetPkg/PostBuild.bat >index 28cab6b..e7f2778 100644 >--- a/DuetPkg/PostBuild.bat >+++ b/DuetPkg/PostBuild.bat >@@ -1,11 +1,9 @@ > @echo off > @REM ## @file > @REM # >-@REM # Currently, Build system does not provide post build mechanism for= module >-@REM # and platform building, so just use a bat file to do post build co= mmands. >-@REM # Originally, following post building command is for EfiLoader modu= le. >+@REM # Post build script that will be automatically run after build. > @REM # >-@REM # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved= .
>+@REM # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved= .
> @REM # > @REM # This program and the accompanying materials > @REM # are licensed and made available under the terms and conditions of= the BSD License >@@ -17,18 +15,38 @@ > @REM # > @REM ## > >-set BASETOOLS_DIR=3D%WORKSPACE_TOOLS_PATH%\Bin\Win32 >+set BASETOOLS_DIR=3D%EDK_TOOLS_BIN% > set BOOTSECTOR_BIN_DIR=3D%WORKSPACE%\DuetPkg\BootSector\bin >-set PROCESSOR=3D"" >-call %WORKSPACE%\DuetPkg\GetVariables.bat > >-if NOT "%1"=3D=3D"" @set TARGET_ARCH=3D%1 >-if "%TARGET_ARCH%"=3D=3D"IA32" set PROCESSOR=3DIA32 >-if "%TARGET_ARCH%"=3D=3D"X64" set PROCESSOR=3DX64 >-if %PROCESSOR%=3D=3D"" goto WrongArch >+:SetDefault >+set TARGET_ARCH=3D >+set TARGET=3D >+set TOOL_CHAIN_TAG=3D > >+:ParseParamsLoop >+if "%1"=3D=3D"" goto EndPParseParamsLoop >+if /I "%1"=3D=3D"-p" goto ParseParamsLoopNext >+if /I "%1"=3D=3D"-a" set TARGET_ARCH=3D%2& goto ParseParamsLoopNext >+if /I "%1"=3D=3D"-b" set TARGET=3D%2& goto ParseParamsLoopNext >+if /I "%1"=3D=3D"-t" set TOOL_CHAIN_TAG=3D%2& goto ParseParamsLoopNext >+if /I "%1"=3D=3D"-h" goto Help >+ >+:ParseParamsLoopNext >+shift >+shift >+goto ParseParamsLoop >+ >+:EndPParseParamsLoop >+if "%TARGET_ARCH%"=3D=3D"" goto Help >+if "%TARGET%"=3D=3D"" goto Help >+if "%TOOL_CHAIN_TAG%"=3D=3D"" goto Help >+ >+set PROCESSOR=3D%TARGET_ARCH% > set BUILD_DIR=3D%WORKSPACE%\Build\DuetPkg%PROCESSOR%\%TARGET%_%TOOL_CHAIN= _TAG% > >+@REM Store environment variables used by CreateBootDisk.bat >+echo set TARGET=3D%TARGET%> %WORKSPACE%\DuetPkg\SetEnv_%PROCESSOR%.bat >+echo set TOOL_CHAIN_TAG=3D%TOOL_CHAIN_TAG%>> %WORKSPACE%\DuetPkg\SetEnv_%= PROCESSOR%.bat > > echo Compressing DUETEFIMainFv.FV ... > %BASETOOLS_DIR%\LzmaCompress -e -o %BUILD_DIR%\FV\DUETEFIMAINFV.z %BUILD_= DIR%\FV\DUETEFIMAINFV.Fv >@@ -60,11 +78,6 @@ copy /b %BOOTSECTOR_BIN_DIR%\St32_64.com+%BOOTSECTOR_BI= N_DIR%\Efi64.com2+%BUILD_ > %BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\Efildr20Pure -o %BUILD_DIR%\FV= \Efildr20 > goto end > >- >-:WrongArch >-echo Error! Wrong architecture. >-goto Help >- > :Help >-echo Usage: "PostBuild [IA32|X64]" >-:end >\ No newline at end of file >+echo Usage: This script will be run automatically after build. >+:end >diff --git a/DuetPkg/PostBuild.sh b/DuetPkg/PostBuild.sh >index 6f307e1..524c9d7 100755 >--- a/DuetPkg/PostBuild.sh >+++ b/DuetPkg/PostBuild.sh >@@ -2,9 +2,7 @@ > > ## @file > # >-# Currently, Build system does not provide post build mechanism for modu= le >-# and platform building, so just use a sh file to do post build commands= . >-# Originally, following post building command is for EfiLoader module. >+# Post build script that will be automatically run after build. > # > # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> # >@@ -26,43 +24,33 @@ fi > > export BOOTSECTOR_BIN_DIR=3D$WORKSPACE/DuetPkg/BootSector/bin > export PROCESSOR=3D"" >-if [ \ >- -z "$1" -o \ >- "$1" =3D "-?" -o \ >- "$1" =3D "-h" -o \ >- "$1" =3D "--help" \ >- ] >-then >- echo Error! Please specific the architecture. >- echo Usage: "./PostBuild.sh [IA32|X64] [UNIXGCC|GCC44]" >+export TOOLTAG=3D"" >+ >+while [ $# -gt 0 ]; do >+ if [ "$1" =3D "-a" ]; then >+ export PROCESSOR=3D$2 >+ elif [ "$1" =3D "-t" ]; then >+ export TOOLTAG=3D$2 >+ elif [ "$1" =3D "-h" ]; then >+ echo Usage: This script will be run automatically after build. >+ return 1 >+ fi >+ shift >+ shift >+done >+ >+if [ "$PROCESSOR" =3D "" -o "$TOOLTAG" =3D "" ]; then >+ echo Usage: This script will be run automatically after build. >+ return 1 > fi > >-case "$1" in >- IA32) >- export PROCESSOR=3DIA32 >- ;; >- X64) >- export PROCESSOR=3DX64 >- ;; >- *) >- echo Invalid Architecture string, should be only IA32 or X64 >- return 1 >-esac >- >-case "$2" in >- UNIXGCC) >- export TOOLTAG=3DUNIXGCC >- ;; >- GCC4*) >- export TOOLTAG=3D$2 >- ;; >- *) >- echo Invalid tool tag, should be only UNIXGCC or GCC4\* >- return 1 >-esac >- > export BUILD_DIR=3D$WORKSPACE/Build/DuetPkg$PROCESSOR/DEBUG_$TOOLTAG > >+# >+# Store environment variables used by CreateBootDisk.sh >+# >+echo export TOOLCHAIN=3D$TOOLTAG> $WORKSPACE/DuetPkg/SetEnv_$PROCESSOR.sh >+chmod +x $WORKSPACE/DuetPkg/SetEnv_$PROCESSOR.sh > > # > # Boot sector module could only be built under IA32 tool chain >diff --git a/DuetPkg/ReadMe.txt b/DuetPkg/ReadMe.txt >index d7ad3d6..f894d94 100644 >--- a/DuetPkg/ReadMe.txt >+++ b/DuetPkg/ReadMe.txt >@@ -4,28 +4,22 @@ A. Build DUET image on Windows Platform > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. Tools preparation > >-To build DUET image, following tools are required: >+ To build DUET image, Visual Studio is required: >+ 1). Base on below link to create Visual Studio build environment. >+ https://github.com/tianocore/tianocore.github.io/wiki/Windows-syste= ms > >- 1). *Visual Studio 2005* >- Assume installed at , >- e.g.: C:\Program Files\Microsoft Visual Studio .NET 2003\. >- 2). WinDDK >- Assume installed at , e.g.: C:\WINDDK\3790.1830\. >- >-2. Build steps >- >-2.1 Build Duet Platform module >+2. Build Duet Platform module > > 1). run cmd.exe to open command line window. > 2). enter workspace root directory such as c:\edk2_tree >- 2). run "edksetup.bat" >- 3). run "build -p DuetPkg\DuetPkg.dsc -a IA32" for IA32 architecture pl= atform or >- "build -p DuetPkg\DuetPkg.dsc -a X64" for X64 architecture plat= form. >+ 3). set the environment variable EDK_TOOLS_BIN to point at the BaseTool= s binaries directory >+ i.e., "set EDK_TOOLS_BIN=3Dc:\edk2-BaseTools-win32" >+ 4). run "edksetup.bat" >+ 5). run "build -p DuetPkg\DuetPkgIa32.dsc -a IA32 -t VS2015x86" for IA3= 2 architecture platform (using 64-bit VS2015 for >example) or >+ "build -p DuetPkg\DuetPkgX64.dsc -a X64 -t VS2015x86" for X64 a= rchitecture platform. >+ >+ NOTE: The post build script 'PostBuild.sh' will be automatically called= after the build command. > >-2.2 Execute post build actions >- 1). enter \DuetPkg directory. >- 2). run "PostBuild.bat IA32" for IA32 architecture platform or >- "PostBuild.bat X64" for X64 architecture platform. > > Create bootable disk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >@@ -56,34 +50,35 @@ B. Build DUET image on Linux Platform > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. Tools preparation > >- To build DUET image, GCC44 is required: >- 1). Base on below link to create GCC44 build environment. >- http://tianocore.sourceforge.net/wiki/Using_EDK_II_with_Native_GCC >+ To build DUET image, GCC installation (4.4+) is required: >+ 1). Base on below link to create GCC build environment. >+ https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-= with-Native-GCC > >-2. Build steps >- >-2.1 Build Duet Platform module >+2. Build Duet Platform module > > 1). Open the terminal. > 2). enter workspace root directory such as /edk2_tree > 3). run ". edksetup.sh BaseTools" >- 4). run "build -p DuetPkg/DuetPkg.dsc -a IA32 -t GCC44" for IA32 archit= ecture platform or >- "build -p DuetPkg/DuetPkg.dsc -a X64 -t GCC44" for X64 architec= ture platform. >- >-2.2 Execute post build actions >- 1). enter /edk2_tree/DuetPkg directory. >- 2). run "./PostBuild.sh IA32 GCC44" for IA32 architecture platform or >- "./PostBuild.sh X64 GCC44" for X64 architecture platform. >+ 4). run "build -p DuetPkg/DuetPkgIa32.dsc -a IA32 -t GCC49" for IA32 ar= chitecture platform (using GCC 4.9 for example) >or >+ "build -p DuetPkg/DuetPkgX64.dsc -a X64 -t GCC49" for X64 archi= tecture platform. > >- NOTE: After post build action, you should check the size of EfiLdr at $W= ORKSPACE/Build/DuetPkg/DEBUG_GCC44 directory, >it must less than 470k. >- If not, you should manually remove some unnecessary drivers at Due= tPkg.fdf file. >+ NOTE: The post build script 'PostBuild.sh' will be automatically called= after the build command. >+ After post build action, you should check the size of EfiLdr at >$WORKSPACE/Build/DuetPkgIA32(DuetPkgX64)/DEBUG_GCC49 directory, it must le= ss than 470k. >+ If not, you should manually remove some unnecessary drivers at Du= etPkg.fdf file. > > 3. Create bootable disk > The following steps are same for IA32 architecture platform or X64 arc= hitecture platform. >- Now only support floopy. > >- 3.1 Create floppy boot disk >- 1). enter /edk2_tree/DuetPkg directory. >- 2). Insert a floppy disk to drive >- 3). run "CreateBootDisk.sh" to build floppy drive >- such as "./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT= 12 IA32" >+3.1 Create floppy boot disk >+ 1). enter /edk2_tree/DuetPkg directory. >+ 2). Insert a floppy disk to drive >+ 3). run "CreateBootDisk.sh" to build floppy drive >+ such as "./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT12 I= A32" >+ >+3.2 Create usb boot disk >+ 1). enter /edk2_tree/DuetPkg directory. >+ 2). Plugin usb disk >+ 3). run "CreateBootDisk.sh" to build usb drive >+ such as "./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32" >+ 4). UnPlug usb disk and plugin it again. >+ 5). run "./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32 step2= " >diff --git a/DuetPkg/build32.sh b/DuetPkg/build32.sh >index c15c996..8aa2c3d 100755 >--- a/DuetPkg/build32.sh >+++ b/DuetPkg/build32.sh >@@ -126,10 +126,8 @@ done > # > echo Running edk2 build for DuetPkg$Processor > build -p $WORKSPACE/DuetPkg/DuetPkg$Processor.dsc -a $PROCESSOR -t $TARGE= T_TOOLS -n 3 $* >-echo Running DuetPkg/PostBuild.sh >-$WORKSPACE/DuetPkg/PostBuild.sh $PROCESSOR $TARGET_TOOLS > echo Running DuetPkg/CreateBootDisk.sh > >-$WORKSPACE/DuetPkg/CreateBootDisk.sh file $FLOPPY_IMAGE /dev/null FAT12 $= PROCESSOR $TARGET_TOOLS >+$WORKSPACE/DuetPkg/CreateBootDisk.sh file $FLOPPY_IMAGE /dev/null FAT12 $= PROCESSOR > exit $? > >diff --git a/DuetPkg/build64.sh b/DuetPkg/build64.sh >index 0401c56..1e07234 100755 >--- a/DuetPkg/build64.sh >+++ b/DuetPkg/build64.sh >@@ -125,10 +125,8 @@ done > # > echo Running edk2 build for DuetPkg$PROCESSOR > build -p $WORKSPACE/DuetPkg/DuetPkg$PROCESSOR.dsc -a $PROCESSOR -t $TARGE= T_TOOLS -n 3 $* >-echo Running DuetPkg/PostBuild.sh >-$WORKSPACE/DuetPkg/PostBuild.sh $PROCESSOR $TARGET_TOOLS > echo Running DuetPkg/CreateBootDisk.sh > >-$WORKSPACE/DuetPkg/CreateBootDisk.sh file $FLOPPY_IMAGE /dev/null FAT12 $= PROCESSOR $TARGET_TOOLS >+$WORKSPACE/DuetPkg/CreateBootDisk.sh file $FLOPPY_IMAGE /dev/null FAT12 $= PROCESSOR > exit $? > >-- >1.9.5.msysgit.0