]> git.proxmox.com Git - mirror_edk2.git/commitdiff
This patch is going to fix a build failure (running of GenFds) in Linux system caused...
authorHess Chen <hesheng.chen@intel.com>
Tue, 19 Aug 2014 08:22:04 +0000 (08:22 +0000)
committerhchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Aug 2014 08:22:04 +0000 (08:22 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15831 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools/Source/Python/build/build.py

index 180e217705e48aaf0a1f4e2bfb417cfc80c52b55..0ad368a4cec560614cd72c54fc05794f94c546e2 100644 (file)
@@ -1200,7 +1200,7 @@ cleanlib:
 #\r
 class TopLevelMakefile(BuildFile):\r
     ## template used to generate toplevel makefile\r
-    _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f "${fdf_file}" -o "${platform_build_directory}" -t ${toolchain_tag} -b ${build_target} -p "${active_platform}" -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
+    _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f ${fdf_file} -o ${platform_build_directory} -t ${toolchain_tag} -b ${build_target} -p ${active_platform} -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
 \r
     ## Constructor of TopLevelMakefile\r
     #\r
index 56dbc5b39b354ec333202a51146fb99203aff6f8..85ee9985bbfff1fadd7f1d1f8f26b837ac9e7c6f 100644 (file)
@@ -245,7 +245,14 @@ def LaunchCommand(Command, WorkingDir):
     # if working directory doesn't exist, Popen() will raise an exception\r
     if not os.path.isdir(WorkingDir):\r
         EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)\r
-\r
+    \r
+    # Command is used as the first Argument in following Popen().\r
+    # It could be a string or sequence. We find that if command is a string in following Popen(),\r
+    # ubuntu may fail with an error message that the command is not found.\r
+    # So here we may need convert command from string to list instance.\r
+    if not isinstance(Command, list):\r
+        Command = Command.split()\r
+    \r
     Proc = None\r
     EndOfProcedure = None\r
     try:\r
@@ -1402,12 +1409,6 @@ class Build():
                 for Arch in Wa.ArchList:\r
                     GlobalData.gGlobalDefines['ARCH'] = Arch\r
                     Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)\r
-                    for Module in Pa.Platform.Modules:\r
-                        # Get ModuleAutoGen object to generate C code file and makefile\r
-                        Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
-                        if Ma == None:\r
-                            continue\r
-                        self.BuildModules.append(Ma)\r
                     self._BuildPa(self.Target, Pa)\r
 \r
                 # Create MAP file when Load Fix Address is enabled.\r
@@ -1491,7 +1492,6 @@ class Build():
                     Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
                     if Ma == None: continue\r
                     MaList.append(Ma)\r
-                    self.BuildModules.append(Ma)\r
                     if not Ma.IsBinaryModule:\r
                         self._Build(self.Target, Ma, BuildModule=True)\r
 \r