Skip to content

sunxi: env: Load environment from boot media

Andre Przywara u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5env: allow undefined CONFIG_SYS_MMC_ENV_DEVenv/mmc.c+4 -01 reply
1/5env: allow undefined CONFIG_SYS_MMC_ENV_DEV+0 -01 reply
2/5sunxi: autodetect SD/eMMC device for environmentboard/sunxi/board.c include/configs/sunxi-common.h+19 -70 replies
3/5env: allow runtime determination of FAT environment partitionenv/fat.c include/environment.h+13 -41 reply
4/5sunxi: use FAT environment from boot sourceboard/sunxi/board.c+9 -00 replies
5/5sunxi: use boot source for determining environment locationboard/sunxi/board.c+31 -80 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchTom Rini
1/5
1/5
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/5] sunxi: env: Load environment from boot media

At the moment we need to configure the place where U-Boot tries to load its environment from at compile time. This is not only inflexible, but also unnecessary, as we have easy access to the boot source.

This series prepares U-Boot on Allwinner boards to load the environment from the same media where the SPL and U-Boot proper were loaded from. This allows to keep one firmware binary, and copy it to an SD card, eMMC or even SPI flash, without needing to configure it differently.

Patches 1 and 2 introduce that runtime decision for a raw MMC environment, patches 3 and 4 for FAT.
Patch 5 considers the boot source when working out the location priority for the environment: it will always consider the boot source first, then fall back to the existing algorithm.

This enables to build flasher images, which boot from SD card, but for instance provide a bootmenu with the option to copy this very image to eMMC or SPI flash.

Cheers,
Andre.

Andre Przywara (5):
env: allow undefined CONFIG_SYS_MMC_ENV_DEV
sunxi: autodetect SD/eMMC device for environment
env: allow runtime determination of FAT environment partition
sunxi: use FAT environment from boot source
sunxi: use boot source for determining environment location

 board/sunxi/board.c            | 67 +++++++++++++++++++++++++++++++++++++-----
 env/fat.c                      | 13 +++++---
 env/mmc.c                      |  4 +++
 include/configs/sunxi-common.h |  7 -----
 include/environment.h          |  4 +++
 5 files changed, 76 insertions(+), 19 deletions(-)
Signature · 1 line
2.14.5