summaryrefslogtreecommitdiff
path: root/tools/dtoc/test_fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-07 07:35:18 +0300
committerSimon Glass <sjg@chromium.org>2021-01-31 00:25:41 +0300
commit6eb9932668fa6bd8c659484b2d18d8a73713208c (patch)
tree6c4b726aaceedc0f28c522457dc14438a86316e9 /tools/dtoc/test_fdt.py
parent5af9ebc4bcbcca91b21257c18cb94c78e7356980 (diff)
downloadu-boot-6eb9932668fa6bd8c659484b2d18d8a73713208c.tar.xz
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>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-xtools/dtoc/test_fdt.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index dc6943f733..e8fbbd5d10 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -397,6 +397,12 @@ class TestProp(unittest.TestCase):
data = self.fdt.getprop(self.node.Offset(), 'one')
self.assertEqual(1, fdt32_to_cpu(data))
+ val = 1234
+ self.node.AddInt('integer', val)
+ self.dtb.Sync(auto_resize=True)
+ data = self.fdt.getprop(self.node.Offset(), 'integer')
+ self.assertEqual(val, fdt32_to_cpu(data))
+
val = '123' + chr(0) + '456'
self.node.AddString('string', val)
self.dtb.Sync(auto_resize=True)