summaryrefslogtreecommitdiff
path: root/fastboot/bootimg_utils.cpp
AgeCommit message (Collapse)Author
2021-03-25fastboot: Refactor bootimg_utils.cpp:mkbootimg()Yi-Yo Chiang
Change mkbootimg() to return void, as we already have a |out| parameter. Bug: 183455415 Test: Presubmit Change-Id: I51439e273752ab9e21f8d7138e900ea55bdfdfc0
2021-03-25fastboot: [boot] and [flash:raw] command support boot v4Yi-Yo Chiang
Boot v4 is mostly compatible with boot v3, so these minimal changes should be sufficient. The newly introduced field of v4, signature_size, is left zero because this field is only meant to be read by VTS testcases, so the value doesn't matter for the debugging purposes of boot and flash:raw. Bug: 183455415 Test: Manual Change-Id: I5c2737ce35dd25f318b19a429de805ea16c46607
2020-03-18fastboot: add support for v3 boot header formatSteve Muckle
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
2019-01-25Make 'fastboot boot' command support boot header version 2Hridya Valsaraju
New arguments 'dtb' and 'dtb-offset' have been added to support boot image header version 2 for the 'fastboot boot' and 'fastboot flash:raw boot' commands. Test: fastboot boot Image.lz4 --dtb <dtb_path> --header-version 2 Test: fastboot flash:raw boot Image.lz4 --dtb <dtb_path> --header-version 2 Bug: 111136242 Change-Id: Idf5c2eb138609dc7e915e80c4db64677c89f24b6
2018-09-20Use vector<char> instead of char* and malloc() for imagesTom Cherry
And fix the associated memory leaks in the process. Test: fastboot works Change-Id: I6e41f351ca6cebf79282d30b1eca1506496e0c21
2018-07-19Refactor libfastbootAaron Wisner
This change creates a nice and clean API for issuing fastboot commands without using the fastboot tool itself. Test: fastboot tool itself (now using libfastboot2) on sailfish, walleye, and other devices. Test: flash bootloader bootloader.img Test: flash radio radio.img Test: -w update img.zip Test: Manually getvar and reboot commands. Bug: 111126621 Change-Id: I0022536b204ce0c5ad8329367fd522fa3c57877d
2018-04-11fastboot: fix header_actual calculationFernando Lugo
Bug: 77920157 Test: fastboot boot $OUT/kernel Change-Id: Ibe2f4b9a6476ac11937448e6547b5159af011633 Signed-off-by: Fernando Lugo <flugo@google.com>
2018-04-09Add fastboot --os-version and --os-patch-level.Elliott Hughes
Also move -c to --cmdline to match the python mkbootimg tool. Remove the short options for these rarely-used options. Remove #if 0 cruft from <bootimg/bootimg.h>. Bug: http://b/77340848 Test: manual testing (need to fix http://b/77809061 for unit tests) Change-Id: Ieaa795566611bd89ba3fee39a1d9f6ad0713a587
2018-04-02Add a header-version argument to fastbootHridya Valsaraju
The argument would set the boot header version for flash:raw and boot commands when they are used for boot image creation. Bug: 77154616 Test: Dumped the created boot image and checked the header version using unpack_bootimg Change-Id: I2c458996817615f4351db102b4234984108d47c0 Merged-In: I2c458996817615f4351db102b4234984108d47c0 (cherry picked from commit 88de5556eccdc378084b037413bbece01ddee52d)
2018-01-18Fix fastboot memory corruption.Elliott Hughes
Bug: http://b/68664649 Test: echo 'ANDROID!' > fake.img ; fastboot -c `python -c "print 'A'*4000"` boot fake.img Change-Id: I3299e0fba24a6c1f6178c994731a94cea68f7254
2015-08-25Use 64-bit file sizes in fastboot.Elliott Hughes
Bug: 20110580 Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
2015-03-18Prepare for switching to libziparchive.Elliott Hughes
Bug: 19765860 Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c