[U-Boot] [PATCH v2 2/3] sunxi: Pine64-LTS: enable environment in spi flash
André Przywara
andre.przywara at arm.com
Fri Aug 2 00:15:04 UTC 2019
On 01/08/2019 20:50, Oskari Lemmela wrote:
Hi,
> enable config options for spi flash device and
> environment in spi flash.
First I am not sure if defining this unconditionally to put the
environment in SPI flash is a good idea. People might expect to be able
to (continue to) use an environment from the SD card if they just booted
from one.
Hence my efforts to allow to use the environment from the respective
boot media:
https://lists.denx.de/pipermail/u-boot/2019-June/372025.html
Secondly, this uses CONFIG_ENV_OFFSET to place the environment in SPI
flash. For historical reasons this is 0x88000 for sunxi (old raw SD card
offset), so 544KB. Which lets a saveenv overwrite the last part of
U-Boot, if you have put it there.
So we should define this to something higher, I suggest just below 1MB,
so 0xe0000.
Actually I wonder why the default size is 128KB, when the typical
environments are so much smaller. For my experiments I used 64KB at
0xf0000, which gives U-Boot more room to grow in the future.
Cheers,
Andre.
> Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
> ---
> configs/pine64-lts_defconfig | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
> index 0da6b70ea8..34c38cf1fd 100644
> --- a/configs/pine64-lts_defconfig
> +++ b/configs/pine64-lts_defconfig
> @@ -18,3 +18,10 @@ CONFIG_SUN8I_EMAC=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_OHCI_HCD=y
> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> +CONFIG_DM_SPI=y
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_ENV_IS_IN_SPI_FLASH=y
> +CONFIG_SPI=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_WINBOND=y
> +CONFIG_SPI_SUNXI=y
>
More information about the U-Boot
mailing list