drivers: fastboot: zImage flashing is not supported for v3, v4
With vendor boot image introduced in version 3 and 4 of boot image header, boot information is located in both boot image and vendor boot image. Flashing zImage is not supported for version 3 and 4 since this requires updating vendor boot image and/or generating a new image. Print an error message when the boot image header version is greater than 2. Signed-off-by: Safae Ouajih <souajih@baylibre.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
parent
2d0da1972d
commit
bc6413bdd9
1 changed files with 8 additions and 0 deletions
|
@ -370,6 +370,14 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Check if boot image header version is 2 or less */
|
||||
if (hdr->header_version > 2) {
|
||||
pr_err("zImage flashing supported only for boot images v2 and less\n");
|
||||
fastboot_fail("zImage flashing supported only for boot images v2 and less",
|
||||
response);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/* Check if boot image has second stage in it (we don't support it) */
|
||||
if (hdr->second_size > 0) {
|
||||
pr_err("moving second stage is not supported yet\n");
|
||||
|
|
Loading…
Reference in a new issue