diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-12 00:58:18 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-12 00:58:18 +0000 |
commit | 0614d73be31da5ca1e420ea268a9f13f6aca659d (patch) | |
tree | 8f0b1d863a9df83b8553e22502c9d618fa76b0ab /BaseTools/Source/Python | |
parent | aa2868b3f142b8c5a5c55626696ff985ed55c3b0 (diff) | |
download | edk2-platforms-0614d73be31da5ca1e420ea268a9f13f6aca659d.tar.xz |
BaseTools: Generate a FV EXT entry for FV UI name.
This patch also removed a warning message.
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@17627 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 1 | ||||
-rw-r--r-- | BaseTools/Source/Python/GenFds/Fv.py | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 996b654943..0e7482a87a 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2297,7 +2297,6 @@ class ModuleAutoGen(AutoGen): if Module.MetaFile == self.MetaFile:
continue
if Module.Name == self.Name:
- EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (Module.MetaFile, self.MetaFile))
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py index 03a742696f..8f341d3bf1 100644 --- a/BaseTools/Source/Python/GenFds/Fv.py +++ b/BaseTools/Source/Python/GenFds/Fv.py @@ -30,6 +30,7 @@ from Common.LongFilePathSupport import CopyLongFilePath from Common.LongFilePathSupport import OpenLongFilePath as open
T_CHAR_LF = '\n'
+FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'
## generate FV
#
@@ -295,6 +296,26 @@ class FV (FvClassObject): if self.FvNameGuid <> None and self.FvNameGuid <> '':
TotalSize = 16 + 4
Buffer = ''
+ #
+ # Create EXT entry for FV UI name
+ # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C
+ #
+ FvUiLen = len(self.UiFvName)
+ TotalSize += (FvUiLen + 16 + 4)
+ Guid = FV_UI_EXT_ENTY_GUID.split('-')
+ #
+ # Layout:
+ # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4
+ # GUID : size 16
+ # FV UI name
+ #
+ Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)
+ + pack('=LHHBBBBBBBB', int(Guid[0], 16), int(Guid[1], 16), int(Guid[2], 16),
+ int(Guid[3][-4:-2], 16), int(Guid[3][-2:], 16), int(Guid[4][-12:-10], 16),
+ int(Guid[4][-10:-8], 16), int(Guid[4][-8:-6], 16), int(Guid[4][-6:-4], 16),
+ int(Guid[4][-4:-2], 16), int(Guid[4][-2:], 16))
+ + self.UiFvName)
+
for Index in range (0, len(self.FvExtEntryType)):
if self.FvExtEntryType[Index] == 'FILE':
# check if the path is absolute or relative
|