summaryrefslogtreecommitdiffstats
path: root/tools/binman/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-06 10:35:33 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-09-25 11:27:28 +0800
commitfb91d5675edf9a45141b69740f10979e221dd72e (patch)
treee3b99d14cf116cdcb1c45581500486ec306ead18 /tools/binman/test
parent204aa78e04a290c6836bdb29ba466b9cdfcec3ea (diff)
downloadu-boot-fb91d5675edf9a45141b69740f10979e221dd72e.tar.gz
u-boot-fb91d5675edf9a45141b69740f10979e221dd72e.tar.xz
u-boot-fb91d5675edf9a45141b69740f10979e221dd72e.zip
binman: Support adding a U-Boot environment
In some cases it is useful to include a U-Boot environment region in an image. This allows the board to start up with an environment ready to go. Add a new entry type for this. The input is a text file containing the environment entries, one per line, in the format: var=value Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/binman/test')
-rw-r--r--tools/binman/test/174_env.dts20
-rw-r--r--tools/binman/test/175_env_no_size.dts19
-rw-r--r--tools/binman/test/176_env_too_small.dts20
3 files changed, 59 insertions, 0 deletions
diff --git a/tools/binman/test/174_env.dts b/tools/binman/test/174_env.dts
new file mode 100644
index 0000000000..d1393d2db9
--- /dev/null
+++ b/tools/binman/test/174_env.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-env {
+ filename = "env.txt";
+ size = <0x18>;
+ fill-byte = [ff];
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/175_env_no_size.dts b/tools/binman/test/175_env_no_size.dts
new file mode 100644
index 0000000000..267acd1549
--- /dev/null
+++ b/tools/binman/test/175_env_no_size.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-env {
+ filename = "env.txt";
+ fill-byte = [ff];
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/176_env_too_small.dts b/tools/binman/test/176_env_too_small.dts
new file mode 100644
index 0000000000..2db8d05463
--- /dev/null
+++ b/tools/binman/test/176_env_too_small.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ u-boot-env {
+ filename = "env.txt";
+ size = <0x8>;
+ fill-byte = [ff];
+ };
+ u-boot-nodtb {
+ };
+ };
+};