From d498274fcd2751343b308ef1edfcc3fd524b79d3 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Tue, 17 Apr 2018 01:48:22 +0800 Subject: 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 Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Eot/Eot.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Eot/Eot.py') 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.
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# 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 -- cgit v1.2.3