summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-11-13 18:55:05 -0700
committerSimon Glass <sjg@chromium.org>2017-12-12 19:53:45 -0700
commit39c1502ccc49cc5e9ef799ca56c6fa66c8863504 (patch)
tree2f7c3f20132d0ac105152d1a6c43e76a8c58122a /tools
parentdfce1799e71fd6f36efcea2867b668ab5665e7e1 (diff)
binman: Add documentation for the symbol feature
Add this feature to the README. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/README32
1 files changed, 31 insertions, 1 deletions
diff --git a/tools/binman/README b/tools/binman/README
index 4ef76c8f08..08c3e56bde 100644
--- a/tools/binman/README
+++ b/tools/binman/README
@@ -439,6 +439,8 @@ contents of an entry in some way. For example, it would be possible to create
an entry containing a hash of the contents of some other entries. At this
stage the position and size of entries should not be adjusted.
+6. WriteEntryInfo()
+
7. BuildImage() - builds the image and writes it to a file. This is the final
step.
@@ -471,6 +473,33 @@ the 'warning' line in scripts/Makefile.lib to see what it has found:
# u_boot_dtsi_options_debug = $(u_boot_dtsi_options_raw)
+Access to binman entry positions at run time
+--------------------------------------------
+
+Binman assembles images and determines where each entry is placed in the image.
+This information may be useful to U-Boot at run time. For example, in SPL it
+is useful to be able to find the location of U-Boot so that it can be executed
+when SPL is finished.
+
+Binman allows you to declare symbols in the SPL image which are filled in
+with their correct values during the build. For example:
+
+ binman_sym_declare(ulong, u_boot_any, pos);
+
+declares a ulong value which will be assigned to the position of any U-Boot
+image (u-boot.bin, u-boot.img, u-boot-nodtb.bin) that is present in the image.
+You can access this value with something like:
+
+ ulong u_boot_pos = binman_sym(ulong, u_boot_any, pos);
+
+Thus u_boot_pos will be set to the position of U-Boot in memory, assuming that
+the whole image has been loaded, or is available in flash. You can then jump to
+that address to start U-Boot.
+
+At present this feature is only supported in SPL. In principle it is possible
+to fill in such symbols in U-Boot proper, as well.
+
+
Code coverage
-------------
@@ -543,7 +572,8 @@ To do
Some ideas:
- Fill out the device tree to include the final position and size of each
- entry (since the input file may not always specify these)
+ entry (since the input file may not always specify these). See also
+ 'Access to binman entry positions at run time' above
- Use of-platdata to make the information available to code that is unable
to use device tree (such as a very small SPL image)
- Write an image map to a text file