From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D396181CEB for ; Mon, 31 Oct 2016 19:49:46 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP; 31 Oct 2016 19:49:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,577,1473145200"; d="scan'208";a="26310923" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 31 Oct 2016 19:49:47 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 31 Oct 2016 19:49:47 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 31 Oct 2016 19:49:47 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0248.002; Tue, 1 Nov 2016 10:49:44 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix the bug for OptionRom generation with different arch Thread-Index: AQHSKejBbz+F7v6dvEqPFKiOtjGs4aDDgT0g Date: Tue, 1 Nov 2016 02:49:43 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49C7E6@shsmsx102.ccr.corp.intel.com> References: <1476868250-14036-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1476868250-14036-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjRhN2NjYzMtNmMxYi00YWEzLTg1M2ItOGJlYzU5NjE2MjkxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlRkckZRY0dWOGxDaG53Rms5RE4yMlpHSUJSZjhMQzdLRnJ4K1N5SVJSRFU9In0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug for OptionRom generation with different arch X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2016 02:49:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao -----Original Message----- From: Zhu, Yonghong=20 Sent: Wednesday, October 19, 2016 5:11 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [Patch] BaseTools: Fix the bug for OptionRom generation with diffe= rent arch The GenFds tool uses the same output for the same module with the different arch, IA32 and X64 module will have the same output. The solution is add the arch info in the output directory. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/OptionRom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source= /Python/GenFds/OptionRom.py index 94f77f6..7886a7c 100644 --- a/BaseTools/Source/Python/GenFds/OptionRom.py +++ b/BaseTools/Source/Python/GenFds/OptionRom.py @@ -1,9 +1,9 @@ ## @file # process OptionROM generation # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License # which accompanies this distribution. The full text of the license may = be found at # http://opensource.org/licenses/bsd-license.php @@ -65,11 +65,11 @@ class OPTIONROM (OptionRomClassObject): EdkLogger.error("GenFds", GENFDS_ERROR, "Module %s not= produce .efi files, so NO file could be put into option ROM." % (FfsFile.I= nfFileName)) if FfsFile.OverrideAttribs =3D=3D None: EfiFileList.extend(FilePathNameList) else: FileName =3D os.path.basename(FilePathNameList[0]) - TmpOutputDir =3D os.path.join(GenFdsGlobalVariable.FvD= ir, self.DriverName) + TmpOutputDir =3D os.path.join(GenFdsGlobalVariable.FvD= ir, self.DriverName, FfsFile.CurrentArch) if not os.path.exists(TmpOutputDir) : os.makedirs(TmpOutputDir) TmpOutputFile =3D os.path.join(TmpOutputDir, FileName+= '.tmp') =20 GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,= =20 @@ -83,11 +83,11 @@ class OPTIONROM (OptionRomClassObject): BinFileList.append(TmpOutputFile) else: FilePathName =3D FfsFile.GenFfs() if FfsFile.OverrideAttribs !=3D None: FileName =3D os.path.basename(FilePathName) - TmpOutputDir =3D os.path.join(GenFdsGlobalVariable.FvD= ir, self.DriverName) + TmpOutputDir =3D os.path.join(GenFdsGlobalVariable.FvD= ir, self.DriverName, FfsFile.CurrentArch) if not os.path.exists(TmpOutputDir) : os.makedirs(TmpOutputDir) TmpOutputFile =3D os.path.join(TmpOutputDir, FileName+= '.tmp') =20 GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,= =20 --=20 2.6.1.windows.1