[U-Boot] Snow: SPI environment used when booting from MMC, SPI driver broken

Michal Suchanek hramrach at gmail.com
Tue Feb 14 13:20:45 UTC 2017


Hello,

typing saveenv I get:
Saving environment to SPI Flash...
SF: Detected gd25lq32 with page size 256 Bytes, erase size 4 KiB, total 4 MiB
Cannot set speed (err=-1)
*** Warning - spi_flash_probe_bus_cs() failed, using defualt environment

snow #

and now environment is not saved and it seems it is indeed reset to default.

This is wrong on several levels

- storing evironment in flash is attempted when booted from mmc - it
might make sense to read both media(os)-specific environment *and*
device-specific environment but in absence of default mechanism to
merge the two environment should primarily come from boot medium and
the scripts on the boot medium may then load device-specific
environment from medium-neutral device-specific storage.
- when storing environment fails it is reset
- the flash description is not sufficient for the flash driver to
access the flash
- I wonder how well thought out the storage mechanism is - the flash
normally contains a partition table and with start of the flash
readonly. There is probably a partition at the end that can be used
for environment but u-boot clearly did not read that since it uses the
default scripts.

I can do with using default environment and changing the disk layout
to what u-boot expects but it would be nice if the environment
actually worked.

Thanks

Michal


More information about the U-Boot mailing list