]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the bug for OptionRom generation with different arch
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 19 Oct 2016 09:09:43 +0000 (17:09 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 2 Nov 2016 01:47:41 +0000 (09:47 +0800)
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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/OptionRom.py

index 94f77f60e8fb8030085d2c70d17cb0af3df6c5d0..7886a7cfe73e6b639d30b5d50c13aec4acc61620 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process OptionROM generation\r
 #\r
 ## @file\r
 # process OptionROM generation\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -67,7 +67,7 @@ class OPTIONROM (OptionRomClassObject):
                     EfiFileList.extend(FilePathNameList)\r
                 else:\r
                     FileName = os.path.basename(FilePathNameList[0])\r
                     EfiFileList.extend(FilePathNameList)\r
                 else:\r
                     FileName = os.path.basename(FilePathNameList[0])\r
-                    TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName)\r
+                    TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName, FfsFile.CurrentArch)\r
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r
@@ -85,7 +85,7 @@ class OPTIONROM (OptionRomClassObject):
                 FilePathName = FfsFile.GenFfs()\r
                 if FfsFile.OverrideAttribs != None:\r
                     FileName = os.path.basename(FilePathName)\r
                 FilePathName = FfsFile.GenFfs()\r
                 if FfsFile.OverrideAttribs != None:\r
                     FileName = os.path.basename(FilePathName)\r
-                    TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName)\r
+                    TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName, FfsFile.CurrentArch)\r
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r