summaryrefslogtreecommitdiff
path: root/tools/env/Makefile
Commit message (Collapse)AuthorAgeLines
* kconfig: switch to KconfigMasahiro Yamada2014-07-30-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run "make <board>_defconfig" to do the board configuration. It will create the .config file and additionally spl/.config, tpl/.config if SPL, TPL is enabled, respectively. You can use "make config", "make menuconfig" etc. to create a new .config or modify the existing one. Use "make spl/config", "make spl/menuconfig" etc. for spl/.config and do likewise for tpl/.config file. The generic syntax of configuration targets for SPL, TPL is: <target_image>/<config_command> Here, <target_image> is either 'spl' or 'tpl' <config_command> is 'config', 'menuconfig', 'xconfig', etc. When the configuration is done, run "make". (Or "make <board>_defconfig all" will do the configuration and build in one time.) For futher information of how Kconfig works in U-Boot, please read the comment block of scripts/multiconfig.py. By the way, there is another item worth remarking here: coexistence of Kconfig and board herder files. Prior to Kconfig, we used C headers to define a set of configs. We expect a very long term to migrate from C headers to Kconfig. Two different infractructure must coexist in the interim. In our former configuration scheme, include/autoconf.mk was generated for use in makefiles. It is still generated under include/, spl/include/, tpl/include/ directory for the Normal, SPL, TPL image, respectively. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* env: Implement support for AES encryption into fw_* toolsMarek Vasut2014-03-21-1/+1
| | | | | | | | | | | | Implement support for encrypting/decrypting the environment block into the tools/env/fw_* tools. The cipher used is AES 128 CBC and the implementation depends solely on components internal to U-Boot. To allow building against the internal AES library, the library did need minor adjustments to not include U-Boot's headers which are not wanted to be included and define missing types. Signed-off-by: Marek Vasut <marex@denx.de>
* kbuild: rename SRCTREE to srctreeMasahiro Yamada2014-03-12-1/+1
| | | | | | | | | | | | | | | Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for pointing to the top of source directory. (No difference between the two.) In Kbuild style, $(srctree) is used for instead. This commit renames SRCTREE to srctree and deletes the defition of SRCTREE. Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c, doc/DocBook/Makefile should be keep. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools/env: cross-compile fw_printenv without setting HOSTCCMasahiro Yamada2014-02-19-3/+14
| | | | | | | | | | | | | | | fw_printenv is a program which mostly runs on the target Linux. Before switching to Kbuild, we needed to set HOSTCC at the command line like this: make HOSTCC=<your CC cross-compiler> env Going forward we can cross compile it by specifying CROSS_COMPILE: make CROSS_COMPILE=<your cross-compiler prefix> env This looks more natural. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* Makefile: refactor include path settingsMasahiro Yamada2014-02-19-3/+1
| | | | | | | | This commit merges commonly-used header include paths to UBOOTINCLUDE and NOSTDINC_FLAGS variables, which are placed at the top Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools: convert makefiles to kbuild styleMasahiro Yamada2014-02-19-25/+7
| | | | | | | | | | | | | Before this commit, makefiles under tools/ directory were implemented with their own way. This commit refactors them by using "hostprogs-y" variable. Several C sources have been added to wrap other C sources to simplify Makefile. For example, tools/crc32.c includes lib/crc32.c Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: do not create a symbolic link to arch/${ARCH}/include/asmMasahiro Yamada2013-11-08-1/+1
| | | | | | | | | | | | | | | In-tree build: - Do not create a symbolic link from include/asm to arch/${ARCH}/include/asm - Add ${SRCTREE}/arch/arm/include into the header search path Out-of-tree build: - Do not create a directory ${OBJTREE}/include2 - Do not create a symbolic link from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm - Add ${SRCTREE}/arch/arm/include into the header search path Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Revert "fw_env: fix building w/out a config.h"Tom Rini2012-12-20-10/+1
| | | | | | | | I had missed Joe's NAK on this patch, so... This reverts commit 92ace272d06cec1d7f1533bb9edf914fb5845fba. Signed-off-by: Tom Rini <trini@ti.com>
* fw_env: fix building w/out a config.hMike Frysinger2012-12-19-1/+10
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
* tools/env: Add environment variable flags supportJoe Hershberger2012-12-13-0/+3
| | | | | | | | | | | | | | Currently just validates variable types as decimal, hexidecimal, boolean, ip address, and mac address. Call env_acl_validate_setenv_params() from setenv() in fw_env.c. If the entry is not found in the env .flags, then look in the static one. This allows the env to override the static definitions, but prevents the need to have every definition in the environment distracting you. Need to build in _ctype for isdigit for Linux. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* tools/env: Use a board-specific default envJoe Hershberger2012-10-15-2/+3
| | | | | | | | | | | | | | | | | | | Originally added in aa701b94336b358798d676eef12a7b90bdac23f5 Before this patch, there was a hard-coded env that was used as default if the env in flash is detected as invalid. Now this tool (compiled for a given board) will share the default env with the u-boot for the board. Fix include of config.h Need to define "TEXT_BASE" when building the fw_env tool so that the default env will be correct for environments which use it. Define __ASSEMBLY__ when calling #include <config.h> so that we only get #defines (all we're interested in). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* Strip fw_printenv like the other toolsLoïc Minier2012-06-21-0/+1
| | | | Signed-off-by: Loïc Minier <lool@debian.org>
* tools/env: use lib/crc32.c directlyAndreas Bießmann2011-11-22-5/+2
| | | | | | | | Instead of linking the file into $(obj) tree use directly the source file. This also prevents littered source tree if building not out-of-tree. Signed-off-by: Andreas Bießmann <biessmann@corscience.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Coding Style (white space) cleanupWolfgang Denk2010-11-27-4/+4
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* tools/env: cleanup host build flagsDaniel Hobi2010-11-14-5/+10
| | | | | | | | | | | | | | | | | This patch makes tools/env/Makefile more similar to tools/imls: - define HOSTSRCS and HOSTCPPFLAGS, so that .depend generation works. - include U-Boot headers using -idirafter to prevent picking up u-boot/include/errno.h. - use HOSTCFLAGS_NOPED (fw_env.c does not conform to -pedantic). In order to cross-compile tools/env, override the HOSTCC variable as in this example: make tools env HOSTCC=bfin-uclinux-gcc Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch> Tested-by: Detlev Zundel <dzu@denx.de> Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
* tools/env: use host build flagsMike Frysinger2010-09-19-3/+3
| | | | | | | Convert the tools/env/Makefile to use the same host tool syntax as the other tool subdirs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Rename lib_generic/ to lib/Peter Tyser2010-04-13-1/+1
| | | | | | | | Now that the other architecture-specific lib directories have been moved out of the top-level directory there's not much reason to have the '_generic' suffix on the common lib directory. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Fix Compilation Errors with 'tools/env/fw_printenv'Grant Erickson2008-05-09-1/+1
| | | | | | | | | | | | | | | | In the current top-of-tree, 1.3.3.-rc2, the optional tool 'tools/env/fw_printenv' fails to compile for two reasons: 1) The header watchdog.h cannot be found. 2) The header zlib.h is picked up from the tool chain rather than the project causing a prototype conflict for crc32. This patch addresses both of these issues. Platforms Tested On: - AMCC "Kilauea" Signed-off-by: Grant Erickson <gerickson@nuovations.com>
* tools: fix fw_printenv tool to compile againMarkus Klotzbücher2008-01-08-0/+4
| | | | | | | | | | This patch updates the fw_printenv/fw_setenv userspace tool to include the correct MTD header in order to compile against current kernel headers. Backward compatibility is preserved by introducing an option MTD_VERSION which can be set to "old" for compilation using the old MTD headers. Along with this a number of warnings are fixed. Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* Add support for a saving build objects in a separate directory.Marian Balakowicz2006-09-01-12/+15
| | | | | | | | | | | | | | | | | | | | | Modifications are based on the linux kernel approach and support two use cases: 1) Add O= to the make command line 'make O=/tmp/build all' 2) Set environement variable BUILD_DIR to point to the desired location 'export BUILD_DIR=/tmp/build' 'make' The second approach can also be used with a MAKEALL script 'export BUILD_DIR=/tmp/build' './MAKEALL' Command line 'O=' setting overrides BUILD_DIR environent variable. When none of the above methods is used the local build is performed and the object files are placed in the source directory.
* * Code cleanup:wdenk2003-06-27-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)
* * Use 1-byte-read instead of -write for iprobe() functionwdenk2002-12-17-0/+46
Add i2c commands to PM826 config * extend I2C POST code: check for list on known addresses