- May 19, 2024
-
-
Tom Rini authored
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd135, reversing changes made to 2ee6f3a5. Reported-by:
Jonas Karlman <jonas@kwiboo.se> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- May 17, 2024
-
-
Specifying a file in an EXT4 or FAT partition on a virtio device as environment location failed because virtio hadn't been initialized by the time the environment was loaded. This patch mirrors commit 54ee5ae8 ("Add SCSI scan for ENV in EXT4 or FAT") in issue and fix, just for a different kind of block device. The additional include in include/virtio.h is needed so all functions called there are defined, the alternative would have been to include dm/device.h separately in the env/ sources. Checkpatch suggests using "if (IS_ENABLED(CONFIG...))" instead of "#if defined(CONFIG_...)", I'm sticking to the style of the existing code here. Signed-off-by:
Fiona Klute <fiona.klute@gmx.de> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Bin Meng <bmeng.cn@gmail.com> CC: Rogier Stam <rogier@unrailed.org>
-
- May 06, 2024
-
-
Tom Rini authored
Remove <common.h> from all "env/" files and when needed add missing include files directly. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
With the migration to Kconfig complete, we can now add some previously missing dependencies to some commands. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Apr 18, 2024
-
-
This prints the MMC device being read similar to how we print the MMC device we write to when e.g. calling saveenv. One of the side effects is that the boot log now shows from which MMC device the env was loaded: Loading Environment from MMC... Reading from MMC(1)... OK This is useful to identify which MMC device the environment was loaded from for boards where there are more than one (e.g. eMMC and SD card) without adding some debug messages manually. Sadly, there's no way to know which of the default or redundant environment is being read from env_mmc_load before env_import_redund is called so it is printing a bit later (and possibly after error/warning messages). Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by:
Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Dragan Simic <dsimic@manjaro.org>
-
- Mar 22, 2024
-
-
Venkatesh Yadav Abbarapu authored
Enable saving variables to MMC(FAT) and SPI based on primary bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE). Enable ENV_FAT_DEVICE_AND_PART="0:auto" for versal-net platform as well. Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20240312113421.7394-1-venkatesh.abbarapu@amd.com Signed-off-by:
Michal Simek <michal.simek@amd.com>
-
- Jan 29, 2024
-
-
In the non-redundant code for env_sf_save(), a failure to malloc() the temporary buffer produces the following output: Saving Environment to SPIFlash... OK This is misleading as the flash has neither been erased nor written. Fix it to return an error to the caller, so the output will be: Saving Environment to SPIFlash... Failed (-12) Note that there is another copy of env_sf_save() in the same file, for handling redundant environment, and it already has the same logic. Signed-off-by:
Ralph Siemsen <ralph.siemsen@linaro.org>
-
- Jan 22, 2024
-
-
Tom Rini authored
In order for our environment to be present on SPI flash we need to depend not on the symbol for a SPI controller but rather that SPI flash of some sort is present. Update the dependencies. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Jan 19, 2024
-
-
Since both functions share a similar goal and env_get_default_into can do what env_get_default wants to do with specific arguments, let's make env_get_default call env_get_default_into so as to avoid code duplication. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Kever Yang <kever.yang@rock-chips.com> Signed-off-by:
Quentin Schulz <quentin.schulz@theobroma-systems.com>
-
env_get_default suffers from a particular issue int that it can only return a value truncated to gd->env_buf (32) characters. This may be enough for most variables but it isn't for others, so let's allow users to provide a preallocated buffer to copy the value into instead, allowing for more control, though it'll still be truncated if the value size is bigger than the preallocated buffer. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Kever Yang <kever.yang@rock-chips.com> Signed-off-by:
Quentin Schulz <quentin.schulz@theobroma-systems.com>
-
- Jan 18, 2024
-
-
Fix a typo: add a space after the single quote in 'illegal character' error message in 'env set' command Signed-off-by:
Ivan Orlov <ivan.orlov@codethink.co.uk>
-
- Dec 21, 2023
-
-
Tom Rini authored
In general terms, we -include include/linux/kconfig.h and so normal U-Boot code does not need to also #include it. However, for code which is shared with userspace we may need to add it so that either our full config is available or so that macros such as CONFIG_IS_ENABLED() can be evaluated. In this case make sure that we guard these includes with a test for USE_HOSTCC so that it clear as to why we're doing this. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Dec 13, 2023
-
-
The declaration of U_BOOT_ENV_LOCATION() uses a different #ifdef condition from the code it calls. Use the same condition to avoid a build warning if CONFIG_CMD_SAVEENV is disabled. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
- Nov 16, 2023
-
-
The part_length parameter is not used. Remove it. Signed-off-by:
Sean Anderson <seanga2@gmail.com>
-
- Nov 07, 2023
-
-
Tom Rini authored
Inside of env/common.c we already have our helper env_set_xxx functions, and even have a comment that explains why env_set() itself wasn't moved. We now handle that move. This requires that we rename the previous _do_env_set() to env_do_env_set() and note it as an internal env function. Add comments about this function to explain why we do this when we add the prototype. Add a new function, env_inc_id() to allow for the counter to be updated by both commands and callers, and document this as well by the prototype. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Oct 11, 2023
-
-
When reading Kconfig help messages to understand ENV_OFFSET and ENV_OFFSET_REDUND, developers may not realise that they need to also look at the chosen ENV_IS_IN_* options to see how the offsets will be interpreted. Signed-off-by:
Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Oct 10, 2023
-
-
PPA was a secure firmware developed in-house which is no longer supported and replaced by TF-A quite some years ago. Drop support for it. Signed-off-by:
Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by:
Peng Fan <peng.fan@nxp.com>
-
- Sep 24, 2023
-
-
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Sep 14, 2023
-
-
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162a ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by:
Marek Vasut <marek.vasut+renesas@mailbox.org>
-
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162a ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by:
Marek Vasut <marek.vasut+renesas@mailbox.org>
-
- Aug 09, 2023
-
-
Tom Rini authored
It is not a parse error to have a default value of "0" for a "hex" type entry, instead of "0x0". However, "0" and "0x0" are not treated the same even by the tools themselves. Correct this by changing the default value from "0" to "0x0" for all hex type questions that had the incorrect default. Fix one instance (in two configs) of a default of "0" being used on a hex question to be "0x0". Remove the cases where a defconfig had set a value of "0x0" to be used as the default had been "0". Signed-off-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jul 17, 2023
-
-
When CONFIG_SYS_REDUNDAND_ENVIRONMENT is enabled, by default env is getting saved to redundant environment irrespective of primary env is present or not. It means even if primary and redundant environment are not present, by default, env is getting stored to redundant environment. Even if primary env is present, it is choosing to store in redudndant env. Ideally it should look for primary env and choose to store in primary env if it is present. If both primary and redundant env are not present then it should save in to primary env area. Fix the issue by making env_valid = ENV_INVALID when both the environments are not present. Signed-off-by:
Ashok Reddy Soma <ashok.reddy.soma@amd.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jul 14, 2023
-
-
The new opt-out setting, CONFIG_ENV_MMC_PARTITION, statically sets the MMC environment partition name. Prior to this patch, the only way to declare this partition name was by creating a 'u-boot,mmc-env-partition' parameter in the device-tree's /config node. This setting provides additional flexibility, particularly in cases where accessing the device-tree is not straightforward (e.g. QEMU). If undeclared, the device-tree's setting will be used. Signed-off-by:
Emmanuel Di Fede <emmanuel.difede@cysec.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
-
- May 16, 2023
-
-
When using a list of writeable variables, the initial values come from the built-in default environment since commit 5ab81058 ("env: Complete generic support for writable list"). Remove leftover of misuse of the env is nowhere driver as default environment. Signed-off-by:
Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
-
- May 09, 2023
-
-
Avoid error messages when SPL,TPL,VPL build don't have the environment options of the main build. This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed to CONFIG_IS_ENABLED(ENV_IS_IN_xxx). Signed-off-by:
Troy Kisky <troykiskyboundary@gmail.com>
-
- Mar 02, 2023
-
-
Add an option to put the VPL environment nowhere (not in storage). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 23, 2023
-
-
Apply the GPT U-Boot environment GUID type look up only on eMMC user HW partition, do not apply the look up on eMMC boot HW partitions as mmc_offset_try_partition() assumes either SD partitions or eMMC user HW partition. This fixes environment operation on systems where CONFIG_SYS_MMC_ENV_PART is non-zero and CONFIG_SYS_REDUNDAND_ENVIRONMENT is set. Fixes: 80105d8f ("env: mmc: select GPT env partition by type guid") Signed-off-by:
Marek Vasut <marex@denx.de> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Feb 10, 2023
-
-
Boards may set networking variables programmatically, thus may have CONFIG_NET on but CONFIG_CMD_NET off. The IOT2050 is an example. CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
This completes what 890feeca started by selecting ENV_APPEND and loading the default env before any other sources. This ensures that load operations pick up all non-writable vars from the default env and only permitted parts from other locations according to the regular priorities. With this change, boards only need to define the list of writable variables but no longer have to provide a custom env_get_location implementation. CC: Joe Hershberger <joe.hershberger@ni.com> CC: Marek Vasut <marex@denx.de> CC: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
- Feb 07, 2023
-
-
This is not used anywhere, so drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 06, 2023
-
-
Fix the issue in commit 46c9016b ("env: mcc: Drop unnecessary #ifdefs") If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value becomes undetermined, so write env to unexpected offset. Signed-off-by:
Ye Li <ye.li@nxp.com> Reviewed-by:
Jaehoon Chung <jh80.chung@samsung.com>
-
- Jan 11, 2023
-
-
Add trace in env save to indicate any errors to end user and avoid silent output when the command 'env erase' is not executed as it is done in env_save with commit 8968288c ("env: add failing trace in env_save") Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Add support of opts erase for ubi env backend, this opts is used by command 'env erase'. This command only zero-fill the env UBI volume CONFIG_ENV_UBI_VOLUME and CONFIG_ENV_UBI_VOLUME_REDUND, so the saved environment becomes invalid. This patch introduces a local define ENV_UBI_VOLUME_REDUND only to avoid #if in the code, as CONFIG_ENV_UBI_VOLUME_REDUND is only defined when CONFIG_SYS_REDUNDAND_ENVIRONMENT is defined. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Jan 10, 2023
-
-
Remove the unused macro STR(X) since the commit 2b2f7275 ("env: mmc: allow support of mmc_get_env_dev with OF_CONTROL") Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
Add a debug message to indicate a potential issue when "u-boot,mmc-env-partition" is present in config node of device tree but this partition name is not found in the mmc device. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
Since commit c0364ce1 ("doc/README.gpt: define partition type GUID for U-Boot environment"), a specific type GUID can be used to indicate the U-Boot environment partition on the device with GPT partition table. This patch uses this type GUID to found the env partition as fallback when the partition name property "u-boot,mmc-env-partition" is not present in config node or if the indicated partition name is not found. The mmc_offset_try_partition() function is reused, it selects the first partition with the correct type GUID when the parameter 'str' is NULL. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
Add a new config CONFIG_ENV_MMC_USE_DT to force configuration of the U-Boot environment offset with device tree config node. This patch avoids issues when several CONFIG_ENV_IS_IN_XXX are activated, the defconfig file uses the same value for CONFIG_ENV_OFFSET or CONFIG_ENV_OFFSET_REDUND for the several ENV backends (SPI_FLASH, EEPROM NAND, SATA, MMC). After this patch a bad offset value is not possible when the selected partition in device tree is not found. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
When ENV_IS_EMBEDDED is enabled, ret is not defined but is used as a return value in env_mmc_load(). This patch correct this issue and simplify the existing code, test only one time #if defined(ENV_IS_EMBEDDED) and not in the function. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. This patch replaces the test on CONFIG_ENV_OFFSET_REDUND for the more coherent CONFIG_SYS_REDUNDAND_ENVIRONMENT. This patch also corrects a compilation issue in init_mmc_for_env() when CONFIG_SYS_MMC_ENV_PART is not activated, env_mmc_orig_hwpart is not defined. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-
Introduce ENV_MMC_OFFSET defines. It is a preliminary step to the next patches to simplify the code. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@foss.st.com>
-