<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/env_internal.h, 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>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>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>doc: replace @return by Return:</title>
<updated>2022-01-19T17:11:34+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-19T17:05:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185f812c419f1b4f0d10d9787d59cf9f11a2a600'/>
<id>185f812c419f1b4f0d10d9787d59cf9f11a2a600</id>
<content type='text'>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CONFIG_ENV_IS_IN_SPI_FLASH et al to Kconfig</title>
<updated>2021-11-12T19:18:17+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-11-08T03:59:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=27480e0a9fca90319237fef08cb6be4663199b38'/>
<id>27480e0a9fca90319237fef08cb6be4663199b38</id>
<content type='text'>
This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_SPI_FLASH
   CONFIG_ENV_IS_NOWHERE
   CONFIG_ENV_OFFSET
   CONFIG_ENV_OVERWRITE
   CONFIG_ENV_SECT_SIZE
   CONFIG_SYS_MMC_ENV_DEV
   CONFIG_SYS_MMC_ENV_PART

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_ENV_IS_IN_SPI_FLASH
   CONFIG_ENV_IS_NOWHERE
   CONFIG_ENV_OFFSET
   CONFIG_ENV_OVERWRITE
   CONFIG_ENV_SECT_SIZE
   CONFIG_SYS_MMC_ENV_DEV
   CONFIG_SYS_MMC_ENV_PART

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Always use char for default_environment</title>
<updated>2021-10-31T18:26:44+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-22T13:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5cbbe35fd7b3d05273f4d3f273c9e613bd38d7d'/>
<id>c5cbbe35fd7b3d05273f4d3f273c9e613bd38d7d</id>
<content type='text'>
Sometimes we use uchar and sometimes char for the default environment
array. By always using char, we can get rid of some explicit casts.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes we use uchar and sometimes char for the default environment
array. By always using char, we can get rid of some explicit casts.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: add ENV_ERASE_PTR macro</title>
<updated>2021-04-16T21:32:34+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-02-09T10:48:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1af031ac3e3e75ea1ae58da093db956a8c9bc144'/>
<id>1af031ac3e3e75ea1ae58da093db956a8c9bc144</id>
<content type='text'>
Add ENV_ERASE_PTR macro to handle erase opts and remove the associated
ifdef.

This patch is a extension of previous commit 82b2f4135719 ("env_internal.h:
add alternative ENV_SAVE_PTR macro").

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add ENV_ERASE_PTR macro to handle erase opts and remove the associated
ifdef.

This patch is a extension of previous commit 82b2f4135719 ("env_internal.h:
add alternative ENV_SAVE_PTR macro").

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Allow to set default_environment[] from board code via compile option DEFAULT_ENV_IS_RW</title>
<updated>2021-02-08T07:52:50+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2020-12-23T11:21:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=93f4048bc2f00d2d1bda962701077ad1afbfacdf'/>
<id>93f4048bc2f00d2d1bda962701077ad1afbfacdf</id>
<content type='text'>
This change allows board code to modify default_environment[] array when
compile option DEFAULT_ENV_IS_RW is specified in board config file.

Some board default variables depend on runtime configuration which is not
known at compile time. Therefore allow to set default_environment[] array
as non-const and allow board code to modify it when it is needed.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change allows board code to modify default_environment[] array when
compile option DEFAULT_ENV_IS_RW is specified in board config file.

Some board default variables depend on runtime configuration which is not
known at compile time. Therefore allow to set default_environment[] array
as non-const and allow board code to modify it when it is needed.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Andre Heider &lt;a.heider@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: the ops driver load becomes mandatory in struct env_driver</title>
<updated>2020-07-31T14:13:00+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-07-28T09:51:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=466d9855d4ee828c998ee3ea29e5685e38d3064e'/>
<id>466d9855d4ee828c998ee3ea29e5685e38d3064e</id>
<content type='text'>
The ops driver load becomes mandatory in struct env_drive,
change the comment for this ops and remove unnecessary test.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ops driver load becomes mandatory in struct env_drive,
change the comment for this ops and remove unnecessary test.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: add prototypes for weak function</title>
<updated>2020-07-31T14:13:00+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-06-15T14:52:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=879369ea92b97639c69b70829dbbce6d1aabb14c'/>
<id>879369ea92b97639c69b70829dbbce6d1aabb14c</id>
<content type='text'>
This patch adds prototypes for several weak functions:
- env_ext4_get_intf
- env_ext4_get_dev_part
- env_get_location

It solves the following warnings when compiling with W=1
on stm32mp1 board:

board/st/stm32mp1/stm32mp1.c:849:19: warning: no previous prototype for 'env_get_location' [-Wmissing-prototypes]
 enum env_location env_get_location(enum env_operation op, int prio)
                   ^~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:876:13: warning: no previous prototype for 'env_ext4_get_intf' [-Wmissing-prototypes]
 const char *env_ext4_get_intf(void)
             ^~~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:889:13: warning: no previous prototype for 'env_ext4_get_dev_part' [-Wmissing-prototypes]
 const char *env_ext4_get_dev_part(void)
             ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds prototypes for several weak functions:
- env_ext4_get_intf
- env_ext4_get_dev_part
- env_get_location

It solves the following warnings when compiling with W=1
on stm32mp1 board:

board/st/stm32mp1/stm32mp1.c:849:19: warning: no previous prototype for 'env_get_location' [-Wmissing-prototypes]
 enum env_location env_get_location(enum env_operation op, int prio)
                   ^~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:876:13: warning: no previous prototype for 'env_ext4_get_intf' [-Wmissing-prototypes]
 const char *env_ext4_get_intf(void)
             ^~~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:889:13: warning: no previous prototype for 'env_ext4_get_dev_part' [-Wmissing-prototypes]
 const char *env_ext4_get_dev_part(void)
             ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: env: check real location for env info command</title>
<updated>2020-07-26T18:35:30+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-06-19T12:03:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2f96b3238ca330897b8eb5bde82db2da2c07effb'/>
<id>2f96b3238ca330897b8eb5bde82db2da2c07effb</id>
<content type='text'>
Check the current ENV location, dynamically provided by the weak
function env_get_location to be sure that the environment can be
persistent.

The compilation flag ENV_IS_IN_DEVICE is not enough when the board
dynamically select the available storage location (according boot
device for example).

This patch solves issue for stm32mp1 platform, when the boot device
is USB.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check the current ENV location, dynamically provided by the weak
function env_get_location to be sure that the environment can be
persistent.

The compilation flag ENV_IS_IN_DEVICE is not enough when the board
dynamically select the available storage location (according boot
device for example).

This patch solves issue for stm32mp1 platform, when the boot device
is USB.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
