summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
authorSteve Muckle <smuckle@google.com>2020-03-18 14:55:06 -0700
committerSteve Muckle <smuckle@google.com>2020-03-18 15:00:47 -0700
commit15303f2f670410b08b32d65ca12362d28973fd24 (patch)
tree62eb40fcfc0eb3e3d5098d87e8051f7d52a8156d /fastboot/fastboot.cpp
parentc74afeaa8b80604e3dd6a4c8645b7a0220e5c597 (diff)
fastboot: add support for v3 boot header format
Support v3 header format when changing the command line with fastboot boot or using flash:raw. Bug: 151750405 Test: fastboot boot and flash:raw with updated cmdline and v3 header Change-Id: Ibf396e2d18d8b22cad50db290f3fd4e46ff85d9b
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 7fdc28b3d..7f6e7230f 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -464,7 +464,7 @@ static std::vector<char> LoadBootableImage(const std::string& kernel, const std:
}
// Is this actually a boot image?
- if (kernel_data.size() < sizeof(boot_img_hdr_v2)) {
+ if (kernel_data.size() < sizeof(boot_img_hdr_v3)) {
die("cannot load '%s': too short", kernel.c_str());
}
if (!memcmp(kernel_data.data(), BOOT_MAGIC, BOOT_MAGIC_SIZE)) {
@@ -493,7 +493,7 @@ static std::vector<char> LoadBootableImage(const std::string& kernel, const std:
std::vector<char> dtb_data;
if (!g_dtb_path.empty()) {
- if (g_boot_img_hdr.header_version < 2) {
+ if (g_boot_img_hdr.header_version != 2) {
die("Argument dtb not supported for boot image header version %d\n",
g_boot_img_hdr.header_version);
}