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>
This commit is contained in:
Hao Wu
2016-11-11 16:21:35 +08:00
parent ea4511d127
commit bab82372a9
10 changed files with 105 additions and 150 deletions

View File

@@ -125,10 +125,8 @@ done
#
echo Running edk2 build for DuetPkg$PROCESSOR
build -p $WORKSPACE/DuetPkg/DuetPkg$PROCESSOR.dsc -a $PROCESSOR -t $TARGET_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 $?