]> git.dujemihanovic.xyz Git - u-boot.git/commit
fwu: v2: try reading both copies of metadata
authorSughosh Ganu <sughosh.ganu@linaro.org>
Mon, 9 Sep 2024 11:20:16 +0000 (16:50 +0530)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 19 Sep 2024 07:52:50 +0000 (10:52 +0300)
commit5e9feeed8afa7ed4e26766bb15af3d2b04117f4a
treee48aea2dd5c37acf43a4f64c329efe41418e2ca9
parent650883a568653f37ee4ff43beda56152b594a49c
fwu: v2: try reading both copies of metadata

In the version 2 of the FWU metadata, the metadata is broken into two
parts, a top-level structure, which provides information on the total
size of the structure among other things. Try reading the primary
partition first, and if that fails, try reading the secondary
partition. This will help in the scenario where the primary metadata
partition has been corrupted, but the secondary partition is intact.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/fwu_updates/fwu_v2.c