<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/binman/entry.py, branch v2022.07</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 unique names having '/.' for images read from files</title>
<updated>2022-04-25T14:10:41+00:00</updated>
<author>
<name>Alper Nebi Yasak</name>
<email>alpernebiyasak@gmail.com</email>
</author>
<published>2022-03-27T15:31:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67bf2c8ded5b91ffa62e9aabededc9098810254f'/>
<id>67bf2c8ded5b91ffa62e9aabededc9098810254f</id>
<content type='text'>
Binman can embed a copy of the image description into the images it
builds as a fdtmap entry, but it omits the /binman/&lt;image-name&gt; prefix
from the node paths while doing so. When reading an already-built image
file, entries are reconstructed using this fdtmap and their associated
nodes still lack that prefix.

Some entries like fit and vblock create intermediate files whose names
are based on an entry unique name. This name is constructed from their
node's path by concatenating the parents with dots up to the binman
node, e.g. /binman/image/foo/bar becomes 'image.foo.bar'.

However, we don't have this /binman/image prefix when replacing entries
in such an image. The /foo/bar entry we read when doing so erroneously
has the unique name of '/.foo.bar', causing permission errors when the
entry attempts to create files based on that.

Fix the unique-name generation by stopping at the '/' node like how it
stops at the binman node. As the unique names are used as filenames, add
tests that check if they're safe to use as filenames.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Binman can embed a copy of the image description into the images it
builds as a fdtmap entry, but it omits the /binman/&lt;image-name&gt; prefix
from the node paths while doing so. When reading an already-built image
file, entries are reconstructed using this fdtmap and their associated
nodes still lack that prefix.

Some entries like fit and vblock create intermediate files whose names
are based on an entry unique name. This name is constructed from their
node's path by concatenating the parents with dots up to the binman
node, e.g. /binman/image/foo/bar becomes 'image.foo.bar'.

However, we don't have this /binman/image prefix when replacing entries
in such an image. The /foo/bar entry we read when doing so erroneously
has the unique name of '/.foo.bar', causing permission errors when the
entry attempts to create files based on that.

Fix the unique-name generation by stopping at the '/' node like how it
stops at the binman node. As the unique names are used as filenames, add
tests that check if they're safe to use as filenames.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Allow mkimage to use a non-zero fake-blob size</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:19:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=72e423c6b6664ff77b46c732f8d7e2e173b3b5fe'/>
<id>72e423c6b6664ff77b46c732f8d7e2e173b3b5fe</id>
<content type='text'>
Unfortunately mkimage gets upset with zero-sized files. Update the
ObtainContents() method to support specifying the size, if a fake blob is
created.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately mkimage gets upset with zero-sized files. Update the
ObtainContents() method to support specifying the size, if a fake blob is
created.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Make fake blobs zero-sized by default</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:19:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3817ad4c1c2d62be15f657e6647afcc93faf1d55'/>
<id>3817ad4c1c2d62be15f657e6647afcc93faf1d55</id>
<content type='text'>
On x86 devices having even a small amount of data can cause an overlap
between regions. For example, bayleybay complains when the intel-vga
region overlaps with u-boot-ucode:

   ImagePos    Offset      Size  Name
   &lt;none&gt;    00000000  00800000  main-section
   &lt;none&gt;     ff800000  00000080  intel-descriptor
   &lt;none&gt;     ff800400  00000080  intel-me
   &lt;none&gt;     fff00000  00098f24  u-boot-with-ucode-ptr
   &lt;none&gt;     fff98f24  00001aa0  u-boot-dtb-with-ucode
   &lt;none&gt;     fff9a9d0  0002a000  u-boot-ucode
   &lt;none&gt;     fffb0000  00000080  intel-vga
   ...

It is safer to use an empty file in most cases. Add an option to set the
size for those uses that need it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On x86 devices having even a small amount of data can cause an overlap
between regions. For example, bayleybay complains when the intel-vga
region overlaps with u-boot-ucode:

   ImagePos    Offset      Size  Name
   &lt;none&gt;    00000000  00800000  main-section
   &lt;none&gt;     ff800000  00000080  intel-descriptor
   &lt;none&gt;     ff800400  00000080  intel-me
   &lt;none&gt;     fff00000  00098f24  u-boot-with-ucode-ptr
   &lt;none&gt;     fff98f24  00001aa0  u-boot-dtb-with-ucode
   &lt;none&gt;     fff9a9d0  0002a000  u-boot-ucode
   &lt;none&gt;     fffb0000  00000080  intel-vga
   ...

It is safer to use an empty file in most cases. Add an option to set the
size for those uses that need it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Change how faked blobs are created</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:19:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a0a2e9569f0d4e89cbaace40227e18c9c37fbf4'/>
<id>9a0a2e9569f0d4e89cbaace40227e18c9c37fbf4</id>
<content type='text'>
At present fake blobs are created but internally an empty blob is used.
Change it to use the contents of the faked file. Also return whether the
blob was faked, in case the caller needs to know that.

Add a TODO to put fake blobs in their own directory.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present fake blobs are created but internally an empty blob is used.
Change it to use the contents of the faked file. Also return whether the
blob was faked, in case the caller needs to know that.

Add a TODO to put fake blobs in their own directory.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Rename tools parameter to btools</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:19:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ae9a45702954707619df6990bb479c98f5346408'/>
<id>ae9a45702954707619df6990bb479c98f5346408</id>
<content type='text'>
This shadows the patman.tools library so rename it to avoid a pylint
warning.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This shadows the patman.tools library so rename it to avoid a pylint
warning.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Rename ExpandEntries to gen_entries</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:19:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9ee33ac974b5ca2a818a1b0d684d5d27675b9a4'/>
<id>c9ee33ac974b5ca2a818a1b0d684d5d27675b9a4</id>
<content type='text'>
Leave the 'expand' term for use by entry types which have an expanded
version of themselves. Rename this method to indicate that it generates
subentries.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Leave the 'expand' term for use by entry types which have an expanded
version of themselves. Rename this method to indicate that it generates
subentries.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Rename ExpandToLimit to extend_to_limit</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:18:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=80a66ae646eec82f4650bfc40f609584ba4bcebd'/>
<id>80a66ae646eec82f4650bfc40f609584ba4bcebd</id>
<content type='text'>
The word 'expand' is used for entries which generate subentries. It is
also used for entries that can have an '_expanded' version which is used
to break out its contents.

Rather than talking about expanding an entry's size, use the term
'extending'. It is slightly more precise and avoids the above conflicts.

This change renders the old 'expand-size' property invalid, so add an
error check for that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The word 'expand' is used for entries which generate subentries. It is
also used for entries that can have an '_expanded' version which is used
to break out its contents.

Rather than talking about expanding an entry's size, use the term
'extending'. It is slightly more precise and avoids the above conflicts.

This change renders the old 'expand-size' property invalid, so add an
error check for that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Tweak collect_contents_to_file() and docs</title>
<updated>2022-03-19T01:24:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-03-06T03:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d427c4bcb601a0b271168f33737b53bda9b63d2'/>
<id>6d427c4bcb601a0b271168f33737b53bda9b63d2</id>
<content type='text'>
Update the return value of this function, fix the 'create' typo and
update the documentation for clarity.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Suggested-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the return value of this function, fix the 'create' typo and
update the documentation for clarity.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Suggested-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Correct pylint errors</title>
<updated>2022-03-02T15:28:12+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-02-11T20:23:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d2ef3e993276cffc3615508b8c81eb3036a8f2b'/>
<id>8d2ef3e993276cffc3615508b8c81eb3036a8f2b</id>
<content type='text'>
Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

A complication with binman is that it tries to avoid importing libfdt
(or anything that imports it) unless needed, so that things like help
still work if it is missing.

Note that two tests are duplicated in binman and two others have
duplicate names, so both of these issues are fixed also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

A complication with binman is that it tries to avoid importing libfdt
(or anything that imports it) unless needed, so that things like help
still work if it is missing.

Note that two tests are duplicated in binman and two others have
duplicate names, so both of these issues are fixed also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>binman: Move entry-data collection into a Entry method</title>
<updated>2022-02-22T17:05:44+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-02-08T18:50:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=81b71c32005475395b5b4d0945de4e6a9136d191'/>
<id>81b71c32005475395b5b4d0945de4e6a9136d191</id>
<content type='text'>
Collecting the data from a list of entries and putting it in a file is
a useful operation that will be needed by other entry types. Put this into
a method in the Entry class.

Add some documentation about how to collect data for an entry type.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Collecting the data from a list of entries and putting it in a file is
a useful operation that will be needed by other entry types. Put this into
a method in the Entry class.

Add some documentation about how to collect data for an entry type.

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