diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-17 13:25:32 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-08-01 16:30:47 -0600 |
commit | 53af22a9958ca93c89056ad2750ad0d46a51b6c8 (patch) | |
tree | 232abf4eb746495b01b96f3540a370ae71ac1da0 /tools/binman/test | |
parent | dc08ecc90cc57d7ca73f837a847a81c8b1e8af79 (diff) | |
download | u-boot-53af22a9958ca93c89056ad2750ad0d46a51b6c8.tar.gz u-boot-53af22a9958ca93c89056ad2750ad0d46a51b6c8.tar.bz2 u-boot-53af22a9958ca93c89056ad2750ad0d46a51b6c8.zip |
binman: Add support for passing arguments to entries
Sometimes it is useful to pass binman the value of an entry property from
the command line. For example some entries need access to files and it is
not always convenient to put these filenames in the image definition
(device tree).
Add a -a option which can be used like this:
-a<prop>=<value>
where
<prop> is the property to set
<value> is the value to set it to
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/test')
-rw-r--r-- | tools/binman/test/62_entry_args.dts | 14 | ||||
-rw-r--r-- | tools/binman/test/63_entry_args_missing.dts | 13 | ||||
-rw-r--r-- | tools/binman/test/64_entry_args_required.dts | 14 | ||||
-rw-r--r-- | tools/binman/test/65_entry_args_unknown_datatype.dts | 15 |
4 files changed, 56 insertions, 0 deletions
diff --git a/tools/binman/test/62_entry_args.dts b/tools/binman/test/62_entry_args.dts new file mode 100644 index 0000000000..4d4f102d60 --- /dev/null +++ b/tools/binman/test/62_entry_args.dts @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + _testing { + test-str-fdt = "test0"; + test-int-fdt = <123>; + }; + }; +}; diff --git a/tools/binman/test/63_entry_args_missing.dts b/tools/binman/test/63_entry_args_missing.dts new file mode 100644 index 0000000000..1644e2fef3 --- /dev/null +++ b/tools/binman/test/63_entry_args_missing.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + _testing { + test-str-fdt = "test0"; + }; + }; +}; diff --git a/tools/binman/test/64_entry_args_required.dts b/tools/binman/test/64_entry_args_required.dts new file mode 100644 index 0000000000..705be10069 --- /dev/null +++ b/tools/binman/test/64_entry_args_required.dts @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + _testing { + require-args; + test-str-fdt = "test0"; + }; + }; +}; diff --git a/tools/binman/test/65_entry_args_unknown_datatype.dts b/tools/binman/test/65_entry_args_unknown_datatype.dts new file mode 100644 index 0000000000..3e4838f4ff --- /dev/null +++ b/tools/binman/test/65_entry_args_unknown_datatype.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + _testing { + test-str-fdt = "test0"; + test-int-fdt = <123>; + force-bad-datatype; + }; + }; +}; |