[U-Boot] [PATCH 0/5] sunxi: env: Load environment from boot media
andre.przywara at arm.com
Sat Jun 8 01:26:53 UTC 2019
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.
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(-)
More information about the U-Boot