<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/env, branch v2022.07-rc2</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>env: sf: Allow to use env_sf_init_addr() at any stage</title>
<updated>2022-05-02T05:28:25+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-03-02T11:47:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f4bf81b01351f4d8918ee9ab6855dcb33acd4db8'/>
<id>f4bf81b01351f4d8918ee9ab6855dcb33acd4db8</id>
<content type='text'>
In some cases it makes sense to use env_sf_init_addr() also in SPL mode.
Allow it for boards by providing custom implementation of weak function
env_sf_get_env_addr(). When this function returns NULL it signals that
address is invalid, like config option CONFIG_ENV_ADDR.

There is no change in default behavior or in config options.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases it makes sense to use env_sf_init_addr() also in SPL mode.
Allow it for boards by providing custom implementation of weak function
env_sf_get_env_addr(). When this function returns NULL it signals that
address is invalid, like config option CONFIG_ENV_ADDR.

There is no change in default behavior or in config options.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Implement lower priority arch_env_get_location()</title>
<updated>2022-04-21T13:08:40+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-04-06T00:21:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=de70e8879bb253f4d2a9ba9149cd41cb38b94ed8'/>
<id>de70e8879bb253f4d2a9ba9149cd41cb38b94ed8</id>
<content type='text'>
Currently there is only one way to override desired environment location,
by implementing env_get_location(). This is increasingly being conflated
both on board level and architecture level, which leads to a problem on
boards where this function is already implemented on architecture level,
since those boards have no way to override this environment location on
board level anymore.

Implement arch_env_get_location() function which is architecture specific
and should only ever be implemented in architecture code. This function
has lower priority than env_get_location(), which should only ever be
implemented in board code, and which overrides the arch_env_get_location()
architecture environment selection.

This way, architecture can define its default environment chooser, while
board can now override it as needed at all times.

There is no functional change, since env_get_location() simply returns
arch_env_get_location(), and arch_env_get_location() implements the
current env_get_location() default content.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Adam Ford &lt;aford173@gmail.com&gt;
Cc: Fabio Estevam &lt;festevam@denx.de&gt;
Cc: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Tim Harvey &lt;tharvey@gateworks.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Tommaso Merciai &lt;tomm.merciai@gmail.com&gt;
Cc: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently there is only one way to override desired environment location,
by implementing env_get_location(). This is increasingly being conflated
both on board level and architecture level, which leads to a problem on
boards where this function is already implemented on architecture level,
since those boards have no way to override this environment location on
board level anymore.

Implement arch_env_get_location() function which is architecture specific
and should only ever be implemented in architecture code. This function
has lower priority than env_get_location(), which should only ever be
implemented in board code, and which overrides the arch_env_get_location()
architecture environment selection.

This way, architecture can define its default environment chooser, while
board can now override it as needed at all times.

There is no functional change, since env_get_location() simply returns
arch_env_get_location(), and arch_env_get_location() implements the
current env_get_location() default content.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Adam Ford &lt;aford173@gmail.com&gt;
Cc: Fabio Estevam &lt;festevam@denx.de&gt;
Cc: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Tim Harvey &lt;tharvey@gateworks.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Tommaso Merciai &lt;tomm.merciai@gmail.com&gt;
Cc: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "env: Load env when ENV_IS_NOWHERE is only location selected"</title>
<updated>2022-04-10T15:20:16+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-04-10T04:46:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5c7399ec90513bc0310801c9f852ea7697a91759'/>
<id>5c7399ec90513bc0310801c9f852ea7697a91759</id>
<content type='text'>
This reverts commit 8d61237edbf6314a701cf78da2c5893a73ff5438.

This commit broke environment on literally every board I have access
to, with this revert in place, environment works as it should again.
The problem I observe with this patch is that saved environment in
either SPI NOR or eMMC is never used, the system always falls back
to default environment. The 'saveenv' command does succeed, but then
after reset, the default env is again used.

Furthermore, the commit introduced duplicate code in env_init(), this:
"
	if (!prio) {
		gd-&gt;env_addr = (ulong)&amp;default_environment[0];
		gd-&gt;env_valid = ENV_INVALID;

		return 0;
	}

	if (ret == -ENOENT) {
		gd-&gt;env_addr = (ulong)&amp;default_environment[0];
		gd-&gt;env_valid = ENV_INVALID;

		return 0;
	}
"

Furthermore, the commit is missing DCO SoB line.

Also note that upstream does not support UltraZed EG board, so
this might have been a patch pulled from downstream which did
depend on some other downstream behavior.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Felix.Vietmeyer@jila.colorado.edu &lt;felix.vietmeyer@jila.colorado.edu&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 8d61237edbf6314a701cf78da2c5893a73ff5438.

This commit broke environment on literally every board I have access
to, with this revert in place, environment works as it should again.
The problem I observe with this patch is that saved environment in
either SPI NOR or eMMC is never used, the system always falls back
to default environment. The 'saveenv' command does succeed, but then
after reset, the default env is again used.

Furthermore, the commit introduced duplicate code in env_init(), this:
"
	if (!prio) {
		gd-&gt;env_addr = (ulong)&amp;default_environment[0];
		gd-&gt;env_valid = ENV_INVALID;

		return 0;
	}

	if (ret == -ENOENT) {
		gd-&gt;env_addr = (ulong)&amp;default_environment[0];
		gd-&gt;env_valid = ENV_INVALID;

		return 0;
	}
"

Furthermore, the commit is missing DCO SoB line.

Also note that upstream does not support UltraZed EG board, so
this might have been a patch pulled from downstream which did
depend on some other downstream behavior.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Felix.Vietmeyer@jila.colorado.edu &lt;felix.vietmeyer@jila.colorado.edu&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: fat: Allow overriding interface, device and partition</title>
<updated>2022-04-07T20:50:53+00:00</updated>
<author>
<name>He Yong</name>
<email>hyyoxhk@163.com</email>
</author>
<published>2022-02-17T16:07:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=eb68ead2d3f093dfeffae68045e8921d93ff05cf'/>
<id>eb68ead2d3f093dfeffae68045e8921d93ff05cf</id>
<content type='text'>
For platform which can boot on different device, this allows
to override interface, device and partition from board code

Signed-off-by: He Yong &lt;hyyoxhk@163.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For platform which can boot on different device, this allows
to override interface, device and partition from board code

Signed-off-by: He Yong &lt;hyyoxhk@163.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Load env when ENV_IS_NOWHERE is only location selected</title>
<updated>2022-04-07T17:52:36+00:00</updated>
<author>
<name>Felix.Vietmeyer@jila.colorado.edu</name>
<email>Felix.Vietmeyer@jila.colorado.edu</email>
</author>
<published>2021-04-21T02:04:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d61237edbf6314a701cf78da2c5893a73ff5438'/>
<id>8d61237edbf6314a701cf78da2c5893a73ff5438</id>
<content type='text'>
This patch prevent u-boot from hanging on a UltraZed EG board (zynqmp).

Without the patch,
(drv = env_driver_lookup(ENVOP_INIT, prio))
evaluates to 0, causing prio = 0
Then, (!prio) is hit, returning -ENODEV causing a stall.

With the patch,
instead of returning -ENODEV and causing a stall, we
set gd-&gt;env_addr (is this really needed?)
and then
mark gd-&gt;env_valid = ENV_INVALID to use the default env.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch prevent u-boot from hanging on a UltraZed EG board (zynqmp).

Without the patch,
(drv = env_driver_lookup(ENVOP_INIT, prio))
evaluates to 0, causing prio = 0
Then, (!prio) is hit, returning -ENODEV causing a stall.

With the patch,
instead of returning -ENODEV and causing a stall, we
set gd-&gt;env_addr (is this really needed?)
and then
mark gd-&gt;env_valid = ENV_INVALID to use the default env.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CONFIG_ETHPRIME to Kconfig</title>
<updated>2022-03-18T16:48:17+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-03-11T14:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0e14cdfaf3ce3e716a993554c8803e39640f0168'/>
<id>0e14cdfaf3ce3e716a993554c8803e39640f0168</id>
<content type='text'>
This converts the following to Kconfig:
   CONFIG_ETHPRIME

This is also done by adding a gating Kconfig option, CONFIG_USE_ETHPRIME
similar to other options that are not always set and control environment
variables.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the following to Kconfig:
   CONFIG_ETHPRIME

This is also done by adding a gating Kconfig option, CONFIG_USE_ETHPRIME
similar to other options that are not always set and control environment
variables.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v2022.04-rc4' into next</title>
<updated>2022-03-14T21:40:36+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-03-14T21:40:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2abf048ab7b835787d6627423559832f2b18f253'/>
<id>2abf048ab7b835787d6627423559832f2b18f253</id>
<content type='text'>
Prepare v2022.04-rc4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare v2022.04-rc4
</pre>
</div>
</content>
</entry>
<entry>
<title>env: sunxi: enable ENV_IS_IN_SPI_FLASH</title>
<updated>2022-03-10T12:04:11+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2022-01-11T12:46:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=753a85fd151d28a55c6bb4d15bd3bc44dd4b5e22'/>
<id>753a85fd151d28a55c6bb4d15bd3bc44dd4b5e22</id>
<content type='text'>
Now that sunxi uses CONFIG_SPI more sanely, and can also now properly
load the environment from SPI flash, let's enable the symbol that
actually considers the SPI flash when accessing the environment.

As this symbol depends on CONFIG_SPI, which we now only enable if the
board has a SPI flash, we can make if "default y" for all Allwinner
boards.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that sunxi uses CONFIG_SPI more sanely, and can also now properly
load the environment from SPI flash, let's enable the symbol that
actually considers the SPI flash when accessing the environment.

As this symbol depends on CONFIG_SPI, which we now only enable if the
board has a SPI flash, we can make if "default y" for all Allwinner
boards.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: sunxi: Define location in SPI flash</title>
<updated>2022-03-10T12:03:23+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2022-01-11T12:46:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2bdf213f915e29659b23844a2ef8105fbebd9566'/>
<id>2bdf213f915e29659b23844a2ef8105fbebd9566</id>
<content type='text'>
To allow loading and storing the environment from SPI flash, adjust the
raw offset variables for Allwinner boards to make sense there.

U-Boot (including SPL and other blobs) is loaded from the beginning of
SPI flash, so move the environment location as far back as possible, to
not create unnecessary limits. As those offsets are shared with (now
mostly unused) raw MMC environment, we should respect the common one
megabyte limit, which also makes sense on SPI flash.

So limit the environment for those raw locations to 64KB, and place it
just below 1MB (@960KB).

Those values are currently unused, unless someone forcibly enables the
raw MMC environment. In this case it would break as of now, as the
current offset of 544KB is far too low for the current (arm64) U-Boot
proper.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To allow loading and storing the environment from SPI flash, adjust the
raw offset variables for Allwinner boards to make sense there.

U-Boot (including SPL and other blobs) is loaded from the beginning of
SPI flash, so move the environment location as far back as possible, to
not create unnecessary limits. As those offsets are shared with (now
mostly unused) raw MMC environment, we should respect the common one
megabyte limit, which also makes sense on SPI flash.

So limit the environment for those raw locations to 64KB, and place it
just below 1MB (@960KB).

Those values are currently unused, unless someone forcibly enables the
raw MMC environment. In this case it would break as of now, as the
current offset of 544KB is far too low for the current (arm64) U-Boot
proper.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CONFIG_BOOTFILE to Kconfig</title>
<updated>2022-03-03T21:51:20+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-02-25T16:19:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fdfb17b1f593d1c579c4f65cfbe9fc53011d3cdc'/>
<id>fdfb17b1f593d1c579c4f65cfbe9fc53011d3cdc</id>
<content type='text'>
This converts the following to Kconfig:
   CONFIG_BOOTFILE

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the following to Kconfig:
   CONFIG_BOOTFILE

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
