summaryrefslogtreecommitdiff
path: root/tools/binman/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/235_compress_dtb_prepend_invalid.dts17
-rw-r--r--tools/binman/test/235_mkimage_name.dts18
-rw-r--r--tools/binman/test/236_compress_dtb_prepend_length.dts19
-rw-r--r--tools/binman/test/236_mkimage_image.dts21
-rw-r--r--tools/binman/test/237_compress_dtb_invalid.dts16
-rw-r--r--tools/binman/test/237_mkimage_image_no_content.dts22
-rw-r--r--tools/binman/test/238_compress_dtb_zstd.dts16
-rw-r--r--tools/binman/test/238_mkimage_image_bad.dts22
-rw-r--r--tools/binman/test/239_collection_other.dts29
-rw-r--r--tools/binman/test/240_mkimage_coll.dts27
10 files changed, 207 insertions, 0 deletions
diff --git a/tools/binman/test/235_compress_dtb_prepend_invalid.dts b/tools/binman/test/235_compress_dtb_prepend_invalid.dts
new file mode 100644
index 0000000000..ee32670a91
--- /dev/null
+++ b/tools/binman/test/235_compress_dtb_prepend_invalid.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-dtb {
+ compress = "lz4";
+ prepend = "invalid";
+ };
+ };
+};
diff --git a/tools/binman/test/235_mkimage_name.dts b/tools/binman/test/235_mkimage_name.dts
new file mode 100644
index 0000000000..fbc82f1f8d
--- /dev/null
+++ b/tools/binman/test/235_mkimage_name.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+ data-to-imagename;
+
+ u-boot-spl {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/236_compress_dtb_prepend_length.dts b/tools/binman/test/236_compress_dtb_prepend_length.dts
new file mode 100644
index 0000000000..1570233637
--- /dev/null
+++ b/tools/binman/test/236_compress_dtb_prepend_length.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-dtb {
+ compress = "lz4";
+ prepend = "length";
+ };
+ fdtmap {
+ };
+ };
+};
diff --git a/tools/binman/test/236_mkimage_image.dts b/tools/binman/test/236_mkimage_image.dts
new file mode 100644
index 0000000000..6b8f4a4a40
--- /dev/null
+++ b/tools/binman/test/236_mkimage_image.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+
+ imagename {
+ type = "u-boot";
+ };
+
+ u-boot-spl {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/237_compress_dtb_invalid.dts b/tools/binman/test/237_compress_dtb_invalid.dts
new file mode 100644
index 0000000000..228139060b
--- /dev/null
+++ b/tools/binman/test/237_compress_dtb_invalid.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-dtb {
+ compress = "invalid";
+ };
+ };
+};
diff --git a/tools/binman/test/237_mkimage_image_no_content.dts b/tools/binman/test/237_mkimage_image_no_content.dts
new file mode 100644
index 0000000000..7306c06af4
--- /dev/null
+++ b/tools/binman/test/237_mkimage_image_no_content.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+
+ imagename {
+ type = "_testing";
+ return-unknown-contents;
+ };
+
+ u-boot-spl {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/238_compress_dtb_zstd.dts b/tools/binman/test/238_compress_dtb_zstd.dts
new file mode 100644
index 0000000000..90cf85d1e2
--- /dev/null
+++ b/tools/binman/test/238_compress_dtb_zstd.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-dtb {
+ compress = "zstd";
+ };
+ };
+};
diff --git a/tools/binman/test/238_mkimage_image_bad.dts b/tools/binman/test/238_mkimage_image_bad.dts
new file mode 100644
index 0000000000..54d2c99d62
--- /dev/null
+++ b/tools/binman/test/238_mkimage_image_bad.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+ data-to-imagename;
+
+ imagename {
+ type = "u-boot";
+ };
+
+ u-boot-spl {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/239_collection_other.dts b/tools/binman/test/239_collection_other.dts
new file mode 100644
index 0000000000..09de20e5bc
--- /dev/null
+++ b/tools/binman/test/239_collection_other.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ collection {
+ content = <&u_boot_nodtb &dtb>;
+ };
+ section {
+ fill {
+ size = <2>;
+ fill-byte = [ff];
+ };
+ u_boot_nodtb: u-boot-nodtb {
+ };
+ fill2 {
+ type = "fill";
+ size = <3>;
+ fill-byte = [fe];
+ };
+ };
+ dtb: u-boot-dtb {
+ };
+ };
+};
diff --git a/tools/binman/test/240_mkimage_coll.dts b/tools/binman/test/240_mkimage_coll.dts
new file mode 100644
index 0000000000..3086011886
--- /dev/null
+++ b/tools/binman/test/240_mkimage_coll.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ collection {
+ content = <&spl &u_boot>;
+ };
+ mkimage {
+ args = "-T script";
+
+ spl: u-boot-spl {
+ };
+
+ imagename {
+ type = "section";
+
+ u_boot: u-boot {
+ };
+ };
+ };
+ };
+};