From d016ee4dbecc1d6f7a906914072a02c1a22d9175 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Mon, 16 Apr 2018 14:46:00 -0700 Subject: [PATCH] Remove header version check for command "fastboot boot boot.img" The header version argument is meant for creation of boot images using boot and flash:raw commands. It is unnecessary to specify the same while using the boot command with a complete boot image. Bug: 77920157 Test: fastboot boot boot.img Change-Id: Ia8fca4180e15906a3ae7c732496a744eb4b15e91 Merged-In: Ia8fca4180e15906a3ae7c732496a744eb4b15e91 --- fastboot/fastboot.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 3a3503e84..41a3d6b44 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -410,12 +410,6 @@ static void* load_bootable_image(const std::string& kernel, const std::string& r if (!g_cmdline.empty()) { bootimg_set_cmdline(reinterpret_cast(kdata), g_cmdline); } - uint32_t header_version_existing = - reinterpret_cast(kdata)->header_version; - if (g_boot_img_hdr.header_version != header_version_existing) { - die("header version mismatch, expected: %" PRIu32 " found %" PRIu32 "", - g_boot_img_hdr.header_version, header_version_existing); - } if (!ramdisk.empty()) die("cannot boot a boot.img *and* ramdisk");