From nobody Tue Apr 30 04:19:35 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1504083643958889.1743798648433; Wed, 30 Aug 2017 02:00:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0859A21E95E14; Wed, 30 Aug 2017 01:58:01 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 1FF9A21E95DFF for ; Wed, 30 Aug 2017 01:58:00 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 02:00:41 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga001.jf.intel.com with ESMTP; 30 Aug 2017 02:00:40 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="1167526850" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 30 Aug 2017 17:00:36 +0800 Message-Id: <1504083637-1276-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] Build Spec: Add multi-arg support to PREBUILD/POSTBUILD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Kevin W Shaw , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D669 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- .../106_post_build_processing.md | 22 +++++++++++-------= ---- .../82_auto-generation_process.md | 14 +++++++------- README.md | 1 + 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/10_post-build_imagegen_stage_-_flash/106_post_build_processing= .md b/10_post-build_imagegen_stage_-_flash/106_post_build_processing.md index 6b48a4f..7046ca3 100644 --- a/10_post-build_imagegen_stage_-_flash/106_post_build_processing.md +++ b/10_post-build_imagegen_stage_-_flash/106_post_build_processing.md @@ -32,22 +32,21 @@ =20 ## 10.6 Post Build Processing =20 If the `[Defines]` section of the DSC file contains a `POSTBUILD =3D entry` statement, prior to exiting, the script specified in the `POSTBUILD` state= ment -is executed. If the script file is not found, the **build** command exits = with -an appropriate error message. If the script fails, it must terminate with a -non-zero exit code and the **build** command terminates with the exit value -from the post-build script. The script is required to generate error messa= ges -that provide the reason for the termination. +is executed. The entry of `POSTBUILD` support multiple arguments. And Tool +will convert arguments that are `WORKSPACE` or `PACKAGES_PATH` relative pa= ths +to absolute paths. If the script file is not found, the **build** command +exits with an appropriate error message. If the script fails, it must term= inate +with a non-zero exit code and the **build** command terminates with the ex= it +value from the post-build script. The script is required to generate error +messages that provide the reason for the termination. =20 All of the command line options passed into the **build** command are also -passed into the script along with the command line options for `TARGET`, -`ARCH`, and `TOOL_CHAIN_TAG`. The values for `TARGET`, `ARCH`, and -`TOOL_CHAIN_TAG` are from the command line options passed into the **build= ** -command. If these values are not passed into the **build** command, then t= hey -are retrieved from `target.txt`. +passed into the script along with the options for `TARGET`, `ARCH`, +`TOOL_CHAIN_TAG`, `ACTIVE_PLATFORM`, `Conf Directory`, and `build target`. =20 If the script terminates successfully (exit value of 0), then the **build** command terminates normally. =20 ********** @@ -55,7 +54,8 @@ command terminates normally. `PREBUILD` entry, there are no restrictions on the MACRO values used in a conditional directive. ********** **Note:** Quotes are needed when the script's additional options are prese= nt. Quotes are also required if the path to the post-build command contains sp= ace -or special characters. +or special characters. Quotes may be used for arguments that have spaces or +special characters. ********** diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md b/8_pr= e-build_autogen_stage/82_auto-generation_process.md index 7bca366..671a7d5 100644 --- a/8_pre-build_autogen_stage/82_auto-generation_process.md +++ b/8_pre-build_autogen_stage/82_auto-generation_process.md @@ -983,22 +983,21 @@ DynamicEx PCD HII Variable checking. #### 8.2.4.13 Pre Build Processing =20 The DSC file is parsed after the tool meta-data files. If the `[Defines]` section of the DSC file contains a `PREBUILD =3D entry` statement, process= ing of the DSC file is suspended and the script specified in the `PREBUILD` -statement is executed. If the script file is not found, the **build** comm= and +statement is executed. The entry of `PREBUILD` support multiple arguments.= And +Tool will convert arguments that are `WORKSPACE` or `PACKAGES_PATH` relati= ve +paths to absolute paths. If the script file is not found, the **build** co= mmand exits with an appropriate error message. If the script fails, it must term= inate with a non-zero exit code and the **build** command terminates with the ex= it value from the pre-build script. The script is required to generate error messages that provide the reason for the termination. =20 All of the command line options passed into the **build** command are also -passed into the script along with the command line options for `TARGET`, -`ARCH`, and `TOOL_CHAIN_TAG`. The values for `TARGET`, `ARCH`, and -`TOOL_CHAIN_TAG` are from the command line options passed into the **build= ** -command. If these values are not passed into the **build** command, then t= hey -are retrieved from `target.txt`. +passed into the script along with the options for `TARGET`, `ARCH`, +`TOOL_CHAIN_TAG`, `ACTIVE_PLATFORM`, `Conf Directory`, and `build target`. =20 If the script terminates successfully (exit value of 0), parsing of the DSC file continues, and build tools may retrieve environment variables that ha= ve been updated by the script. =20 @@ -1008,11 +1007,12 @@ value of the `TOOL_CHAIN_TAG` determined earlier. U= sing a MACRO value other than `$(TOOL_CHAIN_TAG)` is prohibited, as the DSC file has not been proce= ssed at the time the ENTRY was found. ********** **Note:** Quotes are needed when the script's additional options are prese= nt. Quotes are also required if the path to the pre-build command contains spa= ce -or special characters. +or special characters. Quotes may be used for arguments that have spaces or +special characters. ********** =20 #### 8.2.4.14 NMAKE Command line limitation handling =20 `NMAKE` is limited to command-line length of 4096 characters. Due to the = large diff --git a/README.md b/README.md index 1ef0c00..52abb6a 100644 --- a/README.md +++ b/README.md @@ -214,5 +214,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights = reserved. | | [#480](https://bugzilla.tianocore.org/show_bug.cgi?id=3D480= ) Build spec: add description for Override PCD value on the command line = = = |= | | | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=3D523= ) Build spec: add EBNF for the --pcd syntax in the Section D.4 = = = |= | | | [#517](https://bugzilla.tianocore.org/show_bug.cgi?id=3D517= ) Build spec: chapter 5.2.2 Guided Tools add description for Pkcs7Sign tool= and BrotliCompress tool = = |= | | | [#481](https://bugzilla.tianocore.org/show_bug.cgi?id=3D481= ) Build Spec: add clarification for not used Pcd that build tool will not d= o additional checks on its value = = |= | | | [#518](https://bugzilla.tianocore.org/show_bug.cgi?id=3D518= ) Build Spec: Update Precedence of PCD Values = = = |= | +| | [#669](https://bugzilla.tianocore.org/show_bug.cgi?id=3D669= ) Build Spec: Add multi-arg support to PREBUILD/POSTBUILD = = = |= | --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel