summaryrefslogtreecommitdiff
path: root/tools/binman/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-06 10:27:42 -0600
committerSimon Glass <sjg@chromium.org>2018-07-09 09:11:00 -0600
commit16b8d6b76992690c65c58dc8b0591496cc5e46ef (patch)
tree193945e290312a24554291be13545d13546c4155 /tools/binman/test
parent078ab1a2f5a9901f5f9983163d4f98b8d94bfda0 (diff)
binman: Support updating the device tree with calc'd info
It is useful to write the position and size of each entry back to the device tree so that U-Boot can access this at runtime. Add a feature to support this, along with associated tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/60_fdt_update.dts31
-rw-r--r--tools/binman/test/61_fdt_update_bad.dts32
2 files changed, 63 insertions, 0 deletions
diff --git a/tools/binman/test/60_fdt_update.dts b/tools/binman/test/60_fdt_update.dts
new file mode 100644
index 00000000000..f53c8a5053e
--- /dev/null
+++ b/tools/binman/test/60_fdt_update.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ pad-byte = <0x26>;
+ size = <0x28>;
+ section@0 {
+ read-only;
+ name-prefix = "ro-";
+ size = <0x10>;
+ pad-byte = <0x21>;
+
+ u-boot {
+ };
+ };
+ section@1 {
+ name-prefix = "rw-";
+ size = <0x10>;
+ pad-byte = <0x61>;
+
+ u-boot {
+ };
+ };
+ _testing {
+ };
+ };
+};
diff --git a/tools/binman/test/61_fdt_update_bad.dts b/tools/binman/test/61_fdt_update_bad.dts
new file mode 100644
index 00000000000..e5abf31699c
--- /dev/null
+++ b/tools/binman/test/61_fdt_update_bad.dts
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ pad-byte = <0x26>;
+ size = <0x28>;
+ section@0 {
+ read-only;
+ name-prefix = "ro-";
+ size = <0x10>;
+ pad-byte = <0x21>;
+
+ u-boot {
+ };
+ };
+ section@1 {
+ name-prefix = "rw-";
+ size = <0x10>;
+ pad-byte = <0x61>;
+
+ u-boot {
+ };
+ };
+ _testing {
+ never-complete-process-fdt;
+ };
+ };
+};