summaryrefslogtreecommitdiff
path: root/tools/binman/test
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-08-22 12:41:07 -0400
committerTom Rini <[email protected]>2022-08-22 12:41:07 -0400
commit850ac7ceb75d2f86f0feae48ee77ee663dcd29d5 (patch)
tree5d70681ddd31ad0cb69ad7900a9956aaae8aba51 /tools/binman/test
parent61e887fb9cbb6e1d64c2383a865f79ed3570bcf8 (diff)
parentcd15b640b0b8d5a7ba5f1c0587e4f9c767e2d8fb (diff)
Merge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm
binman fixes for various things binman clean-up of compression and addition of utilities
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 00000000000..ee32670a913
--- /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 00000000000..fbc82f1f8d6
--- /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 00000000000..1570233637a
--- /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 00000000000..6b8f4a4a401
--- /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 00000000000..228139060bc
--- /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 00000000000..7306c06af45
--- /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 00000000000..90cf85d1e2c
--- /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 00000000000..54d2c99d628
--- /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 00000000000..09de20e5bca
--- /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 00000000000..30860118860
--- /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 {
+ };
+ };
+ };
+ };
+};