binman: Allow collection to use entries from other sections
At present the collections etype only works with entries in the same section. This can be limiting, since in some cases the data may be inside a subsection, e.g. if there are alignment constraints. Add a function to find the entries in an etype and have it search recursively. Make use of this for mkimage also. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
29
tools/binman/test/239_collection_other.dts
Normal file
29
tools/binman/test/239_collection_other.dts
Normal file
@@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
collection {
|
||||
content = <&u_boot_nodtb &dtb>;
|
||||
};
|
||||
section {
|
||||
fill {
|
||||
size = <2>;
|
||||
fill-byte = [ff];
|
||||
};
|
||||
u_boot_nodtb: u-boot-nodtb {
|
||||
};
|
||||
fill2 {
|
||||
type = "fill";
|
||||
size = <3>;
|
||||
fill-byte = [fe];
|
||||
};
|
||||
};
|
||||
dtb: u-boot-dtb {
|
||||
};
|
||||
};
|
||||
};
|
||||
27
tools/binman/test/240_mkimage_coll.dts
Normal file
27
tools/binman/test/240_mkimage_coll.dts
Normal file
@@ -0,0 +1,27 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
collection {
|
||||
content = <&spl &u_boot>;
|
||||
};
|
||||
mkimage {
|
||||
args = "-T script";
|
||||
|
||||
spl: u-boot-spl {
|
||||
};
|
||||
|
||||
imagename {
|
||||
type = "section";
|
||||
|
||||
u_boot: u-boot {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user