History log of /u-boot/tools/env/Makefile
Revision Date Author Comments
# e1df3fa3 26-Jul-2018 Matt Weber <matthew.weber@rockwellcollins.com>

include/version.h: workaround sysroot inc order

On some systems the host system or even the cross sysroot can
contain a version.h. This leads to the wrong file being picked
up and a PLAIN_VERSION undefined error.

This workaround symlinks the version.h into the tool folder to
allow reordering of search folders.

Fixes
http://autobuild.buildroot.net/results/770/7702d5df36a6532aafdbe6e9e62709bbfa058b54/build-end.log
http://autobuild.buildroot.net/results/e34/e3401027d2fb3ce565ca9e2456a427afd3610a87/build-end.log
... additional can be found with these queries ...
http://autobuild.buildroot.net/?reason=uboot-tools-2018.03
http://autobuild.buildroot.net/?reason=uboot-tools-2018.05

Upstream: pending

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.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>


# c6831c74 14-Nov-2017 Tom Rini <trini@konsulko.com>

env: Remove CONFIG_ENV_AES support

This support has been deprecated since v2017.09 due to security issues.
We now remove this support.

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


# 3b082529 13-Mar-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

tools: fix cross-compiling tools when HOSTCC is overridden

Richard reported U-Boot tools issues in OpenEmbedded/Yocto project.

OE needs to be able to change the default compiler. If we pass in
HOSTCC through the make command, it overwrites all HOSTCC instances,
including ones in tools/Makefile and tools/env/Makefile, which breaks
"make cross_tools" and "make env", respectively.

Add "override" directives to avoid overriding HOSTCC instances that
really need to point to the cross-compiler.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 2cb11b35 30-Oct-2015 Stefano Babic <sbabic@denx.de>

Allow fw env tools to be available as library

Sometimes it can be useful to link the fw_ tools instead
of having the fw_setenv/fw_printenv installed.
Patch exports the tool as library and allowes to link it
with own programs.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# bdc7dc45 27-Aug-2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

tools/env: change stripping strategy to allow no-stripping

When building the U-Boot tools for non-ELF platforms (such as Blackfin
FLAT), since commit 79fc0c5f498c3982aa4740c273ab1a9255063d9c
("tools/env: cross-compile fw_printenv without setting HOSTCC"), the
build fails because it tries to strip a FLAT binary, which does not
make sense.

This commit solves this by changing the stripping logic in
tools/env/Makefile to be similar to the one in tools/Makefile. This
logic continues to apply strip to the final binary, but does not abort
the build if it fails, and does the stripping in place on the final
binary. This allows the logic to work fine if stripping doesn't work,
as it leaves the final binary untouched.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Sonic Zhang <sonic.zhang@analog.com>


# 51148790 29-Jul-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

kconfig: switch to Kconfig

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>


# a8a752c0 05-Mar-2014 Marek Vasut <marex@denx.de>

env: Implement support for AES encryption into fw_* tools

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>


# 01286329 10-Mar-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

kbuild: rename SRCTREE to srctree

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>


# 79fc0c5f 04-Feb-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

tools/env: cross-compile fw_printenv without setting HOSTCC

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>


# fea1ca8e 04-Feb-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

Makefile: refactor include path settings

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>


# 940db16d 04-Feb-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

tools: convert makefiles to kbuild style

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>


# bb02c536 31-Oct-2013 Masahiro Yamada <yamada.m@jp.panasonic.com>

Makefile: do not create a symbolic link to arch/${ARCH}/include/asm

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>


# 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>


# e3c52f2b 20-Dec-2012 Tom Rini <trini@ti.com>

Revert "fw_env: fix building w/out a config.h"

I had missed Joe's NAK on this patch, so...

This reverts commit 92ace272d06cec1d7f1533bb9edf914fb5845fba.

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


# 92ace272 10-Nov-2012 Mike Frysinger <vapier@gentoo.org>

fw_env: fix building w/out a config.h

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>


# 30fd4fad 11-Dec-2012 Joe Hershberger <joe.hershberger@ni.com>

tools/env: Add environment variable flags support

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>


# 497f2053 03-Oct-2012 Joe Hershberger <joe.hershberger@ni.com>

tools/env: Use a board-specific default env

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>


# 3648ff2d 11-Mar-2012 Loïc Minier <lool@debian.org>

Strip fw_printenv like the other tools

Signed-off-by: Loïc Minier <lool@debian.org>


# dca61f01 17-Oct-2011 Andreas Bießmann <biessmann@corscience.de>

tools/env: use lib/crc32.c directly

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>


# 844f07d8 27-Nov-2010 Wolfgang Denk <wd@denx.de>

Coding Style (white space) cleanup

Signed-off-by: Wolfgang Denk <wd@denx.de>


# 02bd475e 10-Nov-2010 Daniel Hobi <daniel.hobi@schmid-telecom.ch>

tools/env: cleanup host build flags

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>


# abd315a1 14-Aug-2010 Mike Frysinger <vapier@gentoo.org>

tools/env: use host build flags

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>


# 78acc472 12-Apr-2010 Peter Tyser <ptyser@xes-inc.com>

Rename lib_generic/ to lib/

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>


# f3b6d528 06-May-2008 Grant Erickson <gerickson@nuovations.com>

Fix Compilation Errors with 'tools/env/fw_printenv'

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>


# 64b3727b 27-Nov-2007 Markus Klotzbücher <mk@denx.de>

tools: fix fw_printenv tool to compile again

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>


# 6de66b35 27-Nov-2007 Markus Klotzbücher <mk@denx.de>

tools: fix fw_printenv tool to compile again

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>


# f9328639 01-Sep-2006 Marian Balakowicz <m8@semihalf.com>

Add support for a saving build objects in a separate directory.
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.


# 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)


# 6aff3115 16-Dec-2002 wdenk <wdenk>

* Use 1-byte-read instead of -write for iprobe() function
Add i2c commands to PM826 config

* extend I2C POST code: check for list on known addresses