public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>
Subject: [Patch] BaseTools: Fix the bug for OptionRom generation with different arch
Date: Wed, 19 Oct 2016 17:10:50 +0800	[thread overview]
Message-ID: <1476868250-14036-1-git-send-email-yonghong.zhu@intel.com> (raw)

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 <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 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.<BR>
+#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
 #
 #  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



             reply	other threads:[~2016-10-19  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  9:10 Yonghong Zhu [this message]
2016-11-01  2:49 ` [Patch] BaseTools: Fix the bug for OptionRom generation with different arch Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476868250-14036-1-git-send-email-yonghong.zhu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox