From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.6.59; helo=eur04-db3-obe.outbound.protection.outlook.com; envelope-from=pankaj.bansal@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60059.outbound.protection.outlook.com [40.107.6.59]) (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 9192021164F02 for ; Mon, 15 Oct 2018 19:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Lvq6ZPF+/nAm5JO7V2LJ7bpg+XWwt/WWUcJIzp/pAhg=; b=JdfzJ1ztbrTaXKw7VQ7QHtHYK1UKAyDA2IUr1rcygqG3Aoy9vxyxVgCm0p9hKHuXzBlbY6T5GEHtTtLQ+rI8lshpCojc0Yr1F99+opNJ8djJ0PtrnALM+coQOqiMYpFt+zaxtQXMWNlX6D56vV6mynShJzHnn3XHdqBtpB5PmjI= Received: from HE1PR0402MB3323.eurprd04.prod.outlook.com (10.167.125.20) by HE1PR0402MB2747.eurprd04.prod.outlook.com (10.175.35.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.21; Tue, 16 Oct 2018 02:40:19 +0000 Received: from HE1PR0402MB3323.eurprd04.prod.outlook.com ([fe80::7d5f:a551:3509:2414]) by HE1PR0402MB3323.eurprd04.prod.outlook.com ([fe80::7d5f:a551:3509:2414%3]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 02:40:18 +0000 From: Pankaj Bansal To: "Gao, Liming" , "Zhu, Yonghong" , Ard Biesheuvel , Leif Lindholm , Michael D Kinney CC: "edk2-devel@lists.01.org" , Udit Kumar , Varun Sethi Thread-Topic: PACKAGES_PATH in !include path in Dsc files Thread-Index: AdRi0VkZgDJjRBnmQAu3SgG7JULGpgCHv2VgAAHv7KA= Date: Tue, 16 Oct 2018 02:40:18 +0000 Message-ID: References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E33A7E6@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E33A7E6@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-originating-ip: [49.36.134.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0402MB2747; 6:AnKs4GgnBXV0vLYK+Ls2XAwJqa7ygj8gZZRm1VAu8+GeS3p0nam6tUSiEcwNINHoL3zgSl+YZQ2hdhIRcVjcyIZGZXIUlTJl37waFzS/90kA6eJ8xrD08jy+Ht+qraz6xwStJOnjr6Ged0U/iMvOLoM3BRSOm7aJNWY9FxoPpvEwyFV0tkjoDKQDz/qemtTyi1EMpOH2iC9VkhPo4iUh2h/SVqi2olW9uKyImmepfvxYm8golrMEBs+Aq5cnMP963GscAbVLCDINKzPtbdjNsFpKlclikYJ2JClCIi3RlTRNo4d52HT7gVQdbNtlWt+QtRJ0kyEYMl8pIQetWLpr4nZuwCwt0TMtzBwFHPQhimsTZzvymjsK/f0Jx3RWruBXpO5xZAXHjJ0oONTDyH6he5lzDCvOdYeeZebcHmeA8PWPBriKcX8p3oTB7jthmCxeUTHT5pvP1JUrI2ZDe6iUmA==; 5:+hd1XBEi5RR9I8UU9nD6R0oi94ry6gQyjT9s1LStCbScFYz4tTJA0xpYdgZnQaIMYQmlr0o821iTKUl4yTu+N5rBZk+jn553e1TdrY3sRSGHpEFR2pYRh2UwlhaO3WYrOW7G7KSYdBTIePLTuT9y7nrWTGI6a+GkWEMGy0WznSE=; 7:b4CY7y/ina5DGdLiWYt3Rp62jlFIUroa+IjO25eH1HbAia1WQbmuR5kwO7yRgiX2K6jzyO7bJRgdEEqjh3jZBWf5QsIAKLi9CGlLN3nzwz/lBD4Lk8g7/rRmun1qNdZ+732okXMpromnKB9bBoQdt2e/5LK9SJm5wqwbQmAEadP8oRGv0y0x8iV0YU25chSrPLU4K4MdTatc4uQeYFJTPUgLBttPPgL0HqH+ia/kwCidri0pb/hQHan045zRyiR6 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d490a0b9-ce66-43b9-63b0-08d63310b633 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0402MB2747; x-ms-traffictypediagnostic: HE1PR0402MB2747: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(228905959029699)(185117386973197)(162533806227266)(788757137089)(21748063052155)(28532068793085)(190501279198761)(227612066756510); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:HE1PR0402MB2747; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0402MB2747; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(136003)(39860400002)(376002)(53754006)(189003)(199004)(81166006)(53936002)(7736002)(81156014)(5250100002)(5024004)(14444005)(256004)(8676002)(6506007)(55016002)(9686003)(74316002)(68736007)(8936002)(76176011)(236005)(19627235002)(7696005)(4326008)(54896002)(6306002)(478600001)(25786009)(110136005)(2906002)(316002)(54906003)(790700001)(6116002)(3846002)(2900100001)(6246003)(33656002)(606006)(53546011)(105586002)(26005)(575784001)(102836004)(86362001)(106356001)(99286004)(6436002)(476003)(66066001)(5660300001)(186003)(14454004)(97736004)(486006)(446003)(11346002)(44832011)(71200400001)(229853002)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0402MB2747; H:HE1PR0402MB3323.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Nu1BCaTTggqrIRhzf1op+cumBLhTzcQo9aHhoyOoWpNeO/Es5fLBUtNUbHy4uSVviyJK8Cb+8PmekUiOhvnRc+uVbP2Z99i62lrVJTotS7ewzVzVyfJYdxisUBXXuMtvfZ21BooO1sFij770D4z1/TYT8KXltuxJt6AgWRcPYRmeHbK/+zS4PYf2WZjjBQxYaaPfHinUTSGTIPV8Zge1mZQqja8haBSmUQBjkoD+jNvfNMACVELHWfs/efUjAdT2Lx5ollY0BG+yrV8FURL2vv7TDEHIZC/EnR0SdfYTJlUjNdO2ZfZHfpl+bj7CgRlJHacMz9McUyq3rT98QAhfWhiiFnXrxVEGjGZmcqKfDmA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d490a0b9-ce66-43b9-63b0-08d63310b633 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 02:40:18.6943 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB2747 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: PACKAGES_PATH in !include path in Dsc files X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2018 02:40:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable +edk2-platforms maintainers in To list Thank you Liming for replying. Our entire code is in edk2-platforms (https://github.com/tianocore/edk2-pla= tforms) which is denoted by PACKAGES_PATH. The PACKAGES_PATH directory can be anywhere in WORKSPACE depending on the s= ync directory defined by user. i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/ As our dsc files are relative to PACKAGES_PATH, I want to specify their pat= h in dsc file like this: !include $(PACKAGES_PATH)/Silicon/NXP/.dsc Using $(WORKSPACE), I cannot specify above path, as it can be at place othe= r than $(WORKSPACE)/edk2-platforms Regards, Pankaj Bansal From: Gao, Liming [mailto:liming.gao@intel.com] Sent: Tuesday, October 16, 2018 7:06 AM To: Pankaj Bansal ; Zhu, Yonghong Cc: edk2-devel@lists.01.org; Udit Kumar ; Varun Sethi <= V.Sethi@nxp.com> Subject: RE: PACKAGES_PATH in !include path in Dsc files What's your usage model in DSC? BaseTools will try to replace $(WORKSPACE) with WORKSPACE and PACKAGES_PATH= , and find the first existing file. So, if you want to refer to one file in= PACKAGES_PATH directory, you can also use $(WORKSPACE) macro to refer to i= t. Thanks Liming From: Pankaj Bansal [mailto:pankaj.bansal@nxp.com] Sent: Saturday, October 13, 2018 5:01 PM To: Zhu, Yonghong >; = Gao, Liming > Cc: edk2-devel@lists.01.org; Udit Kumar >; Varun Sethi > Subject: PACKAGES_PATH in !include path in Dsc files Hello All, I am trying to add this functionality that we can specify PACKAGES_PATH in = !include path in Dsc files just like we can specify WORKSPACE. I did below changes for it: --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1530,6 +1530,7 @@ class DscParser(MetaFileParser): # Allow using system environment variables in path after !inc= lude # __IncludeMacros['WORKSPACE'] =3D GlobalData.gGlobalDefines['WO= RKSPACE'] + __IncludeMacros['PACKAGES_PATH'] =3D GlobalData.gGlobalDefines= ['PACKAGES_PATH']^M if "ECP_SOURCE" in GlobalData.gGlobalDefines: __IncludeMacros['ECP_SOURCE'] =3D GlobalData.gGlobalDefine= s['ECP_SOURCE'] # diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index d74082fc26..61dce3a856 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -197,6 +197,7 @@ def CheckEnvVariable(): GlobalData.gEcpSource =3D EcpSourceDir GlobalData.gGlobalDefines["WORKSPACE"] =3D WorkspaceDir + GlobalData.gGlobalDefines["PACKAGES_PATH"] =3D PackagesPath^M GlobalData.gGlobalDefines["EFI_SOURCE"] =3D EfiSourceDir GlobalData.gGlobalDefines["EDK_SOURCE"] =3D EdkSourceDir GlobalData.gGlobalDefines["ECP_SOURCE"] =3D EcpSourceDir With these changes the compilation starts OK, but I get this error later on= : GenFds.py... : error C0DE: Tools code failure Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace! Traceback (most recent call last): File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/GenFds/GenFds.p= y", line 246, in main TargetArchList =3D set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.= ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArch= List) & set(ArchList) File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/Works= paceDatabase.py", line 132, in __getitem__ Toolchain File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBu= ildData.py", line 221, in __init__ self._HandleOverridePath() File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBu= ildData.py", line 282, in _HandleOverridePath RecordList =3D self._RawData[MODEL_META_DATA_COMPONENT, self._Arch] File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaF= ileParser.py", line 257, in __getitem__ self._PostProcess() File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaF= ileParser.py", line 1358, in _PostProcess Processer[self._ItemType]() File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaF= ileParser.py", line 1533, in __ProcessDirective __IncludeMacros['PACKAGES_PATH'] =3D GlobalData.gGlobalDefines['PACKAGE= S_PATH'] KeyError: 'PACKAGES_PATH' build.py... : error 7000: Failed to execute command GenFds -f /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/L= S1043aRdbPkg/LS1043aRdbPkg.fdf --conf=3D/home/nxa34148/Desktop/uefi/Conf -o= /home/nxa34148/Desktop/uefi/Build/LS1043aRdbPkg/RELEASE_GCC49 -t GCC49 -b = RELEASE -p /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aR= dbPkg/LS1043aRdbPkg.dsc -a AARCH64 -D "EFI_SOURCE=3D/home/nxa34148/Desktop/= uefi/EdkCompatibilityPkg" -D "EDK_SOURCE=3D/home/nxa34148/Desktop/uefi/EdkC= ompatibilityPkg" -D "TOOL_CHAIN_TAG=3DGCC49" -D "TOOLCHAIN=3DGCC49" -D "FAM= ILY=3DGCC" -D "PACKAGES_PATH=3D/home/nxa34148/Desktop/uefi/edk2-platforms" = -D "EDK_TOOLS_PATH=3D/home/nxa34148/Desktop/uefi/BaseTools" -D "WORKSPACE= =3D/home/nxa34148/Desktop/uefi" -D "ARCH=3DAARCH64" -D "ECP_SOURCE=3D/home/= nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TARGET=3DRELEASE" [/home/nxa= 34148/Desktop/uefi] - Failed - I am not able to understand the cause of this error. Can you please help? Regards, Pankaj Bansal