\r
STATIC CHAR8 *mAlignName[] = {\r
"1", "2", "4", "8", "16", "32", "64", "128", "256", "512",\r
- "1K", "2K", "4K", "8K", "16K", "32K", "64K"\r
+ "1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K",\r
+ "512K", "1M", "2M", "4M", "8M", "16M"\r
};\r
\r
STATIC CHAR8 *mFfsValidAlignName[] = {\r
- "8", "16", "128", "512", "1K", "4K", "32K", "64K"\r
+ "8", "16", "128", "512", "1K", "4K", "32K", "64K", "128K","256K",\r
+ "512K", "1M", "2M", "4M", "8M", "16M"\r
};\r
\r
-STATIC UINT32 mFfsValidAlign[] = {0, 8, 16, 128, 512, 1024, 4096, 32768, 65536};\r
+STATIC UINT32 mFfsValidAlign[] = {0, 8, 16, 128, 512, 1024, 4096, 32768, 65536, 131072, 262144,\r
+ 524288, 1048576, 2097152, 4194304, 8388608, 16777216};\r
\r
STATIC EFI_GUID mZeroGuid = {0};\r
\r
fprintf (stdout, " -s, --checksum Indicates to calculate file checksum.\n");\r
fprintf (stdout, " -a FileAlign, --align FileAlign\n\\r
FileAlign points to file alignment, which only support\n\\r
- the following align: 1,2,4,8,16,128,512,1K,4K,32K,64K\n");\r
+ the following align: 1,2,4,8,16,128,512,1K,4K,32K,64K\n\\r
+ 128K,256K,512K,1M,2M,4M,8M,16M\n");\r
fprintf (stdout, " -i SectionFile, --sectionfile SectionFile\n\\r
Section file will be contained in this FFS file.\n");\r
fprintf (stdout, " -n SectionAlign, --sectionalign SectionAlign\n\\r
SectionAlign points to section alignment, which support\n\\r
- the alignment scope 1~64K. It is specified together\n\\r
+ the alignment scope 1~16M. It is specified together\n\\r
with sectionfile to point its alignment in FFS file.\n");\r
fprintf (stdout, " -v, --verbose Turn on verbose output with informational messages.\n");\r
fprintf (stdout, " -q, --quiet Disable all messages except key message and fatal error\n");\r
\r
Routine Description:\r
\r
- Converts Align String to align value (1~64K). \r
+ Converts Align String to align value (1~16M).\r
\r
Arguments:\r
\r
}\r
VerboseMsg ("the size of the generated FFS file is %u bytes", (unsigned) FileSize);\r
\r
- FfsFileHeader.Attributes = (EFI_FFS_FILE_ATTRIBUTES) (FfsAttrib | (FfsAlign << 3));\r
+ //FfsAlign larger than 7, set FFS_ATTRIB_DATA_ALIGNMENT2\r
+ if (FfsAlign < 8) {\r
+ FfsFileHeader.Attributes = (EFI_FFS_FILE_ATTRIBUTES) (FfsAttrib | (FfsAlign << 3));\r
+ } else {\r
+ FfsFileHeader.Attributes = (EFI_FFS_FILE_ATTRIBUTES) (FfsAttrib | ((FfsAlign & 0x7) << 3) | FFS_ATTRIB_DATA_ALIGNMENT2);\r
+ }\r
\r
//\r
// Fill in checksums and state, these must be zero for checksumming\r
/** @file\r
This file contains the internal functions required to generate a Firmware Volume.\r
\r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
Portions Copyright (c) 2016 HP Development Company, L.P.<BR>\r
This program and the accompanying materials \r
case 0:\r
//\r
// 1 byte alignment\r
+ //if bit 1 have set, 128K byte alignmnet\r
//\r
- *Alignment = 0;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 17;\r
+ } else {\r
+ *Alignment = 0;\r
+ }\r
break;\r
\r
case 1:\r
//\r
// 16 byte alignment\r
+ //if bit 1 have set, 256K byte alignment\r
//\r
- *Alignment = 4;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 18;\r
+ } else {\r
+ *Alignment = 4;\r
+ }\r
break;\r
\r
case 2:\r
//\r
// 128 byte alignment\r
+ //if bit 1 have set, 512K byte alignment\r
//\r
- *Alignment = 7;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 19;\r
+ } else {\r
+ *Alignment = 7;\r
+ }\r
break;\r
\r
case 3:\r
//\r
// 512 byte alignment\r
+ //if bit 1 have set, 1M byte alignment\r
//\r
- *Alignment = 9;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 20;\r
+ } else {\r
+ *Alignment = 9;\r
+ }\r
break;\r
\r
case 4:\r
//\r
// 1K byte alignment\r
+ //if bit 1 have set, 2M byte alignment\r
//\r
- *Alignment = 10;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 21;\r
+ } else {\r
+ *Alignment = 10;\r
+ }\r
break;\r
\r
case 5:\r
//\r
// 4K byte alignment\r
+ //if bit 1 have set, 4M byte alignment\r
//\r
- *Alignment = 12;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 22;\r
+ } else {\r
+ *Alignment = 12;\r
+ }\r
break;\r
\r
case 6:\r
//\r
// 32K byte alignment\r
+ //if bit 1 have set , 8M byte alignment\r
//\r
- *Alignment = 15;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 23;\r
+ } else {\r
+ *Alignment = 15;\r
+ }\r
break;\r
\r
case 7:\r
//\r
// 64K byte alignment\r
+ //if bit 1 have set, 16M alignment\r
//\r
- *Alignment = 16;\r
+ if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
+ *Alignment = 24;\r
+ } else {\r
+ *Alignment = 16;\r
+ }\r
break;\r
\r
default:\r
// Clear the alignment bits: these have become meaningless now that we have\r
// adjusted the padding section.\r
//\r
- FfsFile->Attributes &= ~FFS_ATTRIB_DATA_ALIGNMENT;\r
+ FfsFile->Attributes &= ~(FFS_ATTRIB_DATA_ALIGNMENT | FFS_ATTRIB_DATA_ALIGNMENT2);\r
\r
//\r
// Recalculate the FFS header checksum. Instead of setting Header and State\r
\r
STATIC CHAR8 *mAlignName[] = {\r
"1", "2", "4", "8", "16", "32", "64", "128", "256", "512",\r
- "1K", "2K", "4K", "8K", "16K", "32K", "64K"\r
+ "1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K",\r
+ "512K", "1M", "2M", "4M", "8M", "16M"\r
};\r
\r
//\r
used in Ver section.\n");\r
fprintf (stdout, " --sectionalign SectionAlign\n\\r
SectionAlign points to section alignment, which support\n\\r
- the alignment scope 1~64K. It is specified in same\n\\r
+ the alignment scope 1~16M. It is specified in same\n\\r
order that the section file is input.\n");\r
fprintf (stdout, " -v, --verbose Turn on verbose output with informational messages.\n");\r
fprintf (stdout, " -q, --quiet Disable all messages except key message and fatal error\n");\r
\r
Routine Description:\r
\r
- Converts Align String to align value (1~64K). \r
+ Converts Align String to align value (1~16M).\r
\r
Arguments:\r
\r
@par Revision Reference:\r
Version 1.4.\r
\r
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
// FFS File Attributes.\r
// \r
#define FFS_ATTRIB_LARGE_FILE 0x01\r
+#define FFS_ATTRIB_DATA_ALIGNMENT2 0x02\r
#define FFS_ATTRIB_FIXED 0x04\r
#define FFS_ATTRIB_DATA_ALIGNMENT 0x38\r
#define FFS_ATTRIB_CHECKSUM 0x40\r
## @file\r
# parse FDF file\r
#\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
AlignValue = None\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
AlignValue = self.__Token\r
\r
\r
AlignValue = None\r
if self.__GetAlignment():\r
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
AlignValue = self.__Token\r
\r
\r
AlignValue = ""\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)\r
AlignValue = self.__Token\r
\r
CheckSum = True\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)\r
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
FvImageSectionObj.FvFileType = self.__Token\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)\r
FvImageSectionObj.Alignment = self.__Token\r
\r
EfiSectionObj.BuildNum = self.__Token\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
## @file\r
# process data section generation\r
#\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
ImageObj = PeImageClass (Filename)\r
if ImageObj.SectionAlignment < 0x400:\r
self.Alignment = str (ImageObj.SectionAlignment)\r
- else:\r
+ elif ImageObj.SectionAlignment < 0x100000:\r
self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
+ else:\r
+ self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'\r
\r
NoStrip = True\r
if self.SecType in ('TE', 'PE32'):\r
## @file\r
# process rule section generation\r
#\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
ImageObj = PeImageClass (File)\r
if ImageObj.SectionAlignment < 0x400:\r
Align = str (ImageObj.SectionAlignment)\r
- else:\r
+ elif ImageObj.SectionAlignment < 0x100000:\r
Align = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
+ else:\r
+ Align = str (ImageObj.SectionAlignment / 0x100000) + 'M'\r
\r
if File[(len(File)-4):] == '.efi':\r
MapFile = File.replace('.efi', '.map')\r
while True:\r
AlignValue = None\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
#For FFS, Auto is default option same to ""\r
if not self.__Token == "Auto":\r
FfsFileObj.CheckSum = True\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
#For FFS, Auto is default option same to ""\r
if not self.__Token == "Auto":\r
\r
AlignValue = None\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
AlignValue = self.__Token\r
\r
\r
AlignValue = None\r
if self.__GetAlignment():\r
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
AlignValue = self.__Token\r
\r
\r
AlignValue = ""\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
#For FFS, Auto is default option same to ""\r
if not self.__Token == "Auto":\r
\r
SectAlignment = ""\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
FvImageSectionObj.FvFileType = self.__Token\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
FvImageSectionObj.Alignment = self.__Token\r
\r
EfiSectionObj.BuildNum = self.__Token\r
\r
if self.__GetAlignment():\r
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
## @file\r
# process FFS generation from INF statement\r
#\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
# Copyright (c) 2014-2016 Hewlett-Packard Development Company, L.P.<BR>\r
#\r
# This program and the accompanying materials\r
ImageObj = PeImageClass (File)\r
if ImageObj.SectionAlignment < 0x400:\r
self.Alignment = str (ImageObj.SectionAlignment)\r
- else:\r
+ elif ImageObj.SectionAlignment < 0x100000:\r
self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
+ else:\r
+ self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'\r
\r
if not NoStrip:\r
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')\r
ImageObj = PeImageClass (GenSecInputFile)\r
if ImageObj.SectionAlignment < 0x400:\r
self.Alignment = str (ImageObj.SectionAlignment)\r
- else:\r
+ elif ImageObj.SectionAlignment < 0x100000:\r
self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
+ else:\r
+ self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'\r
\r
if not NoStrip:\r
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')\r
FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)\r
# FvAlignmentValue is larger than or equal to 1K\r
if FvAlignmentValue >= 0x400:\r
- if FvAlignmentValue >= 0x10000:\r
- #The max alignment supported by FFS is 64K.\r
- self.FvAlignment = "64K"\r
+ if FvAlignmentValue >= 0x100000:\r
+ #The max alignment supported by FFS is 16M.\r
+ if FvAlignmentValue >= 0x1000000:\r
+ self.FvAlignment = "16M"\r
+ else:\r
+ self.FvAlignment = str(FvAlignmentValue / 0x100000) + "M"\r
else:\r
self.FvAlignment = str (FvAlignmentValue / 0x400) + "K"\r
else:\r
## @file\r
# process FV image section generation\r
#\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
# MaxFvAlignment is larger than or equal to 1K\r
if MaxFvAlignment >= 0x400:\r
- if MaxFvAlignment >= 0x10000:\r
- #The max alignment supported by FFS is 64K.\r
- self.Alignment = "64K"\r
+ if MaxFvAlignment >= 0x100000:\r
+ #The max alignment supported by FFS is 16M.\r
+ if MaxFvAlignment >=1000000:\r
+ self.Alignment = "16M"\r
+ else:\r
+ self.Alignment = str(MaxFvAlignment / 0x100000) + "M"\r
else:\r
self.Alignment = str (MaxFvAlignment / 0x400) + "K"\r
else:\r
FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)\r
# FvAlignmentValue is larger than or equal to 1K\r
if FvAlignmentValue >= 0x400:\r
- if FvAlignmentValue >= 0x10000:\r
- #The max alignment supported by FFS is 64K.\r
- self.Alignment = "64K"\r
+ if FvAlignmentValue >= 0x100000:\r
+ #The max alignment supported by FFS is 16M.\r
+ if FvAlignmentValue >= 0x1000000:\r
+ self.Alignment = "16M"\r
+ else:\r
+ self.Alignment = str(FvAlignmentValue / 0x100000) + "M"\r
else:\r
self.Alignment = str (FvAlignmentValue / 0x400) + "K"\r
else:\r
## @file\r
# Global variables for GenFds\r
#\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
def GetAlignment (AlignString):\r
if AlignString == None:\r
return 0\r
- if AlignString in ("1K", "2K", "4K", "8K", "16K", "32K", "64K"):\r
+ if AlignString in ("1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K", "512K"):\r
return int (AlignString.rstrip('K')) * 1024\r
+ elif AlignString in ("1M", "2M", "4M", "8M", "16M"):\r
+ return int (AlignString.rstrip('M')) * 1024 * 1024\r
else:\r
return int (AlignString)\r
\r
def GenerateFfs(Output, Input, Type, Guid, Fixed=False, CheckSum=False, Align=None,\r
SectionAlign=None):\r
Cmd = ["GenFfs", "-t", Type, "-g", Guid]\r
- mFfsValidAlign = ["0", "8", "16", "128", "512", "1K", "4K", "32K", "64K"]\r
+ mFfsValidAlign = ["0", "8", "16", "128", "512", "1K", "4K", "32K", "64K", "128K", "256K", "512K", "1M", "2M", "4M", "8M", "16M"]\r
if Fixed == True:\r
Cmd += ["-x"]\r
if CheckSum:\r