summaryrefslogtreecommitdiff
path: root/tools/binman/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/328_alternates_fdt.dts28
-rw-r--r--tools/binman/test/329_alternates_fdtgrep.dts29
-rw-r--r--tools/binman/test/330_alternates_vpl.dts29
-rw-r--r--tools/binman/test/331_alternates_spl.dts29
-rw-r--r--tools/binman/test/332_alternates_inval.dts29
-rw-r--r--tools/binman/test/333_fit_fdt_dir.dts58
-rw-r--r--tools/binman/test/334_fit_fdt_compat.dts60
-rw-r--r--tools/binman/test/335_fit_fdt_phase.dts61
-rw-r--r--tools/binman/test/alt_dts/model1.dts24
-rw-r--r--tools/binman/test/alt_dts/model2.dts24
10 files changed, 371 insertions, 0 deletions
diff --git a/tools/binman/test/328_alternates_fdt.dts b/tools/binman/test/328_alternates_fdt.dts
new file mode 100644
index 00000000000..c913c8e4745
--- /dev/null
+++ b/tools/binman/test/328_alternates_fdt.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "model-not-set";
+
+ binman {
+ alternates-fdt {
+ fdt-list-dir = "dtb";
+ filename-pattern = "NAME.bin";
+
+ section {
+ u-boot-tpl {
+ };
+ };
+ };
+
+ blob {
+ filename = "blobfile";
+ };
+ };
+};
diff --git a/tools/binman/test/329_alternates_fdtgrep.dts b/tools/binman/test/329_alternates_fdtgrep.dts
new file mode 100644
index 00000000000..41695281456
--- /dev/null
+++ b/tools/binman/test/329_alternates_fdtgrep.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "model-not-set";
+
+ binman {
+ alternates-fdt {
+ fdt-list-dir = "dtb";
+ filename-pattern = "NAME.bin";
+ fdt-phase = "tpl";
+
+ section {
+ u-boot-tpl {
+ };
+ };
+ };
+
+ blob {
+ filename = "blobfile";
+ };
+ };
+};
diff --git a/tools/binman/test/330_alternates_vpl.dts b/tools/binman/test/330_alternates_vpl.dts
new file mode 100644
index 00000000000..5b57069e2ab
--- /dev/null
+++ b/tools/binman/test/330_alternates_vpl.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "model-not-set";
+
+ binman {
+ alternates-fdt {
+ fdt-list-dir = "dtb";
+ filename-pattern = "NAME.bin";
+ fdt-phase = "vpl";
+
+ section {
+ u-boot-vpl {
+ };
+ };
+ };
+
+ blob {
+ filename = "blobfile";
+ };
+ };
+};
diff --git a/tools/binman/test/331_alternates_spl.dts b/tools/binman/test/331_alternates_spl.dts
new file mode 100644
index 00000000000..882fefce34a
--- /dev/null
+++ b/tools/binman/test/331_alternates_spl.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "model-not-set";
+
+ binman {
+ alternates-fdt {
+ fdt-list-dir = "dtb";
+ filename-pattern = "NAME.bin";
+ fdt-phase = "spl";
+
+ section {
+ u-boot-spl {
+ };
+ };
+ };
+
+ blob {
+ filename = "blobfile";
+ };
+ };
+};
diff --git a/tools/binman/test/332_alternates_inval.dts b/tools/binman/test/332_alternates_inval.dts
new file mode 100644
index 00000000000..8c145dd2449
--- /dev/null
+++ b/tools/binman/test/332_alternates_inval.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "model-not-set";
+
+ binman {
+ alternates-fdt {
+ fdt-list-dir = "dtb";
+ filename-pattern = "NAME.bin";
+ fdt-phase = "bad-phase";
+
+ section {
+ u-boot-spl {
+ };
+ };
+ };
+
+ blob {
+ filename = "blobfile";
+ };
+ };
+};
diff --git a/tools/binman/test/333_fit_fdt_dir.dts b/tools/binman/test/333_fit_fdt_dir.dts
new file mode 100644
index 00000000000..aa778451a4b
--- /dev/null
+++ b/tools/binman/test/333_fit_fdt_dir.dts
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ fit {
+ description = "test-desc";
+ #address-cells = <1>;
+ fit,fdt-list-dir = "fdts";
+
+ images {
+ kernel {
+ description = "Vanilla Linux kernel";
+ type = "kernel";
+ arch = "ppc";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+ hash-1 {
+ algo = "crc32";
+ };
+ hash-2 {
+ algo = "sha1";
+ };
+ u-boot {
+ };
+ };
+ @fdt-SEQ {
+ description = "fdt-NAME.dtb";
+ type = "flat_dt";
+ compression = "none";
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "@config-DEFAULT-SEQ";
+ @config-SEQ {
+ description = "conf-NAME.dtb";
+ firmware = "uboot";
+ loadables = "atf";
+ fdt = "fdt-SEQ";
+ };
+ };
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/334_fit_fdt_compat.dts b/tools/binman/test/334_fit_fdt_compat.dts
new file mode 100644
index 00000000000..3bf45c710db
--- /dev/null
+++ b/tools/binman/test/334_fit_fdt_compat.dts
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ fit {
+ description = "test-desc";
+ #address-cells = <1>;
+ fit,fdt-list = "of-list";
+
+ images {
+ kernel {
+ description = "Vanilla Linux kernel";
+ type = "kernel";
+ arch = "ppc";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+ hash-1 {
+ algo = "crc32";
+ };
+ hash-2 {
+ algo = "sha1";
+ };
+ u-boot {
+ };
+ };
+ @fdt-SEQ {
+ description = "fdt-NAME.dtb";
+ type = "flat_dt";
+ compression = "none";
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "@config-DEFAULT-SEQ";
+ @config-SEQ {
+ description = "conf-NAME.dtb";
+ firmware = "uboot";
+ loadables = "atf";
+ fdt = "fdt-SEQ";
+ fit,firmware = "vpl";
+ fit,compatible;
+ };
+ };
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/335_fit_fdt_phase.dts b/tools/binman/test/335_fit_fdt_phase.dts
new file mode 100644
index 00000000000..f8d0740a394
--- /dev/null
+++ b/tools/binman/test/335_fit_fdt_phase.dts
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ fit {
+ description = "test-desc";
+ #address-cells = <1>;
+ fit,fdt-list = "of-list";
+
+ images {
+ kernel {
+ description = "Vanilla Linux kernel";
+ type = "kernel";
+ arch = "ppc";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+ hash-1 {
+ algo = "crc32";
+ };
+ hash-2 {
+ algo = "sha1";
+ };
+ u-boot {
+ };
+ };
+ @fdt-SEQ {
+ description = "fdt-NAME.dtb";
+ type = "flat_dt";
+ compression = "none";
+ fit,fdt-phase = "tpl";
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "@config-DEFAULT-SEQ";
+ @config-SEQ {
+ description = "conf-NAME.dtb";
+ firmware = "uboot";
+ loadables = "atf";
+ fdt = "fdt-SEQ";
+ fit,firmware = "tpl";
+ fit,compatible;
+ };
+ };
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/alt_dts/model1.dts b/tools/binman/test/alt_dts/model1.dts
new file mode 100644
index 00000000000..01e95e8fabe
--- /dev/null
+++ b/tools/binman/test/alt_dts/model1.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ model = "Model One";
+ compatible = "u-boot,model-one";
+
+ /* this node remains due to bootph-pre-sram tag */
+ node {
+ some-prop;
+ prop-to-remove;
+ another-prop-to-get-rid-of;
+ not-a-prop-to-remove;
+ bootph-pre-sram;
+
+ /* this node get removed by fdtgrep */
+ other-node {
+ another-prop;
+ };
+ };
+};
diff --git a/tools/binman/test/alt_dts/model2.dts b/tools/binman/test/alt_dts/model2.dts
new file mode 100644
index 00000000000..7829c519772
--- /dev/null
+++ b/tools/binman/test/alt_dts/model2.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2024 Google LLC
+// Written by Simon Glass <[email protected]>
+
+/dts-v1/;
+
+/ {
+ model = "Model Two";
+ compatible = "u-boot,model-two";
+
+ /* this node remains due to bootph-pre-sram tag */
+ node {
+ some-prop;
+ prop-to-remove;
+ another-prop-to-get-rid-of;
+ not-a-prop-to-remove;
+ bootph-pre-sram;
+
+ /* this node get removed by fdtgrep */
+ other-node {
+ another-prop;
+ };
+ };
+};