mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-13 21:36:57 +00:00
binman: Support multiple images in the library
Add support for multiple images, since these are used on x86 now. Select the first image for now, since that is generally the correct one. At some point we can add a way to determine which image is currently running. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f4f4123708
commit
83187546ae
1 changed files with 7 additions and 0 deletions
|
@ -96,6 +96,13 @@ int binman_init(void)
|
|||
binman->image = ofnode_path("/binman");
|
||||
if (!ofnode_valid(binman->image))
|
||||
return log_msg_ret("binman node", -EINVAL);
|
||||
if (ofnode_read_bool(binman->image, "multiple-images")) {
|
||||
ofnode node = ofnode_first_subnode(binman->image);
|
||||
|
||||
if (!ofnode_valid(node))
|
||||
return log_msg_ret("first image", -ENOENT);
|
||||
binman->image = node;
|
||||
}
|
||||
binman->rom_offset = ROM_OFFSET_NONE;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue