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>
This commit is contained in:
14
tools/binman/test/62_entry_args.dts
Normal file
14
tools/binman/test/62_entry_args.dts
Normal file
@@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
13
tools/binman/test/63_entry_args_missing.dts
Normal file
13
tools/binman/test/63_entry_args_missing.dts
Normal file
@@ -0,0 +1,13 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
_testing {
|
||||
test-str-fdt = "test0";
|
||||
};
|
||||
};
|
||||
};
|
||||
14
tools/binman/test/64_entry_args_required.dts
Normal file
14
tools/binman/test/64_entry_args_required.dts
Normal file
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
15
tools/binman/test/65_entry_args_unknown_datatype.dts
Normal file
15
tools/binman/test/65_entry_args_unknown_datatype.dts
Normal file
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user