<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/env, branch v2017.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>tools/env: fix environment alignment tests for block devices</title>
<updated>2016-11-28T20:10:36+00:00</updated>
<author>
<name>Max Krummenacher</name>
<email>max.oss.09@gmail.com</email>
</author>
<published>2016-11-19T12:58:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=333ee16d042076669b36328dc06765a78c0676eb'/>
<id>333ee16d042076669b36328dc06765a78c0676eb</id>
<content type='text'>
commit 183923d3e412500bdc597d1745e2fb6f7f679ec7 enforces that the
environment must start at an erase block boundary.

For block devices the sample fw_env.config does not mandate a erase block size
for block devices. A missing setting defaults to the full env size.

Depending on the environment location the alignment check now errors out for
perfectly legal settings.

Fix this by defaulting to the standard blocksize of 0x200 for environments
stored in a block device.
That keeps the fw_env.config files for block devices working even with that
new check.

Signed-off-by: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 183923d3e412500bdc597d1745e2fb6f7f679ec7 enforces that the
environment must start at an erase block boundary.

For block devices the sample fw_env.config does not mandate a erase block size
for block devices. A missing setting defaults to the full env size.

Depending on the environment location the alignment check now errors out for
perfectly legal settings.

Fix this by defaulting to the standard blocksize of 0x200 for environments
stored in a block device.
That keeps the fw_env.config files for block devices working even with that
new check.

Signed-off-by: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: tool: add command line option to input lockfile path</title>
<updated>2016-10-08T13:33:34+00:00</updated>
<author>
<name>B, Ravi</name>
<email>ravibabu@ti.com</email>
</author>
<published>2016-09-26T12:54:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d40dbfb7405cb74946ba0a6e9058045fdb5bddaf'/>
<id>d40dbfb7405cb74946ba0a6e9058045fdb5bddaf</id>
<content type='text'>
The default lockname is set to /var/lock. This limits the
usage of this application where OS uses different lockfile
location parameter.
For example, In case of android, the default lock
path location is /data.
Hence by providing the command line option to input lockfile
path will be useful to reuse the tool across multiple
operating system.

usage: ./fw_printenv -l &lt;lockfile path&gt;

Signed-off-by: Ravi Babu &lt;ravibabu@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default lockname is set to /var/lock. This limits the
usage of this application where OS uses different lockfile
location parameter.
For example, In case of android, the default lock
path location is /data.
Hence by providing the command line option to input lockfile
path will be useful to reuse the tool across multiple
operating system.

usage: ./fw_printenv -l &lt;lockfile path&gt;

Signed-off-by: Ravi Babu &lt;ravibabu@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Suspected Spam: Do not open attachements![PATCH 4/6] tools/env: flash_write_buf: enforce offset to be start of environment</title>
<updated>2016-10-07T00:57:35+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-29T21:17:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=24307d6337e69c277e8f70ae9af97ef331dc39c5'/>
<id>24307d6337e69c277e8f70ae9af97ef331dc39c5</id>
<content type='text'>
This allows to take advantage of the environment being block aligned.
This is not a new constraint. Writes always start at the begin of the
environment, since the header with CRC/length as there.
Every environment modification requires updating the header

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows to take advantage of the environment being block aligned.
This is not a new constraint. Writes always start at the begin of the
environment, since the header with CRC/length as there.
Every environment modification requires updating the header

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: lookup dev_type directly from flash_read_buf/flash_write_buf</title>
<updated>2016-10-07T00:57:35+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-29T21:16:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ff95e579cf53b9d621e0754ea869a703eec6cdd1'/>
<id>ff95e579cf53b9d621e0754ea869a703eec6cdd1</id>
<content type='text'>
flash_write_buf already looks up size/offset/#sector from struct
envdev_s. It can look up mtd_type as well. Same applies to
flash_read_buf. Makes the interface simpler

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flash_write_buf already looks up size/offset/#sector from struct
envdev_s. It can look up mtd_type as well. Same applies to
flash_read_buf. Makes the interface simpler

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: pass bad block offset by value</title>
<updated>2016-10-07T00:57:34+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-29T21:16:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c6012bbce6ce9ac3162aeb841b2502ba71e52af6'/>
<id>c6012bbce6ce9ac3162aeb841b2502ba71e52af6</id>
<content type='text'>
the offset is not modified by linux ioctl call
see mtd_ioctl{drivers/mtd/mtdchar.c}
Makes the interface less ambiguous, since the caller can
now exclude a modification of blockstart

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the offset is not modified by linux ioctl call
see mtd_ioctl{drivers/mtd/mtdchar.c}
Makes the interface less ambiguous, since the caller can
now exclude a modification of blockstart

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: factor out environment_end function</title>
<updated>2016-10-07T00:57:34+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-29T21:16:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e2c9351d5ac140a365655967920a72f57357ae27'/>
<id>e2c9351d5ac140a365655967920a72f57357ae27</id>
<content type='text'>
instead of adhoc computation of the environment end,
use a function with a proper name

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of adhoc computation of the environment end,
use a function with a proper name

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: soften warning about erase block alignment</title>
<updated>2016-08-20T18:03:27+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-17T21:41:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4ed6f4318be9fff2df344ba7ac678736c4b6f3d6'/>
<id>4ed6f4318be9fff2df344ba7ac678736c4b6f3d6</id>
<content type='text'>
addon 183923d3e
MMC/SATA have no erase blocks, only blocks. Hence the warning
about erase block alignment might be confusing in such environment.

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
addon 183923d3e
MMC/SATA have no erase blocks, only blocks. Hence the warning
about erase block alignment might be confusing in such environment.

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: return with error if redundant environments have unequal size</title>
<updated>2016-08-20T18:03:26+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-17T21:41:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=490365c38f869ecebda701df2c060ba3a9e628d3'/>
<id>490365c38f869ecebda701df2c060ba3a9e628d3</id>
<content type='text'>
For double buffering to work, the target buffer must always be big
enough to hold all data. This can only be ensured if buffers are of
equal size, otherwise one must be smaller and we risk data loss
when copying from the bigger to the smaller buffer.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For double buffering to work, the target buffer must always be big
enough to hold all data. This can only be ensured if buffers are of
equal size, otherwise one must be smaller and we risk data loss
when copying from the bigger to the smaller buffer.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: ensure environment starts at erase block boundary</title>
<updated>2016-08-15T22:46:40+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2016-08-11T19:39:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=183923d3e412500bdc597d1745e2fb6f7f679ec7'/>
<id>183923d3e412500bdc597d1745e2fb6f7f679ec7</id>
<content type='text'>
56086921 added support for unaligned environments access.
U-boot itself does not support this:
- env_nand.c fails when using an unaligned offset. It produces an
  error in nand_erase_opts{drivers/mtd/nand/nand_util.c}
- in env_sf/env_flash the unused space at the end is preserved, but
  not in the beginning. block alignment is assumed
- env_sata/env_mmc aligns offset/length to the block size of the
  underlying device. data is silently redirected to the beginning of
  a block

There is seems no use case for unaligned environment. If there is
some useful data at the beginning of the the block (e.g. end of u-boot)
that would be very unsafe. If the redundant environments are hosted by
the same erase block then that invalidates the idea of double buffering.
It might be that unaligned access was allowed in the past, and that
people with legacy u-boot are trapped. But at the time of 56086921
it wasn't supported and due to reasons above I guess it was never
introduced.
I prefer to remove that (unused) feature in favor of simplicity

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Acked-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
56086921 added support for unaligned environments access.
U-boot itself does not support this:
- env_nand.c fails when using an unaligned offset. It produces an
  error in nand_erase_opts{drivers/mtd/nand/nand_util.c}
- in env_sf/env_flash the unused space at the end is preserved, but
  not in the beginning. block alignment is assumed
- env_sata/env_mmc aligns offset/length to the block size of the
  underlying device. data is silently redirected to the beginning of
  a block

There is seems no use case for unaligned environment. If there is
some useful data at the beginning of the the block (e.g. end of u-boot)
that would be very unsafe. If the redundant environments are hosted by
the same erase block then that invalidates the idea of double buffering.
It might be that unaligned access was allowed in the past, and that
people with legacy u-boot are trapped. But at the time of 56086921
it wasn't supported and due to reasons above I guess it was never
introduced.
I prefer to remove that (unused) feature in favor of simplicity

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
Acked-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: env: Fix format warnings in debug</title>
<updated>2016-07-26T06:28:39+00:00</updated>
<author>
<name>Marcin Niestroj</name>
<email>m.niestroj@grinn-global.com</email>
</author>
<published>2016-05-06T12:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=81c878dd3c75c9056e4755ece89f45d056735d75'/>
<id>81c878dd3c75c9056e4755ece89f45d056735d75</id>
<content type='text'>
Format warnings (-Wformat) were shown in printf() calls after defining
DEBUG macro.

Update format string and explicitly cast variables to suppress all
warnings.

Signed-off-by: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Format warnings (-Wformat) were shown in printf() calls after defining
DEBUG macro.

Update format string and explicitly cast variables to suppress all
warnings.

Signed-off-by: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
