mirror of
https://xff.cz/git/u-boot/
synced 2025-10-28 09:03:52 +01:00
binman: Support alignment of files
When packing files it is sometimes useful to align the start of each file, e.g. if the flash driver can only access 32-bit-aligned data. Provides a new property to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -4218,6 +4218,14 @@ class TestFunctional(unittest.TestCase):
|
||||
self.assertEqual(orig_image.GetEntries().keys(),
|
||||
image.GetEntries().keys())
|
||||
|
||||
def testFilesAlign(self):
|
||||
"""Test alignment with files"""
|
||||
data = self._DoReadFile('190_files_align.dts')
|
||||
|
||||
# The first string is 15 bytes so will align to 16
|
||||
expect = FILES_DATA[:15] + b'\0' + FILES_DATA[15:]
|
||||
self.assertEqual(expect, data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user