<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/binman/test, branch v2018.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>binman: Support accessing binman tables at run time</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=19790632648be6fff7a4898350bd52565bde7c96'/>
<id>19790632648be6fff7a4898350bd52565bde7c96</id>
<content type='text'>
Binman construct images consisting of multiple binary files. These files
sometimes need to know (at run timme) where their peers are located. For
example, SPL may want to know where U-Boot is located in the image, so
that it can jump to U-Boot correctly on boot.

In general the positions where the binaries end up after binman has
finished packing them cannot be known at compile time. One reason for
this is that binman does not know the size of the binaries until
everything is compiled, linked and converted to binaries with objcopy.

To make this work, we add a feature to binman which checks each binary
for symbol names starting with '_binman'. These are then decoded to figure
out which entry and property they refer to. Then binman writes the value
of this symbol into the appropriate binary. With this, the symbol will
have the correct value at run time.

Macros are used to make this easier to use. As an example, this declares
a symbol that will access the 'u-boot-spl' entry to find the 'pos' value
(i.e. the position of SPL in the image):

   binman_sym_declare(unsigned long, u_boot_spl, pos);

This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any
binary that includes it. Binman then updates the value in that binary,
ensuring that it can be accessed at runtime with:

   ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);

This assigns the variable u_boot_pos to the position of SPL in the image.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Binman construct images consisting of multiple binary files. These files
sometimes need to know (at run timme) where their peers are located. For
example, SPL may want to know where U-Boot is located in the image, so
that it can jump to U-Boot correctly on boot.

In general the positions where the binaries end up after binman has
finished packing them cannot be known at compile time. One reason for
this is that binman does not know the size of the binaries until
everything is compiled, linked and converted to binaries with objcopy.

To make this work, we add a feature to binman which checks each binary
for symbol names starting with '_binman'. These are then decoded to figure
out which entry and property they refer to. Then binman writes the value
of this symbol into the appropriate binary. With this, the symbol will
have the correct value at run time.

Macros are used to make this easier to use. As an example, this declares
a symbol that will access the 'u-boot-spl' entry to find the 'pos' value
(i.e. the position of SPL in the image):

   binman_sym_declare(unsigned long, u_boot_spl, pos);

This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any
binary that includes it. Binman then updates the value in that binary,
ensuring that it can be accessed at runtime with:

   ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);

This assigns the variable u_boot_pos to the position of SPL in the image.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Adjust size of test SPL binary</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:54:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f689890d8ec52c8b9d005fbf7f6df00dcf9895db'/>
<id>f689890d8ec52c8b9d005fbf7f6df00dcf9895db</id>
<content type='text'>
This is only 3 bytes long which is not enough to hold two symbol values,
needed to test the binman symbols feature. Increase it to 15 bytes.

Using very small regions is useful since we can easily compare them in
tests and errors are fairly easy to diagnose.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is only 3 bytes long which is not enough to hold two symbol values,
needed to test the binman symbols feature. Increase it to 15 bytes.

Using very small regions is useful since we can easily compare them in
tests and errors are fairly easy to diagnose.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add tests binaries with binman symbols</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5cfcf7e0fdb265672dd8ee7d3e881190ed06ff98'/>
<id>5cfcf7e0fdb265672dd8ee7d3e881190ed06ff98</id>
<content type='text'>
For testing we need to build some ELF files containing binman symbols. Add
these to the Makefile and check in the binaries:

   u_boot_binman_syms - normal, valid ELF file
   u_boot_binman_syms_bad - missing the __image_copy_start symbol
   u_boot_binman_syms_size - has a binman symbol with an invalid size

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For testing we need to build some ELF files containing binman symbols. Add
these to the Makefile and check in the binaries:

   u_boot_binman_syms - normal, valid ELF file
   u_boot_binman_syms_bad - missing the __image_copy_start symbol
   u_boot_binman_syms_size - has a binman symbol with an invalid size

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add support for including spl/u-boot-spl-nodtb.bin</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:54:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4e6fdbef67e4e73b516c20b073cf160679940b77'/>
<id>4e6fdbef67e4e73b516c20b073cf160679940b77</id>
<content type='text'>
This file contains SPL image without a device tree. Add support for
including this in images.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file contains SPL image without a device tree. Add support for
including this in images.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add support for including spl/u-boot-spl.dtb</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:54:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=47419eae4b266ec8d1954d9314d833d014d63ecd'/>
<id>47419eae4b266ec8d1954d9314d833d014d63ecd</id>
<content type='text'>
This file contains the SPL device tree. Add support for including this by
itself in images.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file contains the SPL device tree. Add support for including this by
itself in images.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add a function to read ELF symbols</title>
<updated>2017-12-13T02:53:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-14T01:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b50e5611a6b5dff4bc2ae47d332ba0d046e2a782'/>
<id>b50e5611a6b5dff4bc2ae47d332ba0d046e2a782</id>
<content type='text'>
In some cases we need to read symbols from U-Boot. At present we have a
a few cases which does this via 'nm' and 'grep'.

It is better to use objdump since that tells us the size of the symbols
and also whether it is weak or not.

Add a new module which reads ELF information from files. Update existing
uses of 'nm' to use this module.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases we need to read symbols from U-Boot. At present we have a
a few cases which does this via 'nm' and 'grep'.

It is better to use objdump since that tells us the size of the symbols
and also whether it is weak or not.

Add a new module which reads ELF information from files. Update existing
uses of 'nm' to use this module.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add add test for using an Intel MRC binary</title>
<updated>2017-11-23T01:05:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-13T04:52:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ca4f4ff7cf5acb230cf1948268b60efc5e54a977'/>
<id>ca4f4ff7cf5acb230cf1948268b60efc5e54a977</id>
<content type='text'>
MRC (Memory Reference Code) is a binary blob used to set up the SDRAM
controller on some Intel boards. Add a test for this feature.

With this test coverage on binman is back up to 100%.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MRC (Memory Reference Code) is a binary blob used to set up the SDRAM
controller on some Intel boards. Add a test for this feature.

With this test coverage on binman is back up to 100%.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add add test for SPL with a microcode pointer</title>
<updated>2017-11-23T01:05:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-13T04:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6b187df78754fc2064a73b94941bc2482a36e1a7'/>
<id>6b187df78754fc2064a73b94941bc2482a36e1a7</id>
<content type='text'>
Add a test for this feature. It allows SPL to hold a pointer to the
microcode block. This is used for 64-bit U-Boot on x86.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a test for this feature. It allows SPL to hold a pointer to the
microcode block. This is used for 64-bit U-Boot on x86.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add a test for x86-start16-spl</title>
<updated>2017-11-23T01:05:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-13T04:52:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8772213ea690e025248626096195fdebf402de02'/>
<id>8772213ea690e025248626096195fdebf402de02</id>
<content type='text'>
This allows us to put the 16-bit x86 start-up code in SPL. Add a test for
it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to put the 16-bit x86 start-up code in SPL. Add a test for
it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Add test for u-boot-spl-bss-pad</title>
<updated>2017-11-23T01:05:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-11-13T04:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=56509843003570f57f8600642258c77d525da0e5'/>
<id>56509843003570f57f8600642258c77d525da0e5</id>
<content type='text'>
Add a test that we can pad the BSS with zero bytes.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a test that we can pad the BSS with zero bytes.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
