summaryrefslogtreecommitdiff
path: root/include/env_default.h
AgeCommit message (Collapse)Author
2020-06-26Kconfig: Remove CONFIG_CLOCKS_IN_MHZTom Rini
This variable is unset anywhere and only unset on a number of platforms. Remove all relevant code. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-18common: Drop linux/stringify.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Rename environment to embedded_environmentSimon Glass
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-08-17Add BOOTCOUNT_BOOTLIMIT to set reboot limitAlex Kiernan
Add ability to set environment bootlimit from Kconfig Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-07-20env: Include bootdelay in environment if negativeAlex Kiernan
The test for (CONFIG_BOOTDELAY >= 0) has been in U-Boot since the beginning, but the meaning of it has changed over time. Allow the default to be set for any value, including -ve ones. This allows (for example) CONFIG_ENV_IS_NOWHERE to have values for bootdelay in its compiled in environment. The only thing this changes is where the default for bootdelay can be fetched from; before this change you get a compiled in default, after you'll pull it from the default value in the environment, but both values will be the same. Also if there's a value set in the environment then that will take precedence (as before). Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
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>
2018-04-08treewide: Convert CONFIG_HOSTNAME to a string optionMario Six
CONFIG_HOSTNAME is defined as a "plain" preprocessor string, but every use is couched by __stringify(...). Hence, convert it to a proper string option. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-06Allow providing default environment from fileRasmus Villemoes
Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is somewhat inflexible, partly because the cpp language does not allow appending to an existing macro. This prevents reuse of "environment fragments" for different boards, which in turn makes maintaining that environment consistently tedious and error-prone. This implements a Kconfig option for allowing one to define the entire default environment in an external file, which can then, for example, be generated programmatically as part of a Yocto recipe, or simply be kept in version control separately from the U-boot repository. Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-04-06common: env_embedded: allow fine placement of environment objectChristophe Leroy
Commit 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV") dropped the .ppcenv section which was used in linking scripts to allow fine placement of embedded environment sections. This implies that GCC randomly places objects from env/embedded.o and environment is not guaranteed to be located at the correct address: 04003df8 g F .text 00000038 mii_init 04004000 g O .text 00000004 env_size 04004004 g O .text 00002000 environment 04006004 g F .text 00000040 .hidden __lshrdi3 This patch restores this capability by allocating each object marked with __UBOOT_ENV_SECTION__ into a different section. Hence 'environment' will be alone in .text.environment, allowing a fine placement in u-boot.lds with: . = DEFINED(env_offset) ? env_offset : .; env/embedded.o (.text.environment) Fixes: 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV") Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-08-14common: Move CONFIG_BOOTARGS to KconfigSam Protsenko
Also introduce CONFIG_USE_BOOTARGS option so we can control if CONFIG_BOOTARGS defined at all. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> [trini: Resync r8a779[56]_ulcb, various ls10xx targets] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-04common/env_embedded.c: rename PPCENV/PPCTEXT macrosThomas Petazzoni
The environment has pretty much nothing to do with just "PPC", so rename the macros to just __UBOOT_ENV_SECTION__ which is more readable. In addition, only a single macro is needed: the environment now goes either to the default section (USE_HOSTCC is defined) or in the .text section. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-24env: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}Masahiro Yamada
If CONFIG_ENV_VARS_UBOOT_CONFIG is enabled (it is by distro), this code causes build error for boards without CONFIG_SYS_{CPU,_BOARD}. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-19net: Remove all references to CONFIG_ETHADDR and friendsJoe Hershberger
We really don't want boards defining fixed MAC addresses in their config so we just remove the option to set it in a fixed way. If you must have a MAC address that was not provisioned, then use the random MAC address functionality. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2013-10-14Coding Style cleanup: remove trailing white spaceWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2012-12-13env: Add environment variable flagsJoe Hershberger
Currently just validates variable types as decimal, hexidecimal, boolean, ip address, and mac address. 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. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add support for callbacks to environment varsJoe Hershberger
Add support for per-variable callbacks to the "hashtable" functions. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> !!!fix comment in callback
2012-11-02Add board_name to CONFIG_ENV_VARS_UBOOT_CONFIGStephen Warren
CONFIG_ENV_VARS_UBOOT_CONFIG creates environment variables indicating which configuration U-Boot was built for. Some U-Boot binaries run on multiple boards, and hence this information may not uniquley describe the HW that U-Boot is actually running on. Another patch introduces environment variable board_name to represent that. In order to avoid scripts having to check $board_name, use it if set, and then fall back to using $board, make CONFIG_ENV_VARS_UBOOT_CONFIG also set a default value for board_name, so that variable is always available. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-19env: cosmetic: Consilidate the default env definitionJoe Hershberger
There used to be a huge structure duplicated 3 times in the source. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com>