From nobody Sat Nov 2 10:23:14 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.zoho.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 1491619494884285.5283420124929; Fri, 7 Apr 2017 19:44:54 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B56F52194235A; Fri, 7 Apr 2017 19:44:50 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 79E3D21A04817 for ; Fri, 7 Apr 2017 19:44:48 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 19:44:48 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.255.230.147]) by orsmga002.jf.intel.com with ESMTP; 07 Apr 2017 19:44:48 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491619488; x=1523155488; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=td0kGAROdNgWBuVRRHJlFJF9sXJzEQJpxqFAUcUPSOA=; b=x4mfmq4m3JbrIEwpSM1FmxJXbhRQoPz4Vt0YbhChxsGHo16C7FVEY/Fh Ggu+Zce3KQcF3Aj1gnXfHhqn1JNr6Q==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,169,1488873600"; d="scan'208";a="71307652" From: Michael Kinney To: edk2-devel@lists.01.org Date: Fri, 7 Apr 2017 19:44:43 -0700 Message-Id: <1491619484-18836-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1491619484-18836-1-git-send-email-michael.d.kinney@intel.com> References: <1491619484-18836-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-FdfSpecification PATCH 1/2] Use macros in !include file paths 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: 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" https://bugzilla.tianocore.org/show_bug.cgi?id=3D350 The EBNF already allows !include statements to use $(MACRO) values in the file path. This change updates the description and examples for !include statements to allow the use of macros and specific environment variables in !include file paths. Cc: Liming Gao Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu =20 --- .../22_flash_description_file_format.md | 21 +++++++++-------- 3_edk_ii_fdf_file_format/32_fdf_definition.md | 26 +++++++++++++-----= ---- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/2_fdf_design_discussion/22_flash_description_file_format.md b/= 2_fdf_design_discussion/22_flash_description_file_format.md index 9c993f4..67c777e 100644 --- a/2_fdf_design_discussion/22_flash_description_file_format.md +++ b/2_fdf_design_discussion/22_flash_description_file_format.md @@ -216,19 +216,18 @@ contain complete sections, or combination of both. The argument of this statement is a filename. The file is relative to the directory that contains this DSC file, and if not found the tool must atte= mpt to find the file relative to paths listed in the system environment variab= les, -`$(WORKSPACE)`, `$(PACKAGES_PATH)`, `$(EFI_SOURCE)`, `$(EDK_SOURCE)`, -`$(ECP_SOURCE)` in the file name is permitted. If the file is not found af= ter -testing for the possible combinations, the parsing tools must terminate wi= th -an error. +`$(WORKSPACE)`, `$(PACKAGES_PATH)`, `$(EFI_SOURCE)`, `$(EDK_SOURCE)`, and +`$(ECP_SOURCE)`. If the file is not found after testing for the possible +combinations, the parsing tools must terminate with an error. =20 -Files specified by `!include` statements may not contain `!include` statem= ents. - -Macros, defined in this FDF file or in the DSC file, are not permitted in = the +Macros, defined in this FDF file or in the DSC file, are permitted in the path or file name of the !include statement, as these files are included p= rior -to processing the file for macros. If the path starts with a "$" character, -then one of the system environment variables, `$(WORKSPACE)`, `$(EDK_SOURC= E)`, -`$(EFI_SOURCE)`, or `$(ECP_SOURCE)` is being used; only these system -environment variables are permitted to start the path of the included file. +to processing the file for macros. The system environment variables, +`$(WORKSPACE)`, `$(EDK_SOURCE)`, `$(EFI_SOURCE)`, and `$(ECP_SOURCE)` may = also +be used; only these system environment variables are permitted to start the +path of the included file. + +Files specified by `!include` statements may not contain `!include` statem= ents. =20 Statements in !include files must not break the integrity of the FDF file,= the included file is read in by tools in the exact position of the file, and is diff --git a/3_edk_ii_fdf_file_format/32_fdf_definition.md b/3_edk_ii_fdf_f= ile_format/32_fdf_definition.md index 62e54af..e4e9869 100644 --- a/3_edk_ii_fdf_file_format/32_fdf_definition.md +++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md @@ -636,16 +636,20 @@ completely new sections of the same section type. If = the included file contains new sections, then the section being processed in the Platform FDF file is considered to have been terminated. =20 -If the filename is a filename, the tools will look for the file in the same -directory as the FDF file. If the file is not found, and the directory -containing this FDF file is not the same directory as the directory contai= ning -the DSC, the tools must attempt to locate the file in the directory tree t= hat -contains the DSC file. If the filename starts with a "$", then the system -environment variable will be used to locate the file. If none of these met= hods -find the file, and a directory separator is in the filename, the tools will -attempt to find the file in a WORKSPACE (or directory listed in the -PACKAGES_PATH) relative path. If the file cannot be found, the build system -must exit with an appropriate error message. +If the `` contains "$" characters, then macros defined in the DSC +file, FDF file, and the system environment variables, `$(WORKSPACE)`, +`$(EDK_SOURCE)`, `$(EFI_SOURCE)`, and `$(ECP_SOURCE)` are substituted into +``. + +The tools look for `` relative to the directory the FDF file res= ides. +If the file is not found, and the directory containing this FDF file is no= t the +same directory as the directory containing the DSC file, the tools must at= tempt +to locate the file relaitive to the directory that contains the DSC file. + +If none of these methods find the file, and a directory separator is in +``, the tools attempt to find the file in a WORKSPACE (or a dire= ctory +listed in the PACKAGES_PATH) relative path. If the file cannot be found, t= he +build system must exit with an appropriate error message. =20 The `!include` file cannot contain additional `!include` statements. =20 @@ -658,4 +662,6 @@ The `!include` file cannot contain additional `!include= ` statements. ``` !include myPlatform/NvRamDefs.txt !include myFeatures.mak +!include $(WORKSPACE)/PackageDir/Features.dsc +!include $(MACRO1)/AnotherDir/$(MACRO2)/Features.dsc ``` --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:23:14 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.zoho.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 1491619497379343.2904384469231; Fri, 7 Apr 2017 19:44:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F044920D77DA8; Fri, 7 Apr 2017 19:44:50 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 9529021A04830 for ; Fri, 7 Apr 2017 19:44:48 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 19:44:48 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.255.230.147]) by orsmga002.jf.intel.com with ESMTP; 07 Apr 2017 19:44:48 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491619488; x=1523155488; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=l0qCDB4VgCFR0baj3UpOq1hf8F3apWfvPpTCN2WlRwQ=; b=AGF4p0E5HMIanNCl8p1T5fQkSPG7NML2wbh68SjRCKCjsMQa6oHTOtI2 ObOj5gjZtyeD2/XkHuSY2zUKnu3s2Q==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,169,1488873600"; d="scan'208";a="71307656" From: Michael Kinney To: edk2-devel@lists.01.org Date: Fri, 7 Apr 2017 19:44:44 -0700 Message-Id: <1491619484-18836-3-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1491619484-18836-1-git-send-email-michael.d.kinney@intel.com> References: <1491619484-18836-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-FdfSpecification PATCH 2/2] Remove illegal white space in FDF file examples 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: 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" Remove space between '$' and '(' for macro usage Remove space before/after directory separator '/' Cc: Liming Gao Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu =20 --- 2_fdf_design_discussion/25_[fv]_sections.md | 12 ++++++------ appendix_a_nt32pkg_flash_description_file.md | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/2_fdf_design_discussion/25_[fv]_sections.md b/2_fdf_design_dis= cussion/25_[fv]_sections.md index d35f268..928455c 100644 --- a/2_fdf_design_discussion/25_[fv]_sections.md +++ b/2_fdf_design_discussion/25_[fv]_sections.md @@ -278,7 +278,7 @@ FFS file specification syntax is one of the following: OR =20 ```c -FILE Type $ (NAMED_GUID) [Options] { +FILE Type $(NAMED_GUID) [Options] { SECTION SECTION_TYPE =3D FileName SECTION SECTION_TYPE =3D FileName } @@ -371,7 +371,7 @@ The following is an example for using additional sectio= ns: #Encapsulation - Compress FILE FOO =3D 12345678-0000-AAAA-FFFF-0123ABCD12BD { SECTION COMPRESS { - SECTION PE32 =3D $ (WORKSPACE) / EdkModulePkg / Core / Dxe / DxeMain.i= nf + SECTION PE32 =3D $(WORKSPACE)/EdkModulePkg/Core/Dxe/DxeMain.inf SECTION VERSION =3D "1.2.3" } } @@ -379,13 +379,13 @@ FILE FOO =3D 12345678-0000-AAAA-FFFF-0123ABCD12BD { # Encapsulation - GUIDED FILE FV_IMAGE =3D 87654321-FFFF-BBBB-2222-9874561230AB { SECTION GUIDED gEfiTianoCompressionScheme { - SECTION PE32 =3D $ (WORKSPACE) / EdkModulePkg / Core / Dxe / DxeMain.i= nf + SECTION PE32 =3D $(WORKSPACE)/EdkModulePkg/Core/Dxe/DxeMain.inf } } =20 # LEAF Section FILE DXE_CORE =3D B5596C75-37A2-4b69-B40B-72ABD6DD8708 { - SECTION VERSION $ (BUILD_DIR)/$(ARCH)/D6A2CB7F-6A18-4E2F-B43B-9920A73370= 0A-DxeMain.ver + SECTION VERSION $(BUILD_DIR)/$(ARCH)/D6A2CB7F-6A18-4E2F-B43B-9920A733700= A-DxeMain.ver } ``` =20 @@ -418,12 +418,12 @@ specify a string, that will be used to create an EFI = section. The `GUIDED` encapsulation section uses one of the following formats. =20 ```c -SECTION GUIDED $ (GUID_CNAME) [auth] { +SECTION GUIDED $(GUID_CNAME) [auth] { SECTION EFI_SECTION_TYPE =3D FILENAME SECTION EFI_SECTION_TYPE =3D "string" } =20 -SECTION GUIDED $ (GUID_CNAME) [auth] FILENAME +SECTION GUIDED $(GUID_CNAME) [auth] FILENAME ``` =20 The required argument is the `GUIDED` name followed by an optional "auth" diff --git a/appendix_a_nt32pkg_flash_description_file.md b/appendix_a_nt32= pkg_flash_description_file.md index 8d7a0ce..89be76c 100644 --- a/appendix_a_nt32pkg_flash_description_file.md +++ b/appendix_a_nt32pkg_flash_description_file.md @@ -369,7 +369,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.PEIM] - FILE PEIM =3D $ (NAMED_GUID){ + FILE PEIM =3D $(NAMED_GUID){ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NA= ME).depex PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING =3D "$(MODULE_NAME)" Optional @@ -377,7 +377,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.DXE_CORE] - FILE DXE_CORE =3D $ (NAMED_GUID) { + FILE DXE_CORE =3D $(NAMED_GUID) { COMPRESS PI_STD { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING =3D "$(MODULE_NAME)" Optional @@ -386,7 +386,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.UEFI_DRIVER] - FILE DRIVER =3D $ (NAMED_GUID) { + FILE DRIVER =3D $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex COMPRESS PI_STD { GUIDED { @@ -398,7 +398,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.UEFI_DRIVER.TIANOCOMPRESSED] - FILE DRIVER =3D $ (NAMED_GUID) { + FILE DRIVER =3D $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED =3D TR= UE { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi @@ -408,7 +408,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.DXE_DRIVER] - FILE DRIVER =3D $ (NAMED_GUID) { + FILE DRIVER =3D $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).dep= ex COMPRESS PI_STD { GUIDED { @@ -420,7 +420,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.DXE_RUNTIME_DRIVER] - FILE DRIVER =3D $ (NAMED_GUID) { + FILE DRIVER =3D $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).dep= ex COMPRESS PI_STD { GUIDED { @@ -432,7 +432,7 @@ FILE FREEFORM =3D PCD(gEfiIntelFrameworkModulePkgTokenS= paceGuid.PcdLogoFile) { } =20 [Rule.Common.UEFI_APPLICATION] - FILE APPLICATION =3D $ (NAMED_GUID) { + FILE APPLICATION =3D $(NAMED_GUID) { COMPRESS PI_STD { GUIDED { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel