firmware-utils: bcm4908img: fix extracting cferom
authorRafał Miłecki <rafal@milecki.pl>
Tue, 6 Apr 2021 22:17:40 +0000 (00:17 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 8 Apr 2021 11:16:12 +0000 (13:16 +0200)
Fix offset to extract proper data when image contains vendor header.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit dcbde11af181055f2d1c77ebc19f50c29bbab96e)

tools/firmware-utils/src/bcm4908img.c

index 51c06041d6c1f15c0bff78025c1b9c5188e15ee3..b82303bf6d9cf848beefe6e7d248a80b9822bf7d 100644 (file)
@@ -580,7 +580,7 @@ static int bcm4908img_extract(int argc, char **argv) {
        }
 
        if (!strcmp(type, "cferom")) {
-               offset = 0;
+               offset = info.cferom_offset;
                length = info.bootfs_offset - offset;
                if (!length) {
                        err = -ENOENT;