summaryrefslogtreecommitdiff
path: root/tools/envcrc.c
AgeCommit message (Collapse)AuthorFilesLines
2019-12-03crc32: Use the crc.h header for crc functionsSimon Glass1-0/+1
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>
2019-12-03crc: Fix code style with crc functionsSimon Glass1-2/+2
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>
2019-11-21env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND checkTom Rini1-3/+0
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>
2019-11-12defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENTTom Rini1-3/+0
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>
2019-08-12env: Rename environment.h to env_internal.hSimon Glass1-1/+1
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>
2019-08-11env: Rename environment to embedded_environmentSimon Glass1-2/+2
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>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
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>
2016-11-24tools/env: Correct include kconfigYork Sun1-0/+2
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>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-17/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2012-01-05env: remove value from boolean definesIgor Grinberg1-3/+3
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>
2011-12-07tools/envcrc: fix compile breakageIgor Grinberg1-3/+3
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>
2011-11-22env: move extern environment[] to environment.hIgor Grinberg1-2/+3
Extract all extern declarations for environment out of c files into the environment.h header. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-07-26env: allow people to force envcrc buildingMike Frysinger1-3/+7
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>
2009-10-27Revert "env: only build env_embedded and envcrc when needed"Wolfgang Denk1-1/+10
Breaks building on many boards, and no really clean fix available yet. This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.
2009-10-19envcrc: check return value of fwrite()Mike Frysinger1-1/+3
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>
2009-10-19env: only build env_embedded and envcrc when neededMike Frysinger1-10/+1
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>
2009-06-12tools/envcrc: add --binary option to export embedded envMike Frysinger1-4/+42
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>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD1-7/+7
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-11rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD1-14/+14
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-11rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASHJean-Christophe PLAGNIOL-VILLARD1-2/+2
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-24crc32: use uint32_t rather than unsigned longMike Frysinger1-4/+5
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>
2005-08-04Cleanup build problems (on Fedora Core x86_64 build host)Wolfgang Denk1-17/+20
2003-06-28* Code cleanup:wdenk1-1/+0
- 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)
2003-03-06* Patch by Robert Schwebel, 21 Jan 2003:wdenk1-6/+23
- 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
2002-09-18Initial revisionwdenk1-0/+80