@@ -7216,5 +7216,15 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self.assertRegex(err,
"Image 'image'.*missing bintools.*: bootgen")
+ def testFitAlign(self):
+ """Test a FIT image with a fit,align property"""
+ data = self._DoReadFile('311_fit_align.dts')
+ self.assertEqual(2048, len(data))
+
+ dtb = fdt.Fdt.FromData(data)
+ dtb.Scan()
+
+ self.assertEqual(2048, dtb._fdt_obj.totalsize())
+
if __name__ == "__main__":
unittest.main()
new file mode 100644
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+ #address-cells = <1>;
+ fit,align = <2048>;
+
+ images {
+ u-boot {
+ description = "test u-boot";
+ type = "standalone";
+ arch = "arm64";
+ os = "u-boot";
+ compression = "none";
+ load = <00000000>;
+ entry = <00000000>;
+
+ u-boot-nodtb {
+ };
+ };
+
+ fdt-1 {
+ description = "test fdt";
+ type = "flat_dt";
+ compression = "none";
+
+ u-boot-dtb {
+ };
+ };
+
+ fdt-2 {
+ description = "test fdt";
+ type = "flat_dt";
+ compression = "none";
+
+ u-boot-dtb {
+ };
+ };
+ };
+
+ configurations {
+ default = "config-1";
+ config-1 {
+ description = "test config";
+ fdt = "fdt-1";
+ firmware = "u-boot";
+ };
+ };
+ };
+ };
+};
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> --- tools/binman/ftest.py | 10 +++++ tools/binman/test/311_fit_align.dts | 58 +++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tools/binman/test/311_fit_align.dts