summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: Update the BaseTools/Source/Python/Makefile to check for ↵Gao, Liming2014-09-171-8/+38
| | | | | | | | | | dependent files Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Hauch, Larry <larry.hauch@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16124 6f19259b-4bc3-4df7-8a09-765794883524
* Update Build Tool version from 0.51 to 0.60Gao, Liming2014-09-161-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16114 6f19259b-4bc3-4df7-8a09-765794883524
* Support DSC and FDF file out of WORKSPACE by GenFds.Yingke Liu2014-09-162-7/+6
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16113 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/Source/C: Only used '-Wno-self-assign' when BaseTools are built on ↵Andrew Fish2014-09-161-2/+6
| | | | | | | | | | | | | | DARWIN Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> Tested-By: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16106 6f19259b-4bc3-4df7-8a09-765794883524
* The current Makefile only checks the primary python file, such as build.py ↵lhauch2014-09-121-9/+139
| | | | | | | | | | | | | | | and does not check other files in tool’s directory tree. This modification adds all of the other files within the tool’s directory tree that would be a cause to rebuild the tool. The format in the Makefile for listing these other files was selected to allow the nightly build script to detect changes in the additional files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16103 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to fix the issue of the mis-match between the index of ↵Feng, Bob C2014-09-121-5/+19
| | | | | | | | | | Platform DynamicPcd list and Dynamic Pcd generated token number. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng, Bob C <bob.c.feng@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16101 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix the regression issue after enbaling s_* an d_* macros in FDF.Yingke Liu2014-09-121-0/+1
| | | | | | | | | | | | | | | Add the missing 'MacroDict' field in FfsInfStatement. The issue is that BaseTools/Source/Python/GenFds/FfsInfStatement.py", line 448, in __ExtendMacro__ String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict) AttributeError: OptRomInfStatement instance has no attribute 'MacroDict' Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16099 6f19259b-4bc3-4df7-8a09-765794883524
* Add support for ${s_*} and ${d_*} macros for in FDF file for the INF files, ↵Abner Chang2014-09-111-0/+26
| | | | | | | | | | | | | | | and for each statement in the build rules. The following keywords are supported: "src", "s_path", "s_dir", "s_name", "s_base", "s_ext", "dst", "d_path", "d_name", "d_base", "d_ext" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abner Chang <abner.chang@hp.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Larry Hauch <larry.hauch@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16094 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix XCODE5 to work properly with NASMAndrew Fish2014-09-101-0/+2
| | | | | | | | | | | The default object type for NASM is raw binary, and this will not link. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16085 6f19259b-4bc3-4df7-8a09-765794883524
* This file allows a developer to add a new tool in either the C or Python ↵lhauch2014-09-051-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trees, add the executable (and any supporting files, such as the TestSigningPrivateKey.pem file) to this file and the build server will automatically make sure that the new files are added to the BaseTools\Bin\Win32 directory. The Win32 directory is located in https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32 repository. Developer - Tool add process: 1) Developer adds code for the new tool. 2) Developer updates the Makefile in the C or Python directory a) The entry must make sure that the executable is generated in the BaseTools\Bin\Win32 directory and any supporting files are copied to the same directory as part of the build step. 3) Developer adds the <Toolname>.exe under the [Bin.Win32] section in the BinaryFiles.txt file. 4) Developer adds other files required to be present in the [ExtraFiles.Win32] section in the BinaryFiles.txt file. Build Server: 1) Build all binaries by calling nmake on the Source\C\Makefile and Source\Python\Makefile 2) After building the binaries, the build server verify that the files listed in BaseTools\Source\BinFiles.txt are also in the edk2-toolbinaries project, a. If a file is not under source control, then the build server will add file as long as it is present. File format: [SectionName.TargetDir] File1 File2 … Where: SectionName is one of Bin, ExtraFiles or CxFreeze TargeDir is the name of the subdirectory in the BaseTools\Bin directory tree. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16063 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/AutoGen: Remove redundant copy action for binary moduleHess Chen2014-09-041-1/+2
| | | | | | | | | | Remove redundant copy action for binary module to copy binary files to output directory only when the binary module is a library Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16057 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/UPT: Replace os.linesep with '\r\n' when generating UNI files.Hess Chen2014-09-034-50/+47
| | | | | | | | | | Replace os.linesep with '\r\n' when generating UNI files to make sure all files are under DOS format. 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@16041 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/CommonLib: Add a step to convert ":\\" to ":\"Hess Chen2014-09-031-0/+8
| | | | | | | | | | | Convert ":\\\\" to ":\\", because it doesn't work with WINDOWS_EXTENSION_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16039 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools tools_def: Indicate that NASM 2.07 or later is requiredJordan Justen2014-09-011-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16018 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools build_rule: Add .nasm => .obj build ruleJordan Justen2014-09-012-2/+15
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16017 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools tools_def: Add NASM_FLAGSJordan Justen2014-09-011-5/+280
| | | | | | | | | | Note: Only tested with the GCC49 toolchain so far. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16016 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to fix the issue of only Default SkuId is built into the ↵Feng, Bob C2014-08-301-27/+1
| | | | | | | | | | External Pcd DataBase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng, Bob C <bob.c.feng@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16006 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Cleanup XCODE build rulesAnderw Fish2014-08-291-2/+2
| | | | | | | | | | | | Update C-Code-File rule since XCODE never needs the SYMRENAME step. Add *.S16 to Mash16-Code-File rule to supoprt 16-bit assmebly with XCODE Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15980 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add the XCODE5 tools target to supoprt Xcode 5Anderw Fish2014-08-291-0/+74
| | | | | | | | | | | | | | Xcode 5 changed the arguments required to supoprt X64 EFIAPI so it is a new target. XCODE5 supports Xcode 5.* and Xcode 6.*, and will probably support future versions of Xcode as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15979 6f19259b-4bc3-4df7-8a09-765794883524
* License header updated to match correct format.Yingke Liu2014-08-28135-870/+1190
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix BaseTools C compiler flags for Xcode 5Anderw Fish2014-08-281-1/+1
| | | | | | | | | | | | | | | | -fno-merge-constants is not supported by clang, and it warns it will turn into a hard error in the future. -Wno-deprecated-declarations removes warnings about obsolete libraries that are not secure. -Wno-self-assign removes warnings from LZMA code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15938 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix clang C++ build errorAnderw Fish2014-08-282-2/+2
| | | | | | | | | | | | Move argument default to constructor to remove clang warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15932 6f19259b-4bc3-4df7-8a09-765794883524
* [BaseTools] clang warns that since BaseAddress is unsigned it can never be < 0.Anderw Fish2014-08-281-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15931 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: add support Xcode 5 in the EmulatorPkgAndrew Fish2014-08-281-2/+2
| | | | | | | | | | | | | | The XCODE32 target is used to build the x86_64 Mac OS X application for the emulator. The other Xcode targets build the EFIAPI needed for UEFI. This patch removes an obsolete command line argument. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15930 6f19259b-4bc3-4df7-8a09-765794883524
* Updated GenBootSector, GenCrc32 and GenPage to remove duplicate “Build” ↵lhauch2014-08-274-11/+12
| | | | | | | | | | | | word in the version output, updated the minor number and copyright as needed. Updated the VolInfo version output to remove the tool description from the --version output string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15924 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to:Hess Chen2014-08-263-0/+10
| | | | | | | | | | 1. Support a force binary build mode by adding “--ignore-source” to command line options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15897 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to:Hess Chen2014-08-2656-1695/+5930
| | | | | | | | | | | | | | | | | | 1. Add a recovery mode for UPT failure 2. Add UNI file support 3. Add binary file header support 4. Add support for PCD error message 5. Add support for replace 6. Format generated INF/DEC files 7. Update dependency check 8. Other minor fixes 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@15896 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to correct the external PCD database generation rule to ↵Feng, Bob C2014-08-264-16/+209
| | | | | | | | | | support the case that all binary driver are only listed in FDF file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng, Bob C <bob.c.feng@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15893 6f19259b-4bc3-4df7-8a09-765794883524
* EDK II Contributions.txt: Note acceptable contribution licensesJordan Justen2014-08-251-0/+14
| | | | | | | | | | | | | | | | | | We strongly prefer that contribtions be offered using the same license as the project/module. But, we should document other acceptable licenses for contributions. This will allow package owners to more easily know if they can accept a contribution under a different source license. NOTE: This does not modify the wording of the "TianoCore Contribution Agreement 1.0" section Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Mark Doran <mark.doran@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15892 6f19259b-4bc3-4df7-8a09-765794883524
* BootSectImage.exe, EfiLdrImage.exe and Split.exe tools have incorrect output ↵lhauch2014-08-253-4/+12
| | | | | | | | | | | | | from the --version option. This patch fixes the --version option output and corrects the description displayed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15890 6f19259b-4bc3-4df7-8a09-765794883524
* Fix nmake cleanall bugs.Yingke Liu2014-08-254-5/+6
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15887 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to:Hess Chen2014-08-2510-12/+228
| | | | | | | | | | | | 1. Add a checkpoint to check if an UNI file is a valid UTF-16 file 2. Add a checkpoint to check if a GUID/PPI/PROTOCOL/PCD is in a valid format. 3. Some other minor changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15886 6f19259b-4bc3-4df7-8a09-765794883524
* Setting the svn property, svn:executable on the new scripts.lhauch2014-08-213-0/+0
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15868 6f19259b-4bc3-4df7-8a09-765794883524
* Adding files for proposed replacement for edksetup.bat.lhauch2014-08-213-0/+710
| | | | | | | | | | | | | | This changes includes new scripts that breaks out some of the functionality in edksetup.bat and eliminates calling the toolsetup.bat file in BaseTools directory. Edk2Setup.bat is to be used for testing. If no bugs are reported by the end of September, 2014, the file will be renamed to edksetup.bat. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15867 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to:Hess Chen2014-08-213-6/+13
| | | | | | | | | | | | | 1. Skip the content defined in USER EXTENSION section without raising an error. 2. Wrap os.utime to use two arguments. 3. Add GenFdsCommand for PlatformAutoGen 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@15865 6f19259b-4bc3-4df7-8a09-765794883524
* AutoGen.c can only be generated if the module has intermediate object files ↵Yingke Liu2014-08-212-1/+6
| | | | | | | | | | generated or links other libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15864 6f19259b-4bc3-4df7-8a09-765794883524
* 1. AutoGen.c should be generated if it is not empty even if there are no C ↵Yingke Liu2014-08-211-1/+4
| | | | | | | | | | | | | | source files. 2. If there are sub directories in current module, the corresponding directory in OUTPUT should be created. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Chen, Hesheng <hesheng.chen@intel.com> Reviewed-by: Feng, Bob C <bob.c.feng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15860 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Added support for GCC stack protector for ARM architectureOlivier Martin2014-08-201-11/+11
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15854 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to:Hess Chen2014-08-202-6/+4
| | | | | | | | | | | | | 1. Fix a bug in GenFds for wrongly handling '"' of command line parameter. 2. Provide different input parameter mode for different OS. For Linux, using a list. For Windows, using a string. 3. Remove 3 un-existing function calling. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15847 6f19259b-4bc3-4df7-8a09-765794883524
* Fix an issue of building BaseTools from sources using VS2013.Yingke Liu2014-08-201-1/+5
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Hauch, Larry <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15844 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to fix a build failure (running of GenFds) in Linux ↵Hess Chen2014-08-192-9/+9
| | | | | | | | | | | system caused by patch at r15816. 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: Add rules to build NASM source file into a binaryJordan Justen2014-08-182-0/+31
| | | | | | | | | | | | | | | | | v2: * Use EDK II tool name of NASMB rather than NASMBIN * Use EDK II extension of .nasmb rather than .nasmbin v3: * Create listing file * Don't change into source directory * Add ENV(NASM_PREFIX) before nasm for NASM_PATH Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15820 6f19259b-4bc3-4df7-8a09-765794883524
* This patch is going to retire the top level makefile on BaseTools for ↵Hess Chen2014-08-183-115/+190
| | | | | | | | | | supporting a pure binary build without any complier. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15816 6f19259b-4bc3-4df7-8a09-765794883524
* There is a limitation on WINDOWS OS for the length of entire file path ↵Hess Chen2014-08-15109-332/+702
| | | | | | | | | | 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
* Contributed-under: TianoCore Contribution Agreement 1.0Michael Kinney2014-08-142-26/+21
| | | | | | | | | | | | Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: lhauch <larry.hauch@intel.com> Fix the behavior of the –version flag in the Rsa2048Sha256 tools and update logic for showing program name, version, usage, and copyright information to match other BaseTools. git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15805 6f19259b-4bc3-4df7-8a09-765794883524
* Contributed-under: TianoCore Contribution Agreement 1.0Michael Kinney2014-08-147-2/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section. The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file. Signing operations are performed from python scripts that wrap OpenSsl command line utilities. Verification operations are performed using the OpenSsl libraries in the CryptoPkg. The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID. The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data. The signing tool included in these patches performs encode/decode operations using this data layout. HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID. MdePkg/Include/Guid/WinCertificate.h ================================= // // WIN_CERTIFICATE_UEFI_GUID.CertType // #define EFI_CERT_TYPE_RSA2048_SHA256_GUID \ {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } } /// /// WIN_CERTIFICATE_UEFI_GUID.CertData /// typedef struct { EFI_GUID HashType; UINT8 PublicKey[256]; UINT8 Signature[256]; } EFI_CERT_BLOCK_RSA_2048_SHA256; MdePkg/Include/Protocol/Hash.h ================================= #define EFI_HASH_ALGORITHM_SHA256_GUID \ { \ 0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \ } The verification operations require the use of public key(s). A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys. A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys. When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD. It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region. While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete. It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase. I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible. The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries. This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers. Patch Summary ============== 1) BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections a. Wrapper for a set of OpenSsl command line utility operations b. OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH c. Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. usage: Rsa2048Sha256Sign -e|-d [options] <input_file> positional arguments: input_file specify the input filename optional arguments: -e encode file -d decode file -o filename, --output filename specify the output filename --private-key PRIVATEKEYFILE specify the private key filename. If not specified, a test signing key is used. -v, --verbose increase output messages -q, --quiet reduce output messages --debug [0-9] set debug level --version display the program version and exit -h, --help display this help text 2) BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities. a. Wrapper for a set of OpenSsl command line utility operations b. OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. usage: Rsa2048Sha256GenerateKeys [options] optional arguments: -o [filename [filename ...]], --output [filename [filename ...]] specify the output private key filename in PEM format -i [filename [filename ...]], --input [filename [filename ...]] specify the input private key filename in PEM format --public-key-hash PUBLICKEYHASHFILE specify the public key hash filename that is SHA 256 hash of 2048 bit RSA public key in binary format --public-key-hash-c PUBLICKEYHASHCFILE specify the public key hash filename that is SHA 256 hash of 2048 bit RSA public key in C structure format -v, --verbose increase output messages -q, --quiet reduce output messages --debug [0-9] set debug level --version display the program version and exit -h, --help display this help text 3) BaseTools\Conf\tools_def.template a. Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key b. GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID c. Tool is Rsa2049Sha256Sign 4) MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib a. Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components 5) MdeModulePkg\Universal\SectionExtractionPei a. Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs 6) MdeModulePkg\Universal\SectionExtractionDxe a. Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols. 7) SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib a. NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg. b. Based on algorithms from SecurityPkg Authenticated Variable services c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer. 8) SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib a. NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg. b. Based on algorithms from SecurityPkg Authenticated Variable services c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer. git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15800 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add AArch64 ADR_PREL_LO21 and R_AARCH64_CONDBR19Harry Liebel2014-08-041-1/+19
| | | | | | | | | | | | | | | | relocations - ADR_PREL_LO21: support for loading a PC relative label offset. - R_AARCH64_CONDBR19: support for conditional branch instruction (ELF64 code: 280). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15745 6f19259b-4bc3-4df7-8a09-765794883524
* CodeModule: BaseTools - tools_def.txt VS2010, VS2010x86, VS2012 and ↵lhauch2014-08-011-8/+16
| | | | | | | | | | | | | | | | VS2012x86 update locations for rc.exe tool This change will point to the correct location of the rc.exe tool. RC.exe is used for building UEFI compliant drivers that must have a UEFI_HII_RESOURCE_SECTION generated as part of the .efi image file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15735 6f19259b-4bc3-4df7-8a09-765794883524
* Support --version command line for VfrCompile Eric Dong2014-08-012-0/+21
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15733 6f19259b-4bc3-4df7-8a09-765794883524
* Update vfr format for orderedlist opcode to consistent with other opcode, ↵Eric Dong2014-07-311-1/+1
| | | | | | | | | | also compatible with old format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15723 6f19259b-4bc3-4df7-8a09-765794883524