* [Patch V2] BaseTools: Fix GenSec can't found the depex file
@ 2017-12-07 15:59 Yonghong Zhu
2017-12-07 16:51 ` Leif Lindholm
2017-12-08 0:47 ` Gao, Liming
0 siblings, 2 replies; 3+ messages in thread
From: Yonghong Zhu @ 2017-12-07 15:59 UTC (permalink / raw)
To: edk2-devel; +Cc: Yunhua Feng, Liming Gao
From: Yunhua Feng <yunhuax.feng@intel.com>
Filter the FileList when multiple genfds thread options is not enabled.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/Source/Python/GenFds/EfiSection.py | 5 +++--
BaseTools/Source/Python/GenFds/Section.py | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 7b3b717..5029ec7 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -90,13 +90,14 @@ class EfiSection (EfiSectionClassObject):
if not self.Optional:
FileList.append(Filename)
elif os.path.exists(Filename):
FileList.append(Filename)
elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:
- FileList.append(Filename)
+ if IsMakefile:
+ FileList.append(Filename)
else:
- FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict)
+ FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)
if IsSect :
return FileList, self.Alignment
Index = 0
Align = self.Alignment
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 4c1aaac..463faa3 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -108,11 +108,11 @@ class Section (SectionClassObject):
# @param FileType File type to get
# @param FileExtension File extension to get
# @param Dict dictionary contains macro and its value
# @retval tuple (File list, boolean)
#
- def GetFileList(FfsInf, FileType, FileExtension, Dict = {}):
+ def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False):
if FileType in Section.SectFileType.keys() :
IsSect = True
else :
IsSect = False
@@ -139,11 +139,11 @@ class Section (SectionClassObject):
else:
GenFdsGlobalVariable.VerboseLogger ("\nFile Type \'%s\' of File %s in %s is not same with file type \'%s\' from Rule in FDF" %(File.Type, File.File, FfsInf.InfFileName, FileType))
else:
GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))
- if Suffix != None:
+ if (not IsMakefile and Suffix != None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix != None):
#
# Get Makefile path and time stamp
#
MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]
Makefile = os.path.join(MakefileDir, 'Makefile')
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch V2] BaseTools: Fix GenSec can't found the depex file
2017-12-07 15:59 [Patch V2] BaseTools: Fix GenSec can't found the depex file Yonghong Zhu
@ 2017-12-07 16:51 ` Leif Lindholm
2017-12-08 0:47 ` Gao, Liming
1 sibling, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2017-12-07 16:51 UTC (permalink / raw)
To: Yonghong Zhu; +Cc: edk2-devel, Yunhua Feng, Liming Gao
Thanks - with this patch all of my platforms build again.
On Thu, Dec 07, 2017 at 11:59:44PM +0800, Yonghong Zhu wrote:
> From: Yunhua Feng <yunhuax.feng@intel.com>
>
> Filter the FileList when multiple genfds thread options is not enabled.
>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> BaseTools/Source/Python/GenFds/EfiSection.py | 5 +++--
> BaseTools/Source/Python/GenFds/Section.py | 4 ++--
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
> index 7b3b717..5029ec7 100644
> --- a/BaseTools/Source/Python/GenFds/EfiSection.py
> +++ b/BaseTools/Source/Python/GenFds/EfiSection.py
> @@ -90,13 +90,14 @@ class EfiSection (EfiSectionClassObject):
> if not self.Optional:
> FileList.append(Filename)
> elif os.path.exists(Filename):
> FileList.append(Filename)
> elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:
> - FileList.append(Filename)
> + if IsMakefile:
> + FileList.append(Filename)
> else:
> - FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict)
> + FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)
> if IsSect :
> return FileList, self.Alignment
>
> Index = 0
> Align = self.Alignment
> diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
> index 4c1aaac..463faa3 100644
> --- a/BaseTools/Source/Python/GenFds/Section.py
> +++ b/BaseTools/Source/Python/GenFds/Section.py
> @@ -108,11 +108,11 @@ class Section (SectionClassObject):
> # @param FileType File type to get
> # @param FileExtension File extension to get
> # @param Dict dictionary contains macro and its value
> # @retval tuple (File list, boolean)
> #
> - def GetFileList(FfsInf, FileType, FileExtension, Dict = {}):
> + def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False):
> if FileType in Section.SectFileType.keys() :
> IsSect = True
> else :
> IsSect = False
>
> @@ -139,11 +139,11 @@ class Section (SectionClassObject):
> else:
> GenFdsGlobalVariable.VerboseLogger ("\nFile Type \'%s\' of File %s in %s is not same with file type \'%s\' from Rule in FDF" %(File.Type, File.File, FfsInf.InfFileName, FileType))
> else:
> GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))
>
> - if Suffix != None:
> + if (not IsMakefile and Suffix != None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix != None):
> #
> # Get Makefile path and time stamp
> #
> MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]
> Makefile = os.path.join(MakefileDir, 'Makefile')
> --
> 2.6.1.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch V2] BaseTools: Fix GenSec can't found the depex file
2017-12-07 15:59 [Patch V2] BaseTools: Fix GenSec can't found the depex file Yonghong Zhu
2017-12-07 16:51 ` Leif Lindholm
@ 2017-12-08 0:47 ` Gao, Liming
1 sibling, 0 replies; 3+ messages in thread
From: Gao, Liming @ 2017-12-08 0:47 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Feng, YunhuaX
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Friday, December 8, 2017 12:00 AM
> To: edk2-devel@lists.01.org
> Cc: Feng, YunhuaX <yunhuax.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [Patch V2] BaseTools: Fix GenSec can't found the depex file
>
> From: Yunhua Feng <yunhuax.feng@intel.com>
>
> Filter the FileList when multiple genfds thread options is not enabled.
>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
> BaseTools/Source/Python/GenFds/EfiSection.py | 5 +++--
> BaseTools/Source/Python/GenFds/Section.py | 4 ++--
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
> index 7b3b717..5029ec7 100644
> --- a/BaseTools/Source/Python/GenFds/EfiSection.py
> +++ b/BaseTools/Source/Python/GenFds/EfiSection.py
> @@ -90,13 +90,14 @@ class EfiSection (EfiSectionClassObject):
> if not self.Optional:
> FileList.append(Filename)
> elif os.path.exists(Filename):
> FileList.append(Filename)
> elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:
> - FileList.append(Filename)
> + if IsMakefile:
> + FileList.append(Filename)
> else:
> - FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict)
> + FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)
> if IsSect :
> return FileList, self.Alignment
>
> Index = 0
> Align = self.Alignment
> diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
> index 4c1aaac..463faa3 100644
> --- a/BaseTools/Source/Python/GenFds/Section.py
> +++ b/BaseTools/Source/Python/GenFds/Section.py
> @@ -108,11 +108,11 @@ class Section (SectionClassObject):
> # @param FileType File type to get
> # @param FileExtension File extension to get
> # @param Dict dictionary contains macro and its value
> # @retval tuple (File list, boolean)
> #
> - def GetFileList(FfsInf, FileType, FileExtension, Dict = {}):
> + def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False):
> if FileType in Section.SectFileType.keys() :
> IsSect = True
> else :
> IsSect = False
>
> @@ -139,11 +139,11 @@ class Section (SectionClassObject):
> else:
> GenFdsGlobalVariable.VerboseLogger ("\nFile Type \'%s\' of File %s in %s is not same with file type \'%s\'
> from Rule in FDF" %(File.Type, File.File, FfsInf.InfFileName, FileType))
> else:
> GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s
> specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))
>
> - if Suffix != None:
> + if (not IsMakefile and Suffix != None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix != None):
> #
> # Get Makefile path and time stamp
> #
> MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]
> Makefile = os.path.join(MakefileDir, 'Makefile')
> --
> 2.6.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-08 0:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 15:59 [Patch V2] BaseTools: Fix GenSec can't found the depex file Yonghong Zhu
2017-12-07 16:51 ` Leif Lindholm
2017-12-08 0:47 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox