<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/binman/etype/section.py, branch master</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: Fix typing for python &gt;= 3.7</title>
<updated>2025-07-22T17:30:03+00:00</updated>
<author>
<name>Yannic Moog</name>
<email>y.moog@phytec.de</email>
</author>
<published>2025-07-15T06:21:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=187ac12927c042a982961096c9a418287b8e97e2'/>
<id>187ac12927c042a982961096c9a418287b8e97e2</id>
<content type='text'>
To get the [] annotation working with python 3.7 and 3.8, import
annotations.

Reported-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
Fixes: 21bc3433a43d ("binman: rework dropping absent entries from packaged image")
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Signed-off-by: Yannic Moog &lt;y.moog@phytec.de&gt;
Tested-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To get the [] annotation working with python 3.7 and 3.8, import
annotations.

Reported-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
Fixes: 21bc3433a43d ("binman: rework dropping absent entries from packaged image")
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Signed-off-by: Yannic Moog &lt;y.moog@phytec.de&gt;
Tested-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: rework dropping absent entries from packaged image</title>
<updated>2025-06-26T15:54:05+00:00</updated>
<author>
<name>Yannic Moog</name>
<email>y.moog@phytec.de</email>
</author>
<published>2025-06-13T12:02:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=21bc3433a43d3add3430543c9eee2a95d4dee2f6'/>
<id>21bc3433a43d3add3430543c9eee2a95d4dee2f6</id>
<content type='text'>
When blobs are absent and are marked as optional, they can be safely
dropped from the binman tree. Use the drop_absent function for that.
Rename drop_absent to drop_absent_optional as we do not want to drop any
entries that are absent; they should be reported by binman as errors
when they are missing.
We also reorder the processing of the image the following:
- We call the CheckForProblems function before the image is built.
- We drop entries after we checked for problems with the image.
This is okay because CheckForProblems does not look at the file we have
written but rather queries the data structure (image) built with binman.
This also allows us to get all error and warning messages that we want
to report while avoiding putting missing optional entries in the final
image.
As only the blobs are dropped, the sections still remain in the
assembled image. Thus add them to the expected test case checks where
necessary.

In addition, a rework of testPackTeeOsOptional test case is necessary.

The test did not really do what it was supposed to. The description said
that optional binary is tested, but the binary is not marked as
optional. Further, the tee.elf file, when included in the image
properly, also shows up in the image data. This must be added as well.

As there is no global variable for the elf data, set the pathname to the
elf file that was created when setting up the test suite.
For the test case get the filename and read the contents, comparing them
to the contents of the created binman image.

Signed-off-by: Yannic Moog &lt;y.moog@phytec.de&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When blobs are absent and are marked as optional, they can be safely
dropped from the binman tree. Use the drop_absent function for that.
Rename drop_absent to drop_absent_optional as we do not want to drop any
entries that are absent; they should be reported by binman as errors
when they are missing.
We also reorder the processing of the image the following:
- We call the CheckForProblems function before the image is built.
- We drop entries after we checked for problems with the image.
This is okay because CheckForProblems does not look at the file we have
written but rather queries the data structure (image) built with binman.
This also allows us to get all error and warning messages that we want
to report while avoiding putting missing optional entries in the final
image.
As only the blobs are dropped, the sections still remain in the
assembled image. Thus add them to the expected test case checks where
necessary.

In addition, a rework of testPackTeeOsOptional test case is necessary.

The test did not really do what it was supposed to. The description said
that optional binary is tested, but the binary is not marked as
optional. Further, the tee.elf file, when included in the image
properly, also shows up in the image data. This must be added as well.

As there is no global variable for the elf data, set the pathname to the
elf file that was created when setting up the test suite.
For the test case get the filename and read the contents, comparing them
to the contents of the created binman image.

Signed-off-by: Yannic Moog &lt;y.moog@phytec.de&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: x86: Write skip-at-start when end-at-4gb is used</title>
<updated>2025-05-27T09:07:39+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-16T02:02:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=92d5d1e1cdf3c146a054d36da2f6a2778d12637f'/>
<id>92d5d1e1cdf3c146a054d36da2f6a2778d12637f</id>
<content type='text'>
The end-at-4gb property implies a value for skip-at-start so add it into
the output FDT so that U-Boot can read it.

Now that skip-at-start is implemented, we can drop the workarounds used
in the x86 code to obtain the correct image-pos value.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The end-at-4gb property implies a value for skip-at-start so add it into
the output FDT so that U-Boot can read it.

Now that skip-at-start is implemented, we can drop the workarounds used
in the x86 code to obtain the correct image-pos value.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Drop GetRootSkipAtStart()</title>
<updated>2025-04-11T20:29:52+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-04-10T12:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0148be7cd49e8f801662e5af74203e2cdf93a5bb'/>
<id>0148be7cd49e8f801662e5af74203e2cdf93a5bb</id>
<content type='text'>
This method is not called anymore, so drop 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 method is not called anymore, so drop it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Honour the skip-at-start property more faithfully</title>
<updated>2025-03-04T14:22:11+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-26T16:26:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c252d36b8da37e5601af5421bc672474b849e97'/>
<id>2c252d36b8da37e5601af5421bc672474b849e97</id>
<content type='text'>
A discussion on the mailing list about dealing with block offsets and
binman symbols made me think that something is wrong with how Binman
deals with the skip-at-start property.

The feature was originally designed to handle x86 ROMs, which are mapped
at the top of the address space. That seemed too specific, whereas
skipping some space at the start seemed more generally useful.

It has proved useful. For example, rockchip images start at block 64,
so a skip-at-start of 0x8000 deals with this.

But it doesn't actually work correctly, since the image_pos value does
not give the actual position on the media.

Fix this and update the documentation, moving it into the 'section'
section.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A discussion on the mailing list about dealing with block offsets and
binman symbols made me think that something is wrong with how Binman
deals with the skip-at-start property.

The feature was originally designed to handle x86 ROMs, which are mapped
at the top of the address space. That seemed too specific, whereas
skipping some space at the start seemed more generally useful.

It has proved useful. For example, rockchip images start at block 64,
so a skip-at-start of 0x8000 deals with this.

But it doesn't actually work correctly, since the image_pos value does
not give the actual position on the media.

Fix this and update the documentation, moving it into the 'section'
section.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Rename Entry.end_4gb</title>
<updated>2025-03-04T14:22:10+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-26T16:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=91fa9d9ed2e10d6f96a80b9655c105fe99592519'/>
<id>91fa9d9ed2e10d6f96a80b9655c105fe99592519</id>
<content type='text'>
The property is named end_at_4gb so name the variable the same, to avoid
confusion.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The property is named end_at_4gb so name the variable the same, to avoid
confusion.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Allow image_pos to be None when writing symbols</title>
<updated>2024-09-26T10:40:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-26T19:11:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a96dda1a70afc348d472cfb087742604e50b8d46'/>
<id>a96dda1a70afc348d472cfb087742604e50b8d46</id>
<content type='text'>
Some images do not have an image_pos value, for example an image which
is part of a compressed section and therefore cannot be accessed
directly.

Handle this case, returning None as the value.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some images do not have an image_pos value, for example an image which
is part of a compressed section and therefore cannot be accessed
directly.

Handle this case, returning None as the value.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Unwind the end-at-4gb special-case a little</title>
<updated>2024-09-26T10:40:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-26T19:11:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b73d0bb584e5f89c8d80c7435f1a6c036be25dd9'/>
<id>b73d0bb584e5f89c8d80c7435f1a6c036be25dd9</id>
<content type='text'>
Move the check for this further out, so that base_addr is computed in
Entry.WriteSymbols() rather than at lower levels.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the check for this further out, so that base_addr is computed in
Entry.WriteSymbols() rather than at lower levels.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Adjust naming for reading symbols</title>
<updated>2024-09-26T10:40:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-26T19:11:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f2154c30f6174eb27dfe92c91950f6436f802f1b'/>
<id>f2154c30f6174eb27dfe92c91950f6436f802f1b</id>
<content type='text'>
These functions get the value of a symbol. The reference to ELF files
is confusing since they are reading the position/size of entries, not
ELF symbols. Rename the functions and adjust the comments also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions get the value of a symbol. The reference to ELF files
is confusing since they are reading the position/size of entries, not
ELF symbols. Rename the functions and adjust the comments also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Fix SyntaxWarning: invalid escape sequence '\('</title>
<updated>2023-09-23T15:00:37+00:00</updated>
<author>
<name>Rong Tao</name>
<email>rongtao@cestc.cn</email>
</author>
<published>2023-09-05T11:41:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba4034a5045cc318874030fdc442cc2e26dba99f'/>
<id>ba4034a5045cc318874030fdc442cc2e26dba99f</id>
<content type='text'>
Reproduct warning:

    $ git clean -dfx
    $ make CROSS_COMPILE="" qemu-x86_64_defconfig
    $ make -j8
    ...
    u-boot/tools/binman/etype/section.py:25:
    SyntaxWarning: invalid escape sequence '\('
    """Entry that contains other entries

Signed-off-by: Rong Tao &lt;rongtao@cestc.cn&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reproduct warning:

    $ git clean -dfx
    $ make CROSS_COMPILE="" qemu-x86_64_defconfig
    $ make -j8
    ...
    u-boot/tools/binman/etype/section.py:25:
    SyntaxWarning: invalid escape sequence '\('
    """Entry that contains other entries

Signed-off-by: Rong Tao &lt;rongtao@cestc.cn&gt;
</pre>
</div>
</content>
</entry>
</feed>
