[edk2-devel] 回复: [Patch] BaseTools: Remove the dependency on the build intermediate file

gaoliming gaoliming at byosoft.com.cn
Mon Nov 2 01:32:45 UTC 2020


Bob:
  So, this incremental issue happens when the source file name is changed.
Is it only for *.aslc file, or also for other file, such as *.asl?

Thanks
Liming
> -----邮件原件-----
> 发件人: Bob Feng <bob.c.feng at intel.com>
> 发送时间: 2020年10月26日 20:28
> 收件人: devel at edk2.groups.io
> 抄送: Liming Gao <gaoliming at byosoft.com.cn>; Yuwei Chen
> <yuwei.chen at intel.com>
> 主题: [Patch] BaseTools: Remove the dependency on the build intermediate
> file
> 
> When generating compressed section, the build tool rely on the
> build intermediate files, which were generated in last build, to
> get the file list. This method will cause the incremental build to
> generate incorrect build result. To reproduce this incremental build
> error, you can do:
> 1. build Ovmf
> 2. change the module OvmfPkg\AcpiTables a source file Facp.aslc
> name from Facp.aslc to Facpxxx.aslc.
> 3. change the Facp.aslc file name in [sources] section of AcpiTables.inf
> 4. incremental build Ovmf
> 
> you will see the in AcpiTables module Makefile, the corresponding
> Facp.acpi file is not changed.
> 
> This patch is to make the build always get file list from the INF.
> 
> Signed-off-by: Bob Feng <bob.c.feng at intel.com>
> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen at intel.com>
> ---
>  BaseTools/Source/Python/GenFds/Section.py | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/GenFds/Section.py
> b/BaseTools/Source/Python/GenFds/Section.py
> index 2acb70f412..0382b2a759 100644
> --- a/BaseTools/Source/Python/GenFds/Section.py
> +++ b/BaseTools/Source/Python/GenFds/Section.py
> @@ -139,25 +139,10 @@ class Section (SectionClassObject):
>                  if File.Ext == Suffix:
>                      FileList.append(File.Path)
> 
>          if (not IsMakefile and Suffix is not None and
> os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix is not
None):
> -            #
> -            # Get Makefile path and time stamp
> -            #
> -            MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]
> -            Makefile = os.path.join(MakefileDir, 'Makefile')
> -            if not os.path.exists(Makefile):
> -                Makefile = os.path.join(MakefileDir, 'GNUmakefile')
> -            if os.path.exists(Makefile):
> -                # Update to search files with suffix in all sub-dirs.
> -                Tuple = os.walk(FfsInf.EfiOutputPath)
> -                for Dirpath, Dirnames, Filenames in Tuple:
> -                    for F in Filenames:
> -                        if os.path.splitext(F)[1] == Suffix:
> -                            FullName = os.path.join(Dirpath, F)
> -                            if os.path.getmtime(FullName) >
> os.path.getmtime(Makefile):
> -                                FileList.append(FullName)
>              if not FileList:
>                  SuffixMap = FfsInf.GetFinalTargetSuffixMap()
>                  if Suffix in SuffixMap:
>                      FileList.extend(SuffixMap[Suffix])
> 
> --
> 2.20.1.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66841): https://edk2.groups.io/g/devel/message/66841
Mute This Topic: https://groups.io/mt/77971742/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list