[PATCH] efi_loader: avoid adding variables twice

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Dec 29 09:16:05 CET 2022


On 12/29/22 07:55, Ilias Apalodimas wrote:
> When the efi subsystem starts we restore variables that are both in a
> file or stored into the .efi_runtime section of U-Boot.  However once
> a variable gets created or changed the preseeded entries will end up in
> the file.  As a consequence on the next boot we will end up adding
> identical variable entries twice.
>
> Fix this by checking if the to be inserted variable already exists.
> Also swap the restoration order and start with the file instead of the
> builtin variables,  so a user can replace the preseeded ones if needed.
>
> Tested-by: Leo Yan <leo.yan at linaro.org>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

With this version updating variables does not work anymore.

Thanks for sending v2.

Best regards

Heinrich


More information about the U-Boot mailing list