u-boot/scripts
Simon Glass 86b9c3e4e4 env: Allow U-Boot scripts to be placed in a .env file
At present U-Boot environment variables, and thus scripts, are defined
by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text
to this file and dealing with quoting and newlines is harder than it
should be. It would be better if we could just type the script into a
text file and have it included by U-Boot.

Add a feature that brings in a .env file associated with the board
config, if present. To use it, create a file in a board/<vendor>
directory, typically called <board>.env and controlled by the
CONFIG_ENV_SOURCE_FILE option.

The environment variables should be of the form "var=value". Values can
extend to multiple lines. See the README under 'Environment Variables:'
for more information and an example.

In many cases environment variables need access to the U-Boot CONFIG
variables to select different options. Enable this so that the environment
scripts can be as useful as the ones currently in the board config files.
This uses the C preprocessor, means that comments can be included in the
environment using /* ... */

Also support += to allow variables to be appended to. This is needed when
using the preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Marek Behún <marek.behun@nic.cz>
2021-11-16 14:35:08 -05:00
..
basic WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
coccinelle scripts: ensure the cocci script for miiphy_register does not leak the MDIO bus 2021-09-28 18:50:57 +03:00
dtc WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
kconfig WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
.gitignore docproc: Remove 2018-08-03 19:53:54 -04:00
bin2c.c scripts: import bin2c.c from Linux 4.10-rc6 2017-02-08 15:56:19 -05:00
binutils-version.sh scripts: fix binutils-version.sh for 'as' without a package. 2015-01-08 11:00:45 -05:00
build-efi.sh efi: Add a script to build an image for testing on UEFI 2021-11-07 18:36:55 +01:00
build-whitelist.sh sunxi: Fix CONFIG_SUNXI_GMAC references 2017-09-01 20:48:27 +05:30
build_OID_registry lib: add oid registry utility 2019-12-06 16:44:20 -05:00
check-config.sh scripts/check-config.sh: fix to be compatible with BSD sed 2021-02-24 16:51:48 -05:00
checkpatch.pl scripts/checkpatch.pl: Resync with v5.13 2021-09-01 19:25:37 -04:00
checkstack.pl avr32: Retire AVR32 for good 2017-07-06 16:17:19 -04:00
clang-version.sh kconfig / kbuild: Re-sync with Linux 4.20 2021-07-14 16:57:35 -04:00
cleanpatch Makefile: Move some scripts imported from Linux 2013-12-13 09:18:45 -05:00
coccicheck Makefile: add coccicheck target 2017-11-20 20:18:38 -05:00
config_whitelist.txt configs: Resync with savedefconfig 2021-11-12 23:37:42 +00:00
const_structs.checkpatch checkpatch: update from Linux v4.13-rc6 2017-09-14 21:33:00 -04:00
coreboot.sed SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
decodecode scripts: add decodecode from Linux 2018-05-23 22:06:41 -04:00
documentation-file-ref-check scripts: add documentation-file-ref-check 2020-04-17 12:32:36 -04:00
dtc-version.sh Makefile: Only build dtc if needed 2021-10-19 11:23:07 -04:00
env2string.awk env: Allow U-Boot scripts to be placed in a .env file 2021-11-16 14:35:08 -05:00
gcc-stack-usage.sh SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gcc-version.sh kconfig / kbuild: Re-sync with Linux 4.20 2021-07-14 16:57:35 -04:00
gen_ll_addressable_symbols.sh build: remove the variable NM in gen_ll_addressable_symbols.sh 2021-07-28 20:46:34 -04:00
get_default_envs.sh scripts/get_default_envs.sh: Update for thin archive support 2021-07-14 16:57:35 -04:00
get_maintainer.pl get_maintainer.pl: update from Linux kernel v5.13-rc6 2021-07-14 16:57:35 -04:00
Kbuild.include Revert "kbuild: remove unused dtc-version.sh script" 2021-10-19 11:23:07 -04:00
Kconfig.include kconfig: Add scripts/Kconfig.include from v4.19 2020-07-01 10:11:03 -04:00
kernel-doc doc: update Kernel documentation build system 2021-01-27 12:52:57 +01:00
ld-version.sh scripts/ld-version.sh: regular expression compile fails 2017-11-20 20:18:37 -05:00
Lindent scripts/Lindent: import from Linux 3.16 2014-08-21 12:01:29 -04:00
mailmapper scripts/mailmapper: enable running with Python 3 2021-09-28 18:50:55 +03:00
Makefile Makefile: Only build dtc if needed 2021-10-19 11:23:07 -04:00
Makefile.autoconf remove include/config_defaults.h 2020-07-17 10:47:19 -04:00
Makefile.build kconfig / kbuild: Re-sync with Linux 4.20 2021-07-14 16:57:35 -04:00
Makefile.clean kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
Makefile.extrawarn kconfig / kbuild: Re-sync with Linux 4.20 2021-07-14 16:57:35 -04:00
Makefile.host kbuild: cherry-pick kbuild changes from Linux 2020-04-24 16:40:09 -04:00
Makefile.lib efi_loader: Fix link of EFI apps with ld.lld 2021-10-21 03:46:04 +02:00
Makefile.spl Create a new boot/ directory 2021-11-11 19:01:56 -05:00
Makefile.uncmd_spl dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
mkmakefile kconfig / kbuild: Re-sync with Linux 4.20 2021-07-14 16:57:35 -04:00
objdiff scripts: objdiff: Ignore debug info when comparing 2017-08-26 14:56:14 -04:00
setlocalversion scripts/setlocalversion: sync with linux 5.8 2020-08-27 15:55:18 -04:00
show-gnu-make SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spdxcheck.py scripts/checkpatch.pl: Resync with v5.13 2021-09-01 19:25:37 -04:00
spelling.txt scripts/spelling.txt: Sync script with kernel 4.16-rc4 2018-03-05 10:16:30 -05:00