summaryrefslogtreecommitdiffstats
path: root/tools/binman/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:29 -0600
committerSimon Glass <sjg@chromium.org>2018-09-29 11:49:35 -0600
commitba64a0bbb7b7128479a97fdf58baa9ddfbfe4db6 (patch)
treebda0f81481e31aa9563906e2049124b610652b96 /tools/binman/test
parent0a98b28b06800da48f006069fe14e47dd399d2ff (diff)
downloadu-boot-ba64a0bbb7b7128479a97fdf58baa9ddfbfe4db6.tar.gz
u-boot-ba64a0bbb7b7128479a97fdf58baa9ddfbfe4db6.tar.xz
u-boot-ba64a0bbb7b7128479a97fdf58baa9ddfbfe4db6.zip
binman: Support expanding entries
It is useful to have entries which can grow automatically to fill available space. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/88_expand_size.dts43
-rw-r--r--tools/binman/test/89_expand_size_bad.dts14
2 files changed, 57 insertions, 0 deletions
diff --git a/tools/binman/test/88_expand_size.dts b/tools/binman/test/88_expand_size.dts
new file mode 100644
index 0000000000..c8a01308ec
--- /dev/null
+++ b/tools/binman/test/88_expand_size.dts
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ size = <40>;
+ fill {
+ expand-size;
+ fill-byte = [61];
+ size = <0>;
+ };
+ u-boot {
+ offset = <8>;
+ };
+ section {
+ expand-size;
+ pad-byte = <0x62>;
+ intel-mrc {
+ };
+ };
+ u-boot2 {
+ type = "u-boot";
+ offset = <16>;
+ };
+ section2 {
+ type = "section";
+ fill {
+ expand-size;
+ fill-byte = [63];
+ size = <0>;
+ };
+ u-boot {
+ offset = <8>;
+ };
+ };
+ fill2 {
+ type = "fill";
+ expand-size;
+ fill-byte = [64];
+ size = <0>;
+ };
+ };
+};
diff --git a/tools/binman/test/89_expand_size_bad.dts b/tools/binman/test/89_expand_size_bad.dts
new file mode 100644
index 0000000000..edc0e5cf68
--- /dev/null
+++ b/tools/binman/test/89_expand_size_bad.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ _testing {
+ expand-size;
+ return-contents-once;
+ };
+ u-boot {
+ offset = <8>;
+ };
+ };
+};