Thanks Larry
Good to see it's on the roadmap .
Regards
Yehuda
> -Original Message-
> From: Hauch, Larry [mailto:larry.ha...@intel.com]
> Sent: Tuesday, December 29, 2015 22:30
> To: Yehuda Yitschak; edk2-devel@lists.01.org
> Subject: RE: EDK2 post build mechanism
>
> Hi Yehuda,
>
> The current version of the EDK II BaseTools does not support this. For the
> time being, wrapping the build command in a batch script is the only method
> for calling external tools after a build completes.
>
> We would like to introduce two new entries to the [Defines] section of the
> DSC file.
>
> Here are the proposed changes to the DSC Specification:
> If the PREBUILD and/or POSTBUILD entries are specified, it is the developer's
> responsibility to ensure that value is a tool that can be executed. If the
> value
> contains space characters, the value must be a quoted string. The build.exe
> tool will suspend processing of the DSC files if the PREBUILD entry is
> present,
> call the script and either terminate or continue processing the DSC file
> depending on the exit code from the script. If the POSTBUILD entry is
> present, prior to the successful build.exe exit, the script will be called.
> If the
> script fails (non-zero exit code from the script) build.exe will terminate
> immediately using the exit code returned from the script, otherwise,
> build.exe will terminate normally. The author of the script is responsible for
> ensuring that the script terminates with a non-zero exit code when it fails.
>
> New EBNF entries in 3.5
> [ "PREBUILD" {} {} ] [
> "POSTBUILD" {} {} ]
>
> Here's the proposed wording (new sections) for the Build Spec:
> 8.2.4.1 Pre-build DSC
> The DSC file is always parsed following the tool meta-data files. If the DSC
> file's [Defines] section contains the PREBUILD = entry, processing of the DSC
> file is suspended and the build tools must execute the script that is
> specified
> as the value in the PREBUILD entry. The author of the script is responsible
> for
> ensuring that the script terminates with a non-zero exit code when it fails.
> If the script was not found, the build.exe will exit with an appropriate error
> message.
> If the script terminates with a non-zero exit value, the build should
> terminate
> with the exit value from the prebuild script. The script is required to
> provide
> any error messages that would cause termination.
> NOTE: This entry may be wrapped in a conditional directive that uses the
> value of the TOOL_CHAIN_TAG determined earlier. Using a MACRO value
> other than $(TOOL_CHAIN_TAG) is prohibited, as the DSC file has not been
> processed at the time the ENTRY was found.
> If the script terminates successfully (exit value of 0), parsing of the DSC
> file
> continues.
>
> 10.6 Post Build Processing
> If the DSC file's [Defines] section contains a POSTBUILD entry, prior to
> exiting,
> build.exe will call the script specified in the entries value field. The
> author of
> the script is responsible for ensuring that the script terminates with a non-
> zero exit code when it fails.
> If the script was not found, build.exe will exit with an appropriate error
> message.
> If the script terminates with a non-zero exit code, build.exe will terminate
> immediately using the exit code returned by the script. The script is required
> to provide any error messages.
> If the script exits with an exit code of zero, build.exe will terminate
> normally.
> NOTE: This entry may be wrapped in a conditional directive. Unlike the
> PREBUILD entry, there are no restrictions on the MACRO value used in the
> conditional directive.
>
> Cheers,
> Larry
>
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Yehuda Yitschak
> Sent: Tuesday, December 29, 2015 11:32 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] EDK2 post build mechanism
>
> Hello everyone
>
>
> I am searching for a builtin mechanism to run a post build script in EDK2
>
>
> i need to wrap my FD file with a specific header that is required by the boot
> firmware of my device
>
>
> ?Is there any generic way to run a post build script in EDK2 or must i resort
> to
> writing my own wrapper build script ?
>
>
> Thanks a lot
>
>
> Yehuda
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel