History log of /u-boot/tools/envcrc.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 6bd23720 02-Dec-2022 Tom Rini <trini@konsulko.com>

env: Rework ENV_IS_EMBEDDED and related logic slightly

- Drop CONFIG_BUILD_ENVCRC as this is never set directly but instead
means ENV_IS_EMBEDDED, so reference that in code and rename the Makefile
usage to BUILD_ENVCRC.
- Remove extra-$(CONFIG_ENV_IS_EMBEDDED) line as it could never be true,
and likely why there is an extra- line for CONFIG_ENV_IS_IN_FLASH (the
only use case today of embedded environments).
- With these slight changes we can then see that using the calculated
symbol of ENV_IS_EMBEDDED is the right thing to use in any code which
needs to know this situation and can remove CONFIG_ENV_IS_EMBEDDED
entirely.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 65cc0e2a 16-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_* to CFG_SYS_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do
not easily transition to Kconfig. In many cases they likely should come
from the device tree instead. Move these out of CONFIG namespace and in
to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 3db71108 14-Nov-2019 Simon Glass <sjg@chromium.org>

crc32: Use the crc.h header for crc functions

Drop inclusion of crc.h in common.h and use the correct header directly
instead.

With this we can drop the conflicting definition in fw_env.h and rely on
the crc.h header, which is already included.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# b2ea91ba 14-Nov-2019 Simon Glass <sjg@chromium.org>

crc: Fix code style with crc functions

Some of these have a space before the bracket. Drop it to fix the style.
Add some missing function comments while here.

Note that u32 and u8 cannot be used here since crc.h is included on the
host side.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# a8992e78 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND check

We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one
board where we can simply multiple CONFIG_ENV_SIZE by two for the same
result. The other place where we could but were not previously using
this is for where env_internal.h checks for if we should set
ENV_IS_EMBEDDED. This seems like the most likely use, historically, of
the variable, but it was not used. Add logic to check for this now.

Cc: Wolfgang Denk <wd@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# cb6617a7 10-Nov-2019 Tom Rini <trini@konsulko.com>

defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENT

Move this symbol to Kconfig. As part of this we can drop a UBI-specific
symbol that was a stop-gap for not having this particular symbol in
Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f3998fdc 02-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment.h to env_internal.h

This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.

Rename this file and add a comment at the top to indicate its internal
nature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini <trini@konsulko.com>

# be54ec16 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment to embedded_environment

The name 'environment' is widely used in U-Boot so is not a very useful
name of a variable. Rename it to better indicate its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>

# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.

# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)

# 8bde7f77 27-Jun-2003 Wolfgang Denk <wd@denx.de>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)

# 43d9616c 05-Mar-2003 Wolfgang Denk <wd@denx.de>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM

# fe57bb19 18-Sep-2002 Wolfgang Denk <wd@denx.de>

Initial revision

# 3db71108 14-Nov-2019 Simon Glass <sjg@chromium.org>

crc32: Use the crc.h header for crc functions

Drop inclusion of crc.h in common.h and use the correct header directly
instead.

With this we can drop the conflicting definition in fw_env.h and rely on
the crc.h header, which is already included.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# b2ea91ba 14-Nov-2019 Simon Glass <sjg@chromium.org>

crc: Fix code style with crc functions

Some of these have a space before the bracket. Drop it to fix the style.
Add some missing function comments while here.

Note that u32 and u8 cannot be used here since crc.h is included on the
host side.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# a8992e78 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND check

We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one
board where we can simply multiple CONFIG_ENV_SIZE by two for the same
result. The other place where we could but were not previously using
this is for where env_internal.h checks for if we should set
ENV_IS_EMBEDDED. This seems like the most likely use, historically, of
the variable, but it was not used. Add logic to check for this now.

Cc: Wolfgang Denk <wd@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# cb6617a7 10-Nov-2019 Tom Rini <trini@konsulko.com>

defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENT

Move this symbol to Kconfig. As part of this we can drop a UBI-specific
symbol that was a stop-gap for not having this particular symbol in
Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f3998fdc 02-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment.h to env_internal.h

This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.

Rename this file and add a comment at the top to indicate its internal
nature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini <trini@konsulko.com>

# be54ec16 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment to embedded_environment

The name 'environment' is widely used in U-Boot so is not a very useful
name of a variable. Rename it to better indicate its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>

# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.

# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@pollux.denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)

# 8bde7f77 27-Jun-2003 wdenk <wdenk>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)

# 43d9616c 05-Mar-2003 wdenk <wdenk>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM

# fe57bb19 18-Sep-2002 wdenk <wdenk>

Initial revision

# a8992e78 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND check

We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one
board where we can simply multiple CONFIG_ENV_SIZE by two for the same
result. The other place where we could but were not previously using
this is for where env_internal.h checks for if we should set
ENV_IS_EMBEDDED. This seems like the most likely use, historically, of
the variable, but it was not used. Add logic to check for this now.

Cc: Wolfgang Denk <wd@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# cb6617a7 10-Nov-2019 Tom Rini <trini@konsulko.com>

defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENT

Move this symbol to Kconfig. As part of this we can drop a UBI-specific
symbol that was a stop-gap for not having this particular symbol in
Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f3998fdc 02-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment.h to env_internal.h

This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.

Rename this file and add a comment at the top to indicate its internal
nature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini <trini@konsulko.com>

# be54ec16 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment to embedded_environment

The name 'environment' is widely used in U-Boot so is not a very useful
name of a variable. Rename it to better indicate its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>

# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.

# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@pollux.denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)

# 8bde7f77 27-Jun-2003 wdenk <wdenk>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)

# 43d9616c 05-Mar-2003 wdenk <wdenk>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM

# fe57bb19 18-Sep-2002 wdenk <wdenk>

Initial revision

# cb6617a7 10-Nov-2019 Tom Rini <trini@konsulko.com>

defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENT

Move this symbol to Kconfig. As part of this we can drop a UBI-specific
symbol that was a stop-gap for not having this particular symbol in
Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f3998fdc 02-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment.h to env_internal.h

This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.

Rename this file and add a comment at the top to indicate its internal
nature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini <trini@konsulko.com>

# be54ec16 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment to embedded_environment

The name 'environment' is widely used in U-Boot so is not a very useful
name of a variable. Rename it to better indicate its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>

# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.

# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@pollux.denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)

# 8bde7f77 27-Jun-2003 wdenk <wdenk>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)

# 43d9616c 05-Mar-2003 wdenk <wdenk>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM

# fe57bb19 18-Sep-2002 wdenk <wdenk>

Initial revision

# f3998fdc 02-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment.h to env_internal.h

This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.

Rename this file and add a comment at the top to indicate its internal
nature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini <trini@konsulko.com>

# be54ec16 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Rename environment to embedded_environment

The name 'environment' is widely used in U-Boot so is not a very useful
name of a variable. Rename it to better indicate its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>

# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.

# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@pollux.denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)

# 8bde7f77 27-Jun-2003 wdenk <wdenk>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)

# 43d9616c 05-Mar-2003 wdenk <wdenk>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM

# fe57bb19 18-Sep-2002 wdenk <wdenk>

Initial revision

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# f33f3e07 15-Nov-2016 York Sun <york.sun@nxp.com>

tools/env: Correct include kconfig

While we move some config macros to Kconfig, kconfig header is needed
to avoid compiling error if not already included.

Signed-off-by: York Sun <york.sun@nxp.com>


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# 6f403bad 24-Dec-2011 Igor Grinberg <grinberg@compulab.co.il>

env: remove value from boolean defines

Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>


# 73f94ed4 27-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

tools/envcrc: fix compile breakage

When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>


# 994bc671 16-Nov-2011 Igor Grinberg <grinberg@compulab.co.il>

env: move extern environment[] to environment.h

Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>


# c3eb3fe4 08-Jul-2011 Mike Frysinger <vapier@gentoo.org>

env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>


# a747a7f3 26-Oct-2009 Wolfgang Denk <wd@denx.de>

Revert "env: only build env_embedded and envcrc when needed"

Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.


# f67066b6 18-Oct-2009 Mike Frysinger <vapier@gentoo.org>

envcrc: check return value of fwrite()

Newer toolchains will often complain about unchecked fwrite():
envcrc.c:117: warning: ignoring return value of `fwrite�, declared
with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>


# 6dab6add 30-Sep-2009 Mike Frysinger <vapier@gentoo.org>

env: only build env_embedded and envcrc when needed

The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>


# 837db3d8 06-May-2009 Mike Frysinger <vapier@gentoo.org>

tools/envcrc: add --binary option to export embedded env

The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>


# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>


# 0e8d1586 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV macros to CONFIG_ENV

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>


# 5a1aceb0 10-Sep-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>


# 89cdab78 31-Mar-2008 Mike Frysinger <vapier@gentoo.org>

crc32: use uint32_t rather than unsigned long

The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>


# dc17fb6d 03-Aug-2005 Wolfgang Denk <wd@pollux.denx.de>

Cleanup build problems (on Fedora Core x86_64 build host)


# 8bde7f77 27-Jun-2003 wdenk <wdenk>

* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)


# 43d9616c 05-Mar-2003 wdenk <wdenk>

* Patch by Robert Schwebel, 21 Jan 2003:
- Add support for Innokom board
- Don't complain if "install" fails
- README cleanup (remove duplicated lines)
- Update PXA header files

* Add documentation for existing POST code (doc/README.POST)

* Patch by Laudney Ren, 15 Jan 2003:
Fix handling of redundand environment in "tools/envcrc.c"

* Patch by Detlev Zundel, 28 Feb 2003:
Add bedbug support for 824x systems

* Add support for 16 MB flash configuration of TRAB board

* Patch by Erwin Rol, 27 Feb 2003:
Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize ethaddr environment
variable with value in the EEPROM


# fe57bb19 18-Sep-2002 wdenk <wdenk>

Initial revision