summaryrefslogtreecommitdiff
path: root/tools/binman/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/230_pre_load.dts2
-rw-r--r--tools/binman/test/231_pre_load_pkcs.dts2
-rw-r--r--tools/binman/test/232_pre_load_pss.dts2
-rw-r--r--tools/binman/test/233_pre_load_invalid_padding.dts2
-rw-r--r--tools/binman/test/234_pre_load_invalid_sha.dts2
-rw-r--r--tools/binman/test/235_pre_load_invalid_algo.dts2
-rw-r--r--tools/binman/test/236_pre_load_invalid_key.dts2
-rw-r--r--tools/binman/test/282_symbols_disable.dts25
-rw-r--r--tools/binman/test/283_mkimage_special.dts24
-rw-r--r--tools/binman/test/284_fit_fdt_list.dts58
-rw-r--r--tools/binman/test/285_spl_expand.dts13
-rw-r--r--tools/binman/test/286_template.dts42
-rw-r--r--tools/binman/test/287_template_multi.dts27
-rw-r--r--tools/binman/test/288_template_fit.dts37
-rw-r--r--tools/binman/test/289_template_section.dts52
-rw-r--r--tools/binman/test/290_mkimage_sym.dts27
-rw-r--r--tools/binman/test/291_rockchip_tpl.dts (renamed from tools/binman/test/277_rockchip_tpl.dts)0
-rw-r--r--tools/binman/test/292_mkimage_missing_multiple.dts (renamed from tools/binman/test/278_mkimage_missing_multiple.dts)0
-rw-r--r--tools/binman/test/293_ti_board_cfg.dts14
-rw-r--r--tools/binman/test/294_ti_board_cfg_combined.dts25
-rw-r--r--tools/binman/test/295_ti_board_cfg_no_type.dts11
-rw-r--r--tools/binman/test/296_ti_secure.dts17
-rw-r--r--tools/binman/test/297_ti_secure_rom.dts17
-rw-r--r--tools/binman/test/298_ti_secure_rom_combined.dts25
-rw-r--r--tools/binman/test/299_ti_secure_rom_a.dts19
-rw-r--r--tools/binman/test/300_ti_secure_rom_b.dts18
-rw-r--r--tools/binman/test/301_encrypted_no_algo.dts15
-rw-r--r--tools/binman/test/302_encrypted_invalid_iv_file.dts18
-rw-r--r--tools/binman/test/303_encrypted_missing_key.dts23
-rw-r--r--tools/binman/test/304_encrypted_key_source.dts24
-rw-r--r--tools/binman/test/305_encrypted_key_file.dts24
-rw-r--r--tools/binman/test/306_spl_pubkey_dtb.dts16
-rw-r--r--tools/binman/test/Makefile5
-rw-r--r--tools/binman/test/bss_data.c3
-rw-r--r--tools/binman/test/bss_data_zero.c16
-rw-r--r--tools/binman/test/bss_data_zero.lds15
-rw-r--r--tools/binman/test/dev.key (renamed from tools/binman/test/230_dev.key)0
-rw-r--r--tools/binman/test/embed_data.lds1
-rw-r--r--tools/binman/test/yaml/config.yaml18
-rw-r--r--tools/binman/test/yaml/schema.yaml49
-rw-r--r--tools/binman/test/yaml/schema_notype.yaml38
41 files changed, 720 insertions, 10 deletions
diff --git a/tools/binman/test/230_pre_load.dts b/tools/binman/test/230_pre_load.dts
index c0c24729f82..e6d9ef40c6c 100644
--- a/tools/binman/test/230_pre_load.dts
+++ b/tools/binman/test/230_pre_load.dts
@@ -10,7 +10,7 @@
pre-load {
content = <&image>;
algo-name = "sha256,rsa2048";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/231_pre_load_pkcs.dts b/tools/binman/test/231_pre_load_pkcs.dts
index 530638c56b6..66268cdb212 100644
--- a/tools/binman/test/231_pre_load_pkcs.dts
+++ b/tools/binman/test/231_pre_load_pkcs.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/232_pre_load_pss.dts b/tools/binman/test/232_pre_load_pss.dts
index 371e0fdb408..3008d3f4649 100644
--- a/tools/binman/test/232_pre_load_pss.dts
+++ b/tools/binman/test/232_pre_load_pss.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pss";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/233_pre_load_invalid_padding.dts b/tools/binman/test/233_pre_load_invalid_padding.dts
index 9cb4cb570bc..bbe2d1ba869 100644
--- a/tools/binman/test/233_pre_load_invalid_padding.dts
+++ b/tools/binman/test/233_pre_load_invalid_padding.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "padding";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/234_pre_load_invalid_sha.dts b/tools/binman/test/234_pre_load_invalid_sha.dts
index 8ded98df533..29afd2e37e4 100644
--- a/tools/binman/test/234_pre_load_invalid_sha.dts
+++ b/tools/binman/test/234_pre_load_invalid_sha.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha2560,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/235_pre_load_invalid_algo.dts b/tools/binman/test/235_pre_load_invalid_algo.dts
index 145286caa3e..d6f6dd20cd9 100644
--- a/tools/binman/test/235_pre_load_invalid_algo.dts
+++ b/tools/binman/test/235_pre_load_invalid_algo.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa20480";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/236_pre_load_invalid_key.dts b/tools/binman/test/236_pre_load_invalid_key.dts
index df858c3a28b..f93bc9792cd 100644
--- a/tools/binman/test/236_pre_load_invalid_key.dts
+++ b/tools/binman/test/236_pre_load_invalid_key.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa4096";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/282_symbols_disable.dts b/tools/binman/test/282_symbols_disable.dts
new file mode 100644
index 00000000000..6efa9335041
--- /dev/null
+++ b/tools/binman/test/282_symbols_disable.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ pad-byte = <0xff>;
+ u-boot-spl {
+ no-write-symbols;
+ };
+
+ u-boot {
+ offset = <0x38>;
+ no-expanded;
+ };
+
+ u-boot-spl2 {
+ type = "u-boot-spl";
+ no-write-symbols;
+ };
+ };
+};
diff --git a/tools/binman/test/283_mkimage_special.dts b/tools/binman/test/283_mkimage_special.dts
new file mode 100644
index 00000000000..c234093e6ec
--- /dev/null
+++ b/tools/binman/test/283_mkimage_special.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+
+ u-boot {
+ };
+
+ hash {
+ };
+
+ imagename {
+ type = "u-boot";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/284_fit_fdt_list.dts b/tools/binman/test/284_fit_fdt_list.dts
new file mode 100644
index 00000000000..8885313f5b8
--- /dev/null
+++ b/tools/binman/test/284_fit_fdt_list.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-val = "test-fdt1", "test-fdt2";
+
+ 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/285_spl_expand.dts b/tools/binman/test/285_spl_expand.dts
new file mode 100644
index 00000000000..9c88ccb287b
--- /dev/null
+++ b/tools/binman/test/285_spl_expand.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-spl {
+ };
+ };
+};
diff --git a/tools/binman/test/286_template.dts b/tools/binman/test/286_template.dts
new file mode 100644
index 00000000000..6980dbfafcc
--- /dev/null
+++ b/tools/binman/test/286_template.dts
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-img {
+ };
+
+ common_part: template {
+ u-boot {
+ };
+
+ intel-vga {
+ filename = "vga.bin";
+ };
+ };
+
+ first {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+
+ intel-vga {
+ filename = "vga2.bin";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/287_template_multi.dts b/tools/binman/test/287_template_multi.dts
new file mode 100644
index 00000000000..122bfccd565
--- /dev/null
+++ b/tools/binman/test/287_template_multi.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+/ {
+ binman: binman {
+ multiple-images;
+
+ my_template: template {
+ blob-ext@0 {
+ filename = "my-blob.bin";
+ offset = <0>;
+ };
+ blob-ext@8 {
+ offset = <8>;
+ };
+ };
+
+ image {
+ pad-byte = <0x40>;
+ filename = "my-image.bin";
+ insert-template = <&my_template>;
+ blob-ext@8 {
+ filename = "my-blob2.bin";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/288_template_fit.dts b/tools/binman/test/288_template_fit.dts
new file mode 100644
index 00000000000..d84dca4ea41
--- /dev/null
+++ b/tools/binman/test/288_template_fit.dts
@@ -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 {
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/289_template_section.dts b/tools/binman/test/289_template_section.dts
new file mode 100644
index 00000000000..8a744a0cf68
--- /dev/null
+++ b/tools/binman/test/289_template_section.dts
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-img {
+ };
+
+ common_part: template {
+ u-boot {
+ };
+
+ intel-vga {
+ filename = "vga.bin";
+ };
+ };
+
+ first {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+
+ section {
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+
+ intel-vga {
+ filename = "vga2.bin";
+ };
+ };
+ };
+
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/290_mkimage_sym.dts b/tools/binman/test/290_mkimage_sym.dts
new file mode 100644
index 00000000000..2dfd286ad44
--- /dev/null
+++ b/tools/binman/test/290_mkimage_sym.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-dtb {
+ };
+
+ mkimage {
+ args = "-n test -T script";
+
+ u-boot-spl {
+ };
+
+ u-boot-spl2 {
+ type = "u-boot-spl";
+ };
+ };
+
+ u-boot {
+ };
+ };
+};
diff --git a/tools/binman/test/277_rockchip_tpl.dts b/tools/binman/test/291_rockchip_tpl.dts
index 269f56e2545..269f56e2545 100644
--- a/tools/binman/test/277_rockchip_tpl.dts
+++ b/tools/binman/test/291_rockchip_tpl.dts
diff --git a/tools/binman/test/278_mkimage_missing_multiple.dts b/tools/binman/test/292_mkimage_missing_multiple.dts
index f84aea49ead..f84aea49ead 100644
--- a/tools/binman/test/278_mkimage_missing_multiple.dts
+++ b/tools/binman/test/292_mkimage_missing_multiple.dts
diff --git a/tools/binman/test/293_ti_board_cfg.dts b/tools/binman/test/293_ti_board_cfg.dts
new file mode 100644
index 00000000000..cda024c1b8c
--- /dev/null
+++ b/tools/binman/test/293_ti_board_cfg.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-board-config {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ };
+};
diff --git a/tools/binman/test/294_ti_board_cfg_combined.dts b/tools/binman/test/294_ti_board_cfg_combined.dts
new file mode 100644
index 00000000000..95ef449cbf4
--- /dev/null
+++ b/tools/binman/test/294_ti_board_cfg_combined.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ ti-board-config {
+ board-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ sec-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ rm-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ pm-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/295_ti_board_cfg_no_type.dts b/tools/binman/test/295_ti_board_cfg_no_type.dts
new file mode 100644
index 00000000000..584b7acc5a4
--- /dev/null
+++ b/tools/binman/test/295_ti_board_cfg_no_type.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ ti-board-config {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema_notype.yaml";
+ };
+ };
+};
diff --git a/tools/binman/test/296_ti_secure.dts b/tools/binman/test/296_ti_secure.dts
new file mode 100644
index 00000000000..941d0ab4ca3
--- /dev/null
+++ b/tools/binman/test/296_ti_secure.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure {
+ content = <&unsecure_binary>;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/297_ti_secure_rom.dts b/tools/binman/test/297_ti_secure_rom.dts
new file mode 100644
index 00000000000..d1313769f43
--- /dev/null
+++ b/tools/binman/test/297_ti_secure_rom.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/298_ti_secure_rom_combined.dts b/tools/binman/test/298_ti_secure_rom_combined.dts
new file mode 100644
index 00000000000..bf872739bc1
--- /dev/null
+++ b/tools/binman/test/298_ti_secure_rom_combined.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ content-sbl = <&unsecure_binary>;
+ content-sysfw = <&unsecure_binary>;
+ content-sysfw-data = <&unsecure_binary>;
+ content-sysfw-inner-cert = <&unsecure_binary>;
+ content-dm-data = <&unsecure_binary>;
+ combined;
+ sysfw-inner-cert;
+ dm-data;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/299_ti_secure_rom_a.dts b/tools/binman/test/299_ti_secure_rom_a.dts
new file mode 100644
index 00000000000..887138f0e4b
--- /dev/null
+++ b/tools/binman/test/299_ti_secure_rom_a.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ core = "secure";
+ countersign;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/300_ti_secure_rom_b.dts b/tools/binman/test/300_ti_secure_rom_b.dts
new file mode 100644
index 00000000000..c6d6182158c
--- /dev/null
+++ b/tools/binman/test/300_ti_secure_rom_b.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ core = "public";
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/301_encrypted_no_algo.dts b/tools/binman/test/301_encrypted_no_algo.dts
new file mode 100644
index 00000000000..03f7ffee90f
--- /dev/null
+++ b/tools/binman/test/301_encrypted_no_algo.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ fit {
+ images {
+ u-boot {
+ encrypted {
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/302_encrypted_invalid_iv_file.dts b/tools/binman/test/302_encrypted_invalid_iv_file.dts
new file mode 100644
index 00000000000..388a0a6ad90
--- /dev/null
+++ b/tools/binman/test/302_encrypted_invalid_iv_file.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ fit {
+ images {
+ u-boot {
+ encrypted {
+ algo = "some-algo";
+ key-source = "key";
+ iv-filename = "invalid-iv-file";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/303_encrypted_missing_key.dts b/tools/binman/test/303_encrypted_missing_key.dts
new file mode 100644
index 00000000000..d1daaa08851
--- /dev/null
+++ b/tools/binman/test/303_encrypted_missing_key.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ iv-filename = "encrypted-file.iv";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/304_encrypted_key_source.dts b/tools/binman/test/304_encrypted_key_source.dts
new file mode 100644
index 00000000000..884ec508db8
--- /dev/null
+++ b/tools/binman/test/304_encrypted_key_source.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ key-source = "key-source-value";
+ iv-filename = "encrypted-file.iv";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/305_encrypted_key_file.dts b/tools/binman/test/305_encrypted_key_file.dts
new file mode 100644
index 00000000000..efd7ee5f35a
--- /dev/null
+++ b/tools/binman/test/305_encrypted_key_file.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ iv-filename = "encrypted-file.iv";
+ key-filename = "encrypted-file.key";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/306_spl_pubkey_dtb.dts b/tools/binman/test/306_spl_pubkey_dtb.dts
new file mode 100644
index 00000000000..3256ff970cd
--- /dev/null
+++ b/tools/binman/test/306_spl_pubkey_dtb.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-spl-pubkey-dtb {
+ algo = "sha384,rsa4096";
+ required = "conf";
+ key-name-hint = "key";
+ };
+ };
+};
diff --git a/tools/binman/test/Makefile b/tools/binman/test/Makefile
index cd66a3038be..4d152eee9c0 100644
--- a/tools/binman/test/Makefile
+++ b/tools/binman/test/Makefile
@@ -32,7 +32,7 @@ LDS_BINMAN_EMBED := -T $(SRC)u_boot_binman_embed.lds
LDS_EFL_SECTIONS := -T $(SRC)elf_sections.lds
LDS_BLOB := -T $(SRC)blob_syms.lds
-TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data \
+TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data bss_data_zero \
u_boot_binman_syms u_boot_binman_syms.bin u_boot_binman_syms_bad \
u_boot_binman_syms_size u_boot_binman_syms_x86 embed_data \
u_boot_binman_embed u_boot_binman_embed_sm elf_sections blob_syms.bin
@@ -48,6 +48,9 @@ u_boot_ucode_ptr: u_boot_ucode_ptr.c
bss_data: CFLAGS += $(SRC)bss_data.lds
bss_data: bss_data.c
+bss_data_zero: CFLAGS += $(SRC)bss_data_zero.lds
+bss_data_zero: bss_data_zero.c
+
embed_data: CFLAGS += $(SRC)embed_data.lds
embed_data: embed_data.c
diff --git a/tools/binman/test/bss_data.c b/tools/binman/test/bss_data.c
index 4f9b64cef9e..7047a3bb014 100644
--- a/tools/binman/test/bss_data.c
+++ b/tools/binman/test/bss_data.c
@@ -7,9 +7,8 @@
*/
int bss_data[10];
-int __bss_size = sizeof(bss_data);
-int main()
+int main(void)
{
bss_data[2] = 2;
diff --git a/tools/binman/test/bss_data_zero.c b/tools/binman/test/bss_data_zero.c
new file mode 100644
index 00000000000..7047a3bb014
--- /dev/null
+++ b/tools/binman/test/bss_data_zero.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2016 Google, Inc
+ *
+ * Simple program to create a bss_data region so the symbol can be read
+ * by binutils. This is used by binman tests.
+ */
+
+int bss_data[10];
+
+int main(void)
+{
+ bss_data[2] = 2;
+
+ return 0;
+}
diff --git a/tools/binman/test/bss_data_zero.lds b/tools/binman/test/bss_data_zero.lds
new file mode 100644
index 00000000000..8fa0210a8f4
--- /dev/null
+++ b/tools/binman/test/bss_data_zero.lds
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2016 Google, Inc
+ */
+
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(_start)
+
+SECTIONS
+{
+ . = 0xfffffdf0;
+ _start = .;
+ __bss_size = 0;
+}
diff --git a/tools/binman/test/230_dev.key b/tools/binman/test/dev.key
index b36bad2cfb3..b36bad2cfb3 100644
--- a/tools/binman/test/230_dev.key
+++ b/tools/binman/test/dev.key
diff --git a/tools/binman/test/embed_data.lds b/tools/binman/test/embed_data.lds
index 908bf66c294..d416cb21110 100644
--- a/tools/binman/test/embed_data.lds
+++ b/tools/binman/test/embed_data.lds
@@ -17,6 +17,7 @@ SECTIONS
embed_start = .;
*(.embed*)
embed_end = .;
+ region_size = 0;
. = ALIGN(32);
*(.data*)
}
diff --git a/tools/binman/test/yaml/config.yaml b/tools/binman/test/yaml/config.yaml
new file mode 100644
index 00000000000..5f799a6e3a9
--- /dev/null
+++ b/tools/binman/test/yaml/config.yaml
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test config
+#
+---
+
+main-branch:
+ obj:
+ a: 0x0
+ b: 0
+ arr: [0, 0, 0, 0]
+ another-arr:
+ - #1
+ c: 0
+ d: 0
+ - #2
+ c: 0
+ d: 0
diff --git a/tools/binman/test/yaml/schema.yaml b/tools/binman/test/yaml/schema.yaml
new file mode 100644
index 00000000000..8aa03f3c8ec
--- /dev/null
+++ b/tools/binman/test/yaml/schema.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test schema
+#
+---
+
+definitions:
+ u8:
+ type: integer
+ minimum: 0
+ maximum: 0xff
+ u16:
+ type: integer
+ minimum: 0
+ maximum: 0xffff
+ u32:
+ type: integer
+ minimum: 0
+ maximum: 0xffffffff
+
+type: object
+properties:
+ main-branch:
+ type: object
+ properties:
+ obj:
+ type: object
+ properties:
+ a:
+ $ref: "#/definitions/u32"
+ b:
+ $ref: "#/definitions/u16"
+ arr:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+ another-arr:
+ type: array
+ minItems: 2
+ maxItems: 2
+ items:
+ type: object
+ properties:
+ c:
+ $ref: "#/definitions/u8"
+ d:
+ $ref: "#/definitions/u8"
diff --git a/tools/binman/test/yaml/schema_notype.yaml b/tools/binman/test/yaml/schema_notype.yaml
new file mode 100644
index 00000000000..6b4d98ffa18
--- /dev/null
+++ b/tools/binman/test/yaml/schema_notype.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test schema
+#
+---
+
+definitions:
+ u8:
+ type: integer
+ minimum: 0
+ maximum: 0xff
+ u16:
+ type: integer
+ minimum: 0
+ maximum: 0xffff
+ u32:
+ type: integer
+ minimum: 0
+ maximum: 0xffffffff
+
+type: object
+properties:
+ main-branch:
+ type: object
+ properties:
+ obj:
+ type: object
+ properties:
+ a:
+ $ref: "#/definitions/u4"
+ b:
+ $ref: "#/definitions/u16"
+ arr:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"