Reviewed-by: Liming Gao <liming....@intel.com> -----Original Message----- From: Yingke Liu [mailto:yingke.d....@intel.com] Sent: Wednesday, July 15, 2015 10:18 AM To: edk2-devel@lists.sourceforge.net Subject: [edk2] [Patch] BaseTools: Fixed incorrect alignment bug.
The alignment in rule section is shared by modules that use this rule to generate FFS, it should not be modified by certain module. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d....@intel.com> --- BaseTools/Source/Python/GenFds/EfiSection.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py index 8f61c4d..09fb28f 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -97,6 +97,7 @@ class EfiSection (EfiSectionClassObject): return FileList, self.Alignment Index = 0 + Align = self.Alignment """ If Section type is 'VERSION'""" OutputFileList = [] @@ -229,9 +230,9 @@ class EfiSection (EfiSectionClassObject): if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'): ImageObj = PeImageClass (File) if ImageObj.SectionAlignment < 0x400: - self.Alignment = str (ImageObj.SectionAlignment) + Align = str (ImageObj.SectionAlignment) else: - self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K' + Align = str (ImageObj.SectionAlignment / 0x400) + 'K' if File[(len(File)-4):] == '.efi': MapFile = File.replace('.efi', '.map') @@ -272,4 +273,4 @@ class EfiSection (EfiSectionClassObject): ) OutputFileList.append(OutputFile) - return OutputFileList, self.Alignment + return OutputFileList, Align -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel