[PATCH 2/2] fwu: Gracefully handle missing FWU metadata device

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Jul 2 09:41:31 CEST 2026


Hi Michal,

On Tue, 30 Jun 2026 at 16:18, Michal Simek <michal.simek at amd.com> wrote:
>
> On systems with FWU enabled but without the required DT changes the FWU
> metadata device is not found and fwu_boottime_checks() returns an error.
> Being an initcall, that non-zero return aborts the boot flow
>
> Return 0 instead so the boot continues. The preceding log_err() still
> tells the user that the FWU device could not be found.

Won't that affect the board later on? E.g When you do capsule updates,
updating the metadata will fail

Thanks
/Ilias
>
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> ---
>
> We have reached issue where testing team is using the same defconfig
> to test both scenarios and difference is in DT itself.
> I think it should be quite save to return 0 if any UCLASS_FWU_MDATA driver
> is not detected. If there is issue with fwu structure error is correctly
> propagated.
> ---
>  lib/fwu_updates/fwu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c
> index e9bb1b4fc656..25eb5af572f3 100644
> --- a/lib/fwu_updates/fwu.c
> +++ b/lib/fwu_updates/fwu.c
> @@ -760,7 +760,7 @@ static int fwu_boottime_checks(void)
>         ret = uclass_first_device_err(UCLASS_FWU_MDATA, &g_dev);
>         if (ret) {
>                 log_err("Cannot find fwu device\n");
> -               return ret;
> +               return 0;
>         }
>
>         /* Don't have boot time checks on sandbox */
> ---
> base-commit: ea62096437b39ff9038f7169e461bfe7863ee85a
> branch: debian-sent3
>
> --
> 2.43.0
>


More information about the U-Boot mailing list