diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-11-11 16:21:35 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-14 19:33:11 +0800 |
commit | bab82372a9e6ce066fa725a792e71d07191046ca (patch) | |
tree | 8f7f709bb0b64ce8e972f37a901c2b49e0a1d3f5 /DuetPkg/CreateBootDisk.bat | |
parent | ea4511d127f45e5028996aba6613b4807c3c7902 (diff) | |
download | edk2-bab82372a9e6ce066fa725a792e71d07191046ca.tar.gz |
DuetPkg: Add POSTBUILD in DSC files to run post-build automatically
https://bugzilla.tianocore.org/show_bug.cgi?id=220
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 <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'DuetPkg/CreateBootDisk.bat')
-rw-r--r-- | DuetPkg/CreateBootDisk.bat | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/DuetPkg/CreateBootDisk.bat b/DuetPkg/CreateBootDisk.bat index 7265837194..cee04b8cc5 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.<BR>
+@REM # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
@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=%WORKSPACE_TOOLS_PATH%\Bin\Win32
+set BASETOOLS_DIR=%EDK_TOOLS_BIN%
set BOOTSECTOR_BIN_DIR=%WORKSPACE%\DuetPkg\BootSector\bin
set DISK_LABEL=DUET
set PROCESSOR=""
set STEP=1
-call %WORKSPACE%\DuetPkg\GetVariables.bat
-
-echo on
if "%1"=="" goto Help
if "%2"=="" goto Help
@@ -35,6 +32,7 @@ set EFI_BOOT_DISK=%2 if "%TARGET_ARCH%"=="IA32" set PROCESSOR=IA32
if "%TARGET_ARCH%"=="X64" set PROCESSOR=X64
if %PROCESSOR%=="" goto WrongArch
+call %WORKSPACE%\DuetPkg\SetEnv_%PROCESSOR%.bat
set BUILD_DIR=%WORKSPACE%\Build\DuetPkg%PROCESSOR%\%TARGET%_%TOOL_CHAIN_TAG%
if "%1"=="floppy" goto CreateFloppy
|