summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-08-01 15:22:42 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:45 -0600
commitdbf6be9f7f3b650ae5248eb7e2c00e94b4da867c (patch)
tree4b2bb2ba21e04668b24117c72e62eaa5fa39d8a7 /common/spl
parent8122f3967f6eaab7134051d1d8c9b1bfc3babadb (diff)
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 <sjg@chromium.org>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl.c4
-rw-r--r--common/spl/spl_ram.c2
2 files changed, 3 insertions, 3 deletions
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");
/*