audk/BaseTools/Source/Python/GenFds
Derek Lin c17956e0ee BaseTools: Skip module AutoGen by comparing timestamp.
[Introduction]

The BaseTool Build.py AutoGen parse INF meta-file and generate
AutoGen.c/AutoGen.h/makefile. When we only change .c .h code, the
AutoGen might be not necessary, but Build.py spend a lot of time on it.
There's a -u flag to skip all module's AutoGen. In my environment, it save
35%~50% of time in rebuild a ROM.
However, if user change one .INF meta-file, then -u flag is not available.

[Idea]

AutoGen can compare meta-file's timestamp and decide if the module's
AutoGen can be skipped. With this, when a module's INF is changed, we
only run this module's AutoGen, we don't need to run other module's.

[Implementation]

In the end of a module's AutoGen, we create a AutoGenTimeStamp.
The file save a file list that related to this module's AutoGen.
In other word, the file list in AutoGenTimeStamp is INPUT files of
module AutoGen, AutoGenTimeStamp file is OUTPUT.
During rebuild, we compare time stamp between INPUT and OUTPUT, and
decide if we can skip it.

Below is the Input/Output of a module's AutoGen.

[Input]
  1. All the DSC/DEC/FDF used by the platform.
  2. Macro and PCD defined by Build Options such as "build -D AAA=TRUE
     --pcd BbbPcd=0".
  3. INF file of a module.
  4. Source files of a module, list in [Sources] section of INF.
  5. All the library link by the module.
  6. All the .h files included by the module's sources.

[Output]
  AutoGen.c/AutoGen.h/makefile/AutoGenTimeStamp

[Testing]

This patch save my build time. When I make a change without touching
DSC/DEC/FDF, it is absolutely much faster than original rebuild,
35%~50% time saving in my environment
(compare to original tool rebuild time).
If I change any DSC/DEC/FDF, there's no performance improve, because it
can't skip any module's AutoGen.

Please note that if your environment will generate DSC/FDF during prebuild,
it will not skip any AutoGen because of DSC timestamp is changed. This will
require prebuild script not to update metafile when content is not changed.
2017-03-25 12:13:01 +08:00
..
AprioriSection.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
Attribute.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
Capsule.py BaseTools: Extend FMP to support FV statement and FD statement 2016-10-12 12:48:44 +08:00
CapsuleData.py BaseTools: not report error for the optional items in the FmpTokens 2017-01-06 16:11:04 +08:00
ComponentStatement.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
CompressSection.py License header updated to match correct format. 2014-08-28 13:53:34 +00:00
DataSection.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
DepexSection.py License header updated to match correct format. 2014-08-28 13:53:34 +00:00
EfiSection.py BaseTools: Fixed incorrect alignment bug. 2015-07-16 00:56:14 +00:00
Fd.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
FdfParser.py BaseTools: Skip module AutoGen by comparing timestamp. 2017-03-25 12:13:01 +08:00
Ffs.py Sync BaseTools Trunk (version r2518) to EDKII main trunk. 2012-04-10 07:18:20 +00:00
FfsFileStatement.py BaseTools: Fix the bug to handle the read-only file 2016-09-15 16:09:38 +08:00
FfsInfStatement.py BaseTools: handling the case that map file is not exist 2016-09-25 08:21:56 +08:00
Fv.py BaseTools: GenFds get the Size info for FV image in the FD region 2017-03-18 16:38:54 +08:00
FvImageSection.py BaseTools: Fix the bug to handle the read-only file 2016-09-15 16:09:38 +08:00
GenFds.py BaseTools: GenFds get the Size info for FV image in the FD region 2017-03-18 16:38:54 +08:00
GenFdsGlobalVariable.py BaseTools: Fix the bug for RAW file alignment value support 2016-12-29 16:58:17 +08:00
GuidSection.py BaseTools: FMP capsule add the support to generate auth info 2016-08-19 15:37:59 +08:00
OptRomFileStatement.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
OptRomInfStatement.py Sync BaseTools Branch (version r2362) to EDKII main trunk. 2011-10-11 02:49:48 +00:00
OptionRom.py BaseTools: Fix the bug for OptionRom generation with different arch 2016-11-02 09:47:41 +08:00
Region.py BaseTools: Fix the bug to handle the read-only file 2016-09-15 16:09:38 +08:00
Rule.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
RuleComplexFile.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
RuleSimpleFile.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
Section.py BaseTools: Fix GenFds issue to wrongly get file without postfix. 2016-05-26 10:58:30 +08:00
UiSection.py BaseTools: Clean some coding style issues 2015-12-01 04:22:16 +00:00
VerSection.py BaseTools: Clean some coding style issues 2015-12-01 04:22:16 +00:00
Vtf.py BaseTools: Clean some coding style issues 2015-12-01 04:22:16 +00:00
__init__.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00