]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/OptionRom.py
BaseTools: Fix the bug for OptionRom generation with different arch
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / OptionRom.py
index 28e77aad5fbd4f1e918defc94942563be02f38a8..7886a7cfe73e6b639d30b5d50c13aec4acc61620 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # process OptionROM generation\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\r
+#  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -15,8 +15,7 @@
 ##\r
 # Import Modules\r
 #\r
-import os\r
-import shutil\r
+import Common.LongFilePathOs as os\r
 import subprocess\r
 import StringIO\r
 \r
@@ -68,7 +67,7 @@ class OPTIONROM (OptionRomClassObject):
                     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
@@ -86,7 +85,7 @@ class OPTIONROM (OptionRomClassObject):
                 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