summaryrefslogtreecommitdiff
path: root/env
AgeCommit message (Collapse)Author
2020-04-26MLK-22293-5 env: Update SATA env location driver to use SCSIYe Li
When DM SCSI is enabled with AHCI, use SCSI device to replace SATA device to access the peripheral. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 097bf5dcf79a3fc461c3e27102113cac7372afcf)
2020-04-26MLK-22279-1 env: Add env_get_offset to override static env offsetYe Li
Add env_get_offset interface to override static CONFIG_ENV_OFFSET, and update env location driver to use env_get_offset. So for different storage medium, we are able to store the env at different offset. We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 5b12d7cabb14bab9a95af7460b36c6c85db1b328) (cherry picked from commit 565d9002ac59b03d5bc77c6d88f2b93492166b66)
2020-04-26MLK-18141-2 env: Kconfig: Add ENV_IS_IN_SATA configYe Li
The ENV_IS_IN_SATA config is missed, add it into env/Kconfig, that we can enable it for SATA boot. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 75b6d78fbb2ed29039852f9e652f9acd80bf7eaa) (cherry picked from commit 338f20a1804a21ae11b70b83bd820e0e7e399a1d)
2020-04-26MLK-18141-1 env: sata: Fix build warning and breakYe Li
Fix below build warning and errors: env/sata.c: In function ‘env_sata_save’: env/sata.c:59:9: warning: implicit declaration of function ‘sata_get_dev’ [-Wimplicit-function-declaration] sata = sata_get_dev(env_sata); ^~~~~~~~~~~~ env/sata.c:59:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] sata = sata_get_dev(env_sata); ^ env/sata.c: In function ‘env_sata_load’: env/sata.c:101:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:105:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] sata = sata_get_dev(env_sata); ^ env/sata.c:108:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:113:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:116:9: warning: ‘return’ with a value, in function returning void return env_import(buf, 1); ^~~~~~~~~~~~~~~~~~ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c: At top level: env/sata.c:120:14: error: ‘ENVL_ESATA’ undeclared here (not in a function) .location = ENVL_ESATA, ^~~~~~~~~~ env/sata.c:122:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] .load = env_sata_load, Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit ffdc4c02e0a3eb18c7fddf307887265aa97699a6)
2020-03-09env: Update env_addr for mmc environment driverPankit Garg
Make sure the gd struct is up-to-date. Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-01-30env: Enable SPI flash env for rockchipJagan Teki
Most of the SPI flash devices in rockchip are 16MiB size. So, keeping U-Boot proper offset start from 128MiB with 1MiB size and then start env of 8KiB would be a compatible location between all variants of flash sizes. This patch add env start from 0x14000 with a size of 8KiB. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30env: kconfig: Restrict rockchip env for MMCJagan Teki
Rockchip do support SPI flash as well, so there is a possibility of using flash environment for those use cases. So, restrict the current env offset, size for MMC. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-22env: another attempt at fixing SPL build failuresRasmus Villemoes
I'm also seeing the build failure that commit 7d4776545b env: solve compilation error in SPL tried to fix, namely that the reference to env_flags_validate from env_htab cannot be satisfied when flags.o is not built in. However, that commit got reverted by d90fc9c3de Revert "env: solve compilation error in SPL" Necessary, but not sufficient conditions to see this are CONFIG_SPL=y (obviously) CONFIG_SPL_ENV_SUPPORT=n (so flags.o does not get compiled) CONFIG_SPL_LIBCOMMON_SUPPORT=y (so env/built-in.o is part of the SPL link) Now, these are satisfied for e.g. imx6q_logic_defconfig. But that builds just fine, and spl/u-boot-spl.map lists .data.env_htab among the discarded (garbage collected) sections. Yet, on our mpc8309-derived board, we do see the build failure, so perhaps the linker works a bit differently on ppc than on ARM, or there's yet some other configuration option needed to observe the break. This is another attempt at solving it, which also cleans up env/Makefile a bit: Introduce a def_bool y symbol CONFIG_ENV_SUPPORT which complements CONFIG_(SPL/TPL)_SUPPORT. Then use CONFIG_$(SPL_TPL_)ENV_SUPPORT to decide whether to include the five basic env/*.o files. For attr.o, flags.o and callback.o, this shouldn't change anything. Also, common.o and env.o still get unconditionally built for U-boot proper. But for TPL/SPL, those two are only included if CONFIG_(SPL/TPL)_SUPPORT is set. Having that symbol should also allow simplifying conditionals such as #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) found in drivers/reset/reset-socfpga.c to just CONFIG_IS_ENABLED(ENV_SUPPORT). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2020-01-17common: Move flash_perror() to flash.hSimon Glass
This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-04mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selectedMiquel Raynal
UBI must be enabled when the environment is in UBI. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-02common: Move old EEPROM functions into a new headerSimon Glass
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move sorting functions to their own header fileSimon Glass
These don't need to be in common.h so move them out into a new header. Also add some missing comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02crc32: Use the crc.h header for crc functionsSimon Glass
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-20env: Finish migration of common ENV optionsTom Rini
- In ARMv8 NXP Layerscape platforms we also need to make use of CONFIG_SYS_RELOC_GD_ENV_ADDR now, do so. - On ENV_IS_IN_REMOTE, CONFIG_ENV_OFFSET is never used, drop the define to 0. - Add Kconfig entry for ENV_ADDR. - Make ENV_ADDR / ENV_OFFSET depend on the env locations that use it. - Add ENV_xxx_REDUND options that depend on their primary option and SYS_REDUNDAND_ENVIRONMENT - On a number of PowerPC platforms, use SPL_ENV_ADDR not CONFIG_ENV_ADDR for the pre-main-U-Boot environment location. - On ENV_IS_IN_SPI_FLASH, check not for CONFIG_ENV_ADDR being set but rather it being non-zero, as it will now be zero by default. - Rework the env_offset absolute in env/embedded.o to not use CONFIG_ENV_OFFSET as it was the only use of ENV_OFFSET within ENV_IS_IN_FLASH. - Migrate all platforms. Cc: Wolfgang Denk <wd@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: uboot-stm32@st-md-mailman.stormreply.com Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-11-20env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND checkTom Rini
We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one board where we can simply multiple CONFIG_ENV_SIZE by two for the same result. The other place where we could but were not previously using this is for where env_internal.h checks for if we should set ENV_IS_EMBEDDED. This seems like the most likely use, historically, of the variable, but it was not used. Add logic to check for this now. Cc: Wolfgang Denk <wd@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-11-20env: Add CONFIG_SYS_RELOC_GD_ENV_ADDR symbolTom Rini
Today in initr_reloc_global_data() we use some non-obvious tests to determine if we need to relocate the env_addr within gd or not. In order to facilitate migration of other symbols to Kconfig we need to introduce a new symbol for this particular use case. Cc: Wolfgang Denk <wd@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-12defconfigs: Migrate CONFIG_SYS_REDUNDAND_ENVIRONMENTTom Rini
Move this symbol to Kconfig. As part of this we can drop a UBI-specific symbol that was a stop-gap for not having this particular symbol in Kconfig. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-16ubi: env: fix redundand managementPhilippe Reynes
We check (with a #if defined()) the config ENV_UBI_VOLUME_REDUND to know if there is a redundant env. But this config is a string and is always defined with env is in ubi, so we always consider that a redundand env is used. To fix this issue, I've added a hidden flag ENV_UBI_IS_VOLUME_REDUND that is true when ENV_UBI_VOLUME_REDUND is not "". Then, I check this flag in the code, instead of the string ENV_UBI_VOLUME_REDUND. hs: fixed typo s/condider/consider Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-10-08env: Kconfig: Add environment default offset in versalT Karthik Reddy
This patch adds default offset & sector size values for environment variables to save in qspi/ospi flash for versal. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-10-04Revert "env: solve compilation error in SPL"Tom Rini
This reverts commit 7d4776545b0f8a8827e5d061206faf61c9ba6ea9. The changes here break environment validation and furthermore do not seem to be required. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Rename environment.h to env_internal.hSimon Glass
This file contains lots of internal details about the environment. Most code can include env.h instead, calling the functions there as needed. Rename this file and add a comment at the top to indicate its internal nature. 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> [trini: Fixup apalis-tk1.c] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Drop the ACTION typedefSimon Glass
Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to both the enum and its members to make it clear that these are related to the environment. Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Rename the redundancy flagsSimon Glass
Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Drop the ENTRY typedefSimon Glass
U-Boot is not supposed to use typedef for structs anymore. Also this name is the same as the ENTRY() macro used in assembler files, and 'entry' itself is widely used in U-Boot (>8k matches). Drop the typedef and rename the struct to env_entry to reduce confusion. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_valid to env.hSimon Glass
This enum is somewhat widely used to determine if the environment is valid or not. Move it to the common environment header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
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>
2019-08-11env: Move get/set_default_env() to env.hSimon Glass
Move these functions to the new header file and rename set_default_env() to env_set_default() so that it has a consistent env_ prefix. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move set_default_vars to env.hSimon Glass
Move this function to the new header file and rename it so it has an env_ prefix. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_get() to env.hSimon Glass
Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_set() to env.hSimon Glass
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_relocate() to env.hSimon Glass
Move env_relocate() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_init() to env.hSimon Glass
Move env_init() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-18env: mmc: add erase-functionFrank Wunderlich
this adds erase environment for mmc storage squashed fixes: - add CONFIG_CMD_ERASEENV - env: erase redundant offset if defined - changes mentioned by Simon - fix whitespaces around errmsg Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-07-18env: register erase commandFrank Wunderlich
this patch adds basic changes for adding a erase-subcommand to env with this command the environment stored on non-volatile storage written by saveenv can be cleared. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> squashed fixes - start message with "Erasing" - mark erase-function as optional - env: separate eraseenv from saveenv Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-07-12stm32mp1: move CONFIG_ENV in KconfigPatrick Delaunay
Move 2 ENV configuration flags in board Kconfig - CONFIG_ENV_SECT_SIZE - CONFIG_ENV_OFFSET Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-09env: ubi: support configurable VID offsetHamish Guthrie
Introduce KConfig CONFIG_ENV_UBI_VID_OFFSET to allow providing custom VID header offsets for the environment on UBI. Signed-off-by: Hamish Guthrie <hamish.guthrie@kistler.com> Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
2019-07-09at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigsMarkus Klotzbuecher
Enable the extended ENV options for AT91 and OMAP2PLUS in order to be able to use CONFIG_ENV_UBI_* on these architectures. As this change also makes the configs ENV_SIZE, ENV_SECT_SIZE, ENV_OFFSET visible to AT91 and OMAP2PLUS, migrate users of these to KConfig. This migration was run using an extended moveconfig.py which evaluates expressions such as "(512 << 10)". See patch ("moveconfig: expand simple expressions"). All modified boards were built with SOURCE_DATE_EPOCH=0 before and after the change and successfully confirmed that the identical binary is generated (the only exception was igep00x0, which does not define CONFIG_ENV_IS_IN_UBI in the original board header. Once that is defined, the test passes too). hs: rebased patch to: 68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT" Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Heiko Schocher <hs@denx.de> Cc: Eugen Hristev <eugen.hristev@microchip.com> Cc: Tom Rini <trini@konsulko.com>
2019-07-09env: ubi: KConfig: add CONFIG_ENV_UBI_VOLUME_REDUNDMarkus Klotzbuecher
Introduce the KConfig option CONFIG_ENV_UBI_VOLUME_REDUND for defining the name of the UBI volume used to store the redundant environment. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> hs: get rid of stm32mp1* build errors
2019-06-17Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
- Drop zipitz2 board (Tom) - Add DEPRECATED option (Tom) - Mark legacy or non-dm drivers as DEPRECATED (Jagan)
2019-06-13Kconfig: Add SPI / SPI_FLASH as dependenciesTom Rini
In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled. Express this in the Kconfigs. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-06env: allow ENV_IS_NOWHERE with other storage targetPatrice Chotard
Allow U-Boot to get default environment for some boot mode (USB for example), and to select storage location when it is booting from flash device; ENVL_NOWHERE is present in env_locations with other one. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-06env: ext4: Allow overriding interface, device and partitionPatrice Chotard
For platform which can boot on different device, this allows to override interface, device and partition from board code. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-05-23env: solve compilation error in SPLPatrick Delaunay
Solve compilation issue when cli_simple.o is used in SPL and CONFIG_SPL_ENV_SUPPORT is not defined. env/built-in.o:(.data.env_htab+0xc): undefined reference to `env_flags_validate' u-boot/scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed make[2]: *** [spl/u-boot-spl] Error 1 u-boot/Makefile:1649: recipe for target 'spl/u-boot-spl' failed make[1]: *** [spl/u-boot-spl] Error 2 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23stm32mp1: Move ENV_SIZE and ENV_OFFSET to KconfigPatrick Delaunay
Add arch stm32mp for ENV migration step and drop more items from include/configs/xxx.h. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-09env: spi: Fix incorrect entry descriptionMarek Vasut
Fix the max frequency entry description, it's incorrect. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Tom Rini <trini@konsulko.com>
2019-04-12env: Don't check CONFIG_ENV_OFFSET_REDUND for SPL buildMartyn Welch
When booting using an SPL on am335x, if we want to support booting with the boot ROM loader via USB (which uses RNDIS, making bootp and tftp calls) we need to enable gadget eth in the SPL to load the main U-Boot image. To enable CONFIG_SPL_ETH_SUPPORT, we must enable CONFIG_SPL_ENV_SUPPORT as the environment is used by the eth support, but we don't actually need to have environment variables saved in the SPL environment. We do however have environment variables saved in the main U-Boot image and enable CONFIG_ENV_OFFSET_REDUND (we are storing in raw NAND). In such instances, even with the build config enabling both CONFIG_CMD_SAVEENV and CONFIG_CMD_NAND, these options aren't set when building the SPL, but CONFIG_ENV_OFFSET_REDUND still is. Don't check this configuration option for SPL builds to enable the above configuration. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-04-09fs: ext4: Add support for the creation of symbolic linksJean-Jacques Hiblot
Re-use the functions used to write/create a file, to support creation of a symbolic link. The difference with a regular file are small: - The inode mode is flagged with S_IFLNK instead of S_IFREG - The ext2_dirent's filetype is FILETYPE_SYMLINK instead of FILETYPE_REG - Instead of storing the content of a file in allocated blocks, the path to the target is stored. And if the target's path is short enough, no block is allocated and the target's path is stored in ext2_inode.b.symlink As with regulars files, if a file/symlink with the same name exits, it is unlinked first and then re-created. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix ext4 env code] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-03-25Convert CONFIG_ENV_SPI_* to KconfigPatrick Delaunay
This converts the following to Kconfig: CONFIG_ENV_SPI_BUS CONFIG_ENV_SPI_CS CONFIG_ENV_SPI_MAX_HZ CONFIG_ENV_SPI_MODE Most of time these value are not needed, CONFIG_SF_DEFAULT with same value is used, so I introduced CONFIG_USE_ENV_SPI_* to force the associated value for the environment. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-03-13Revert "env: add spi_flash_read_env function"Heiko Schocher
This reverts commit 9a9d66f5eff0f443de4c2c6ca3e27771ed14b1b4. because it breaks fw_setenv and U-Boot interworking, if U-Boot environment is stored in a SPI-NOR. Reproduce it with: boot linux with empty Environment and store a variable with fw_setenv into it, the Environment is now filled with 0xff: root@ckey5e:10:8e:~# hexdump -C /dev/mtd4 00000000 e9 e8 07 fa 01 62 6f 6f 74 63 6d 64 3d 72 75 6e |.....bootcmd=run| [...] 00000f30 7d 00 75 62 69 62 6f 6f 74 76 6f 6c 3d 32 00 00 |}.ubibootvol=2..| 00000f40 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| Boot now U-Boot prints: Loading Environment from SPI Flash... SF: Detected s25fl128l with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment Reason is the above commit, as it only reads until \0\0 is found, and assumes the rest of the Environment space is filled with 0x00, which is not the case when saving an Environment under linux with fw_setenv. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
2019-01-26Merge branch '2019-01-25-master-imports'Tom Rini
- snapdragon 820c improvements - poplar updates - DFU + SPL cleanups - Improve the mediatek mmc driver - Other minor cleanups / improvements