[PATCH v11] efi_vars: Implement SPI Flash store

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Mar 14 10:19:08 CET 2026


On 3/13/26 16:45, Michal Simek wrote:
> From: Shantur Rathore <i at shantur.com>
> 
> Currently U-Boot uses ESP as storage for EFI variables.
> Devices with SPI Flash are used for storing environment with this
> commit we allow EFI variables to be stored on SPI Flash.
> 
> Signed-off-by: Shantur Rathore <i at shantur.com>
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> Tested-by: Neil Armstrong <neil.armstrong at linaro.org> # on AML-S905D3-CC
> Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

Tested on StarFive VisionFive 2.

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>


The next logical step will be to define a value like RTStorageVolatile 
and allow to select CONFIG_EFI_RT_VOLATILE_STORE.

One way to define the location would be a SPI flash partition defined in 
the device-tree. An EFI variable could provide the compatible property 
of the partition that efivar should write to.

     partitions {
         compatible = "fixed-partitions";
         #address-cells = <1>;
         #size-cells = <1>;

         partition at c0000 {
             compatible = "uboot-efivar";
             reg = <0xc0000 0x20000>;
         };
     };

cf. Linux
Documentation/devicetree/bindings/mtd/partitions/partition.yaml

Best regards

Heinrich


More information about the U-Boot mailing list