mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-06 05:06:13 +02:00
binman: Add a test for templating in a FIT
Add this as a separate test case. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
35f72fb55a
commit
db0e3f13b4
@ -6805,6 +6805,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
|
||||
data = tools.read_file(image_fname)
|
||||
self.assertEqual(b'blob@@@@other', data)
|
||||
|
||||
def testTemplateFit(self):
|
||||
"""Test using a template in a FIT"""
|
||||
fit_data = self._DoReadFile('288_template_fit.dts')
|
||||
fname = os.path.join(self._indir, 'fit_data.fit')
|
||||
tools.write_file(fname, fit_data)
|
||||
out = tools.run('dumpimage', '-l', fname)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
37
tools/binman/test/288_template_fit.dts
Normal file
37
tools/binman/test/288_template_fit.dts
Normal file
@ -0,0 +1,37 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
binman: binman {
|
||||
multiple-images;
|
||||
|
||||
my_template: template {
|
||||
fit@0 {
|
||||
images {
|
||||
kernel-1 {
|
||||
};
|
||||
kernel-2 {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
image {
|
||||
filename = "image.bin";
|
||||
insert-template = <&my_template>;
|
||||
|
||||
fit@0 {
|
||||
description = "desc";
|
||||
configurations {
|
||||
};
|
||||
images {
|
||||
kernel-3 {
|
||||
};
|
||||
kernel-4 {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user