From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C3EC91A1E4F for ; Wed, 19 Oct 2016 02:11:23 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP; 19 Oct 2016 02:11:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,513,1473145200"; d="scan'208";a="21216052" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.144]) by fmsmga005.fm.intel.com with ESMTP; 19 Oct 2016 02:11:07 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Wed, 19 Oct 2016 17:10:50 +0800 Message-Id: <1476868250-14036-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [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: Wed, 19 Oct 2016 09:11:24 -0000 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 BSD 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.InfFileName)) if FfsFile.OverrideAttribs == None: EfiFileList.extend(FilePathNameList) else: FileName = os.path.basename(FilePathNameList[0]) - TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName) + TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName, FfsFile.CurrentArch) if not os.path.exists(TmpOutputDir) : os.makedirs(TmpOutputDir) TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp') GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile, @@ -83,11 +83,11 @@ class OPTIONROM (OptionRomClassObject): BinFileList.append(TmpOutputFile) else: FilePathName = FfsFile.GenFfs() if FfsFile.OverrideAttribs != None: FileName = os.path.basename(FilePathName) - TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName) + TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName, FfsFile.CurrentArch) if not os.path.exists(TmpOutputDir) : os.makedirs(TmpOutputDir) TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp') GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile, -- 2.6.1.windows.1