- Aug 07, 2018
-
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
- Jul 13, 2018
-
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
- Jun 13, 2018
-
-
Alex Kiernan authored
If ENV_IS_IN_EXT4 is set you shouldn't be able to select ENV_IS_NOWHERE. Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Tested-by:
Petr Vorel <petr.vorel@gmail.com>
-
Shyam Saini authored
's/environemnt/environment/' and 's/Environemnt/Environment/' Signed-off-by:
Shyam Saini <shyam@amarulasolutions.com>
-
- May 07, 2018
-
-
Tom Rini authored
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>
-
- Apr 27, 2018
-
-
Tom Rini authored
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Apr 16, 2018
-
-
Heinrich Schuchardt authored
For CONFIG_ENV_FAT_INTERFACE != 'mmc' a link error env/fat.c:93: undefined reference to `mmc_initialize' occurs if CONFIG_MMC_SUPPORT is not enabled. Fixes: 26862b4a ("env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it") Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Siva Durga Prasad Paladugu authored
Relocate env drivers if manual relocation is enabled. This patch fixes the issue of u-boot hang incase if env is present in any of the flash devices. Signed-off-by:
Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Apr 09, 2018
-
-
Alex Kiernan authored
Convert CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to Kconfig Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Petr Vorel <petr.vorel@gmail.com> Reviewed-by: Petr Vorel <petr.vorel at gmail.com>
-
- Apr 07, 2018
-
-
Sjoerd Simons authored
Use CONFIG_IS_ENABLED to see if CONFIG_BLK is enabled. Otherwise SPL compilation breaks on boards which do have CONFIG_BLK enabled but not DM_MMC for the SPL as follows: env/mmc.c: In function ‘init_mmc_for_env’: env/mmc.c:164:6: warning: implicit declaration of function ‘blk_get_from_parent’; did you mean ‘efi_get_ram_base’? [-Wimplicit-function-declaration] if (blk_get_from_parent(mmc->dev, &dev)) ^~~~~~~~~~~~~~~~~~~ efi_get_ram_base env/mmc.c:164:29: error: ‘struct mmc’ has no member named ‘dev’ if (blk_get_from_parent(mmc->dev, &dev)) ^~ Signed-off-by:
Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Rasmus Villemoes authored
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>
-
- Apr 06, 2018
-
-
Christophe Leroy authored
Commit 7653942b ("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: 7653942b ("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>
-
- Apr 04, 2018
-
-
Andre Przywara authored
Since the dawn of time for the Allwinner support in mainline U-Boot we store the environment to the SD card and write directly at 544KB from the beginning of the device. This leads to problems when the U-Boot proper image grows beyond 504KB and eventually overlaps. With one release of having the environment preferably in a FAT partition, let's now turn off the MMC variant fallback, so we get back all the space we need to implement features. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Jagan Teki <jagan@openedev.com> Acked-by:
Maxime Ripard <maxime.ripard@bootlin.com>
-
- Mar 24, 2018
-
-
Petr Vorel authored
Signed-off-by:
Petr Vorel <petr.vorel@gmail.com>
-
Petr Vorel authored
Introduce another difference from upstream (kernel) source in fs/ubifs/super.c: adding preprocessor condition as y variable in mount_ubifs() depends on CONFIG_UBIFS_SILENCE_MSG: fs/ubifs/super.c:1337:15: error: variable ?y? set but not used [-Werror=unused-but-set-variable] long long x, y; Not setting CONFIG_UBIFS_SILENCE_MSG in am335x_igep003x_defconfig and igep0032_defconfig. Although it was defined in their config headers, it depends on CMD_UBIFS which is not set for them. Signed-off-by:
Petr Vorel <petr.vorel@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Heiko Schocher <hs@denx.de>
-
- Feb 20, 2018
-
-
Faiz Abbas authored
When booting from a non-MMC device, the MMC sub-system may not be initialized when the environment is first accessed. We need to make sure that the MMC sub-system is ready in even a non-MMC boot case. Therefore, initialize mmc before loading environment from it. Signed-off-by:
Faiz Abbas <faiz_abbas@ti.com>
-
- Feb 16, 2018
-
-
Goldschmidt Simon authored
With multiple environments, the 'get_char' callback for env drivers does not really make sense any more because it is only supported by two drivers (eeprom and nvram). To restore single character loading for these drivers, override 'env_get_char_spec'. Signed-off-by:
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by:
Maxime Ripard <maxime.ripard@bootlin.com>
-
York Sun authored
Commit 7d714a24 ("env: Support multiple environments") added static variable env_load_location. When saving environmental variables, this variable is presumed to have the value set before. In case the value was set before relocation and U-Boot runs from a NOR flash, this variable wasn't writable. This causes failure when saving the environment. To save this location, global data must be used instead. Signed-off-by:
York Sun <york.sun@nxp.com> CC: Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Feb 12, 2018
-
-
Alex Kiernan authored
When saving the environment on a platform which has DMA alignment larger than the natural alignment, env_fat_save triggers a debug message in file_fat_write: Saving Environment to FAT... writing uboot.env FAT: Misaligned buffer address (9df1c8e0) OK Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
- Feb 01, 2018
-
-
Simon Goldschmidt authored
For the redundant environment configuration, env_sf_load still contained duplicate code instead of using env_import_redund(). Simplify the code by only executing the load twice and delegating everything else to env_import_redund. Signed-off-by:
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Simon Goldschmidt authored
For multiple env drivers to correctly implement fallback when one environment fails to load (e.g. crc error), the return value of env_import has to be propagated by all env driver's load function. Without this change, the first driver that succeeds to load an environment with an invalid CRC return 0 (success) and no other drivers are checked. Signed-off-by:
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Simon Goldschmidt authored
There is more common code in mmc, nand and ubi env drivers that can be shared by moving to env_import_redund. For this, a status/error value whether the buffers were loaded are passed as additional parameters to env_import_redund. Ideally, these are already returned to the env driver by the storage driver. This is the case for mmc, nand and ubi, so for this change, code deduplicated. Signed-off-by:
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Jan 31, 2018
-
-
Simon Goldschmidt authored
env_import (and env_import_redund) currently return 1 on success and 0 on error. However, they are only used from functions returning 0 on success or a negative value on error. Let's clean this up by making env_import and env_import_redund return 0 on success and -EIO on error (as was the case for all users before). Users that cared for the return value are also updated. Funny enough, this only affects onenand.c and sf.c Signed-off-by:
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Jan 27, 2018
-
-
Maxime Ripard authored
Now that we have everything in place to implement the transition scheme, let's enable it by default. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Allow boards and architectures to override the default environment lookup code by overriding env_get_location. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Now that we have everything in place in the code, let's allow to build multiple environments backend through Kconfig. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
The raw MMC environment directly calls into the MMC framework. Make sure it's enabled before we can select it. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Jaehoon Chung <jh80.chung@samsung.com>
-
Maxime Ripard authored
Since we want to have multiple environments, we will need to initialise all the environments since we don't know at init time what drivers might fail when calling load. Let's init all of them, and only consider for further operations the ones that have not reported any errors at init time. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Now that we have everything in place to support multiple environment, let's make sure the current code can use it. The priority used between the various environment is the same one that was used in the code previously. At read / init times, the highest priority environment is going to be detected, and we'll use the same one without lookup during writes. This should implement the same behaviour than we currently have. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Since we have global messages to indicate what's going on, the custom messages in the environment drivers only make the output less readable. Make the common code play a little nicer by removing all the extra output in the standard case. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Since we have global messages to indicate what's going on, the custom messages in the environment drivers only make the output less readable. Make MMC play a little nicer by removing all the extra \n and formatting that is redundant with the global output. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Jaehoon Chung <jh80.chung@samsung.com>
-
Maxime Ripard authored
Since we have global messages to indicate what's going on, the custom messages in the environment drivers only make the output less readable. Make FAT play a little nicer by removing all the extra \n and formatting that is redundant with the global output. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Since we can have multiple environments now, it's better to provide a decent indication on what environments were tried and which were the one to fail and succeed. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
Since we'll soon have support for multiple environments, the environment saving message might end up being printed multiple times if the higher priority environment cannot be used. That might confuse the user, so let's make it explicit if the operation failed or not. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
In preparation for the multiple environment support, let's introduce two new parameters to the environment driver lookup function: the priority and operation. The operation parameter is meant to identify, obviously, the operation you might want to perform on the environment. The priority is a number passed to identify the environment priority you want to retrieve. The lowest priority parameter (0) will be the primary source. Combining the two parameters allow you to support multiple environments through different priorities, and to change those priorities between read and writes operations. This is especially useful to implement migration mechanisms where you want to always use the same environment first, be it to read or write, while the common case is more likely to use the same environment it has read from to write it to. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
The env_driver_lookup_default and env_get_default_location functions are about to get refactored to support loading from multiple environment. The name is therefore not really well suited anymore. Drop the default part to be a bit more relevant. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Maxime Ripard authored
The nvedit command is the only user of env_driver_lookup_default outside of the environment code itself, and it uses it only to print the environment it's about to save to during env save. As we're about to rework the environment to be able to handle multiple environment sources, we might not have an idea of what environment backend is going to be used before trying (and possibly failing for some). Therefore, it makes sense to remove that message and move it to the env_save function itself. As a side effect, we also can get rid of the call to env_driver_lookup_default that is also about to get refactored. Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Jan 22, 2018
-
-
Tuomas Tynkkynen authored
Make it select FS_FAT as well, because if it's not selected, enabling ENV_IS_IN_FAT causes a Kconfig warning: warning: (ENV_IS_IN_FAT) selects FAT_WRITE which has unmet direct dependencies (FS_FAT) This also allows dropping some code from config_fallbacks. Also drop the unnecessary help text about having to enable CONFIG_FAT_WRITE - Kconfig automatically handles that. Signed-off-by:
Tuomas Tynkkynen <tuomas@tuxera.com>
-
- Jan 17, 2018
-
-
Ashish Kumar authored
ENV variables can now be used before relocation. Signed-off-by:
Ashish Kumar <Ashish.Kumar@nxp.com> Reviewed-by:
York Sun <york.sun@nxp.com>
-
- Jan 15, 2018
-
-
Jorge Ramirez-Ortiz authored
For example to store the environment in a file named "/uboot.env" in MMC "0", where partition "1" contains the EXT4 filesystem, the following configs should be added to the board's default config: CONFIG_ENV_IS_IN_EXT4=y CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1" CONFIG_ENV_EXT4_FILE="/uboot.env" CONFIG_ENV_EXT4_INTERFACE="mmc" Signed-off-by:
Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> [trini: Fix some line over 80 chars issues] Signed-off-by:
Tom Rini <trini@konsulko.com>
-