aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/etype
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-24 07:23:05 -0600
committerSimon Glass <sjg@chromium.org>2019-10-15 08:40:02 -0600
commitb87064c2496785dde9e33fcdf84175d64163db57 (patch)
tree56de0dcd05c98a0d616d7a20b8511e3b896559dc /tools/binman/etype
parenteb0086fa59e61561a5eca61b9ab8323d8a0cbf9c (diff)
downloadu-boot-b87064c2496785dde9e33fcdf84175d64163db57.zip
u-boot-b87064c2496785dde9e33fcdf84175d64163db57.tar.gz
u-boot-b87064c2496785dde9e33fcdf84175d64163db57.tar.bz2
binman: Allow support for writing a size symbol to binaries
It is useful to be able to access the size of an image in SPL, with something like: binman_sym_declare(unsigned long, u_boot_any, size); ... ulong u_boot_size = binman_sym(ulong, u_boot_any, size); Add support for this and update the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype')
-rw-r--r--tools/binman/etype/section.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 8fea6e0..ab0c42c 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -344,6 +344,8 @@ class Entry_section(Entry):
return entry.offset
elif prop_name == 'image_pos':
return entry.image_pos
+ if prop_name == 'size':
+ return entry.size
else:
raise ValueError("%s: No such property '%s'" % (msg, prop_name))