From dbf6be9f7f3b650ae5248eb7e2c00e94b4da867c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 1 Aug 2018 15:22:42 -0600 Subject: binman: Add a new 'image-pos' property At present each entry has an offset within its parent section. This is useful for figuring out how entries relate to one another. However it is sometimes necessary to locate an entry within an image, regardless of which sections it is nested inside. Add a new 'image-pos' property to provide this information. Also add some documentation for the -u option binman provides, which updates the device tree with final entry information. Since the image position is a better symbol to use for the position of U-Boot as obtained by SPL, update the SPL symbols to use this instead of offset, which might be incorrect if hierarchical sections are used. Signed-off-by: Simon Glass --- common/spl/spl.c | 4 ++-- common/spl/spl_ram.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'common/spl') diff --git a/common/spl/spl.c b/common/spl/spl.c index b959aa0254..eda84d0c74 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; u32 *boot_params_ptr = NULL; /* See spl.h for information about this */ -binman_sym_declare(ulong, u_boot_any, offset); +binman_sym_declare(ulong, u_boot_any, image_pos); /* Define board data structure */ static bd_t bdata __attribute__ ((section(".data"))); @@ -129,7 +129,7 @@ __weak void spl_board_prepare_for_boot(void) void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, offset); + ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); spl_image->size = CONFIG_SYS_MONITOR_LEN; diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 6000f495cc..e594beaeaa 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -49,7 +49,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, load.read = spl_ram_load_read; spl_load_simple_fit(spl_image, &load, 0, header); } else { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, offset); + ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); debug("Legacy image\n"); /* -- cgit