summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Eot/Eot.py
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-04-17 01:48:22 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-18 22:15:34 +0800
commitd498274fcd2751343b308ef1edfcc3fd524b79d3 (patch)
treeb97fd0614553f94275c7eb835d7a05d6125eb889 /BaseTools/Source/Python/Eot/Eot.py
parent5f446994a2cabd3546d3d54e96164385f919a3ba (diff)
downloadedk2-d498274fcd2751343b308ef1edfcc3fd524b79d3.tar.gz
edk2-d498274fcd2751343b308ef1edfcc3fd524b79d3.tar.bz2
edk2-d498274fcd2751343b308ef1edfcc3fd524b79d3.zip
BaseTools: Eot - Remove FvImage file
move the single used class from FvImage to Eot delete the FvImage file remove FvImage from makefile Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Eot/Eot.py')
-rw-r--r--BaseTools/Source/Python/Eot/Eot.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Eot/Eot.py b/BaseTools/Source/Python/Eot/Eot.py
index 96c3396134..15de822d69 100644
--- a/BaseTools/Source/Python/Eot/Eot.py
+++ b/BaseTools/Source/Python/Eot/Eot.py
@@ -1,7 +1,7 @@
## @file
# This file is used to be the main entrance of EOT tool
#
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -24,13 +24,35 @@ from Common.Misc import GuidStructureStringToGuidString
from InfParserLite import *
import c
import Database
-from FvImage import *
from array import array
from Report import Report
from Common.BuildVersion import gBUILD_VERSION
from Parser import ConvertGuid
from Common.LongFilePathSupport import OpenLongFilePath as open
+## MultipleFv() class
+#
+# A class for Multiple FV
+#
+class MultipleFv(FirmwareVolume):
+ def __init__(self, FvList):
+ FirmwareVolume.__init__(self)
+ self.BasicInfo = []
+ for FvPath in FvList:
+ FvName = os.path.splitext(os.path.split(FvPath)[1])[0]
+ Fd = open(FvPath, 'rb')
+ Buf = array('B')
+ try:
+ Buf.fromfile(Fd, os.path.getsize(FvPath))
+ except EOFError:
+ pass
+
+ Fv = FirmwareVolume(FvName)
+ Fv.frombuffer(Buf, 0, len(Buf))
+
+ self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])
+ self.FfsDict.append(Fv.FfsDict)
+
## Class Eot
#
# This class is used to define Eot main entrance