diff options
author | Tom Rini <trini@konsulko.com> | 2020-10-30 15:24:30 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-30 15:24:30 -0400 |
commit | 63d4607e03e5f1f7ab9a18bc640e31f7d28874b4 (patch) | |
tree | bdea1f28ad176fcd44f209bf943d25c8bddbe8d2 /lib | |
parent | 096912b5fe9bb2fd90599d86a714001df6924198 (diff) | |
parent | 2424057b2ad0eacdd2d81e35e7bea5df97802b8f (diff) | |
download | u-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.zip u-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.tar.gz u-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.tar.bz2 |
Merge tag 'dm-pull-30oct20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
of-platdata and dtoc improvements
sandbox SPL tests
binman support for compressed sections
Diffstat (limited to 'lib')
-rw-r--r-- | lib/binman.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/binman.c b/lib/binman.c index 7a8ad62..e71c1b9 100644 --- a/lib/binman.c +++ b/lib/binman.c @@ -43,7 +43,7 @@ static int binman_entry_find_internal(ofnode node, const char *name, ret = ofnode_read_u32(node, "image-pos", &entry->image_pos); if (ret) - return log_msg_ret("import-pos", ret); + return log_msg_ret("image-pos", ret); ret = ofnode_read_u32(node, "size", &entry->size); if (ret) return log_msg_ret("size", ret); @@ -83,6 +83,11 @@ void binman_set_rom_offset(int rom_offset) binman->rom_offset = rom_offset; } +int binman_get_rom_offset(void) +{ + return binman->rom_offset; +} + int binman_init(void) { binman = malloc(sizeof(struct binman_info)); @@ -91,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; |