public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix the bug for OptionRom generation with different arch
@ 2016-10-19  9:10 Yonghong Zhu
  2016-11-01  2:49 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2016-10-19  9:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: Fix the bug for OptionRom generation with different arch
  2016-10-19  9:10 [Patch] BaseTools: Fix the bug for OptionRom generation with different arch Yonghong Zhu
@ 2016-11-01  2:49 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2016-11-01  2:49 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Zhu, Yonghong 
Sent: Wednesday, October 19, 2016 5:11 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>
Subject: [Patch] BaseTools: Fix the bug for OptionRom generation with different 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 <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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-01  2:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-19  9:10 [Patch] BaseTools: Fix the bug for OptionRom generation with different arch Yonghong Zhu
2016-11-01  2:49 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox