summaryrefslogtreecommitdiff
path: root/fastboot/bootimg_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fastboot: Refactor bootimg_utils.cpp:mkbootimg()Yi-Yo Chiang2021-03-251-11/+8
| | | | | | | | Change mkbootimg() to return void, as we already have a |out| parameter. Bug: 183455415 Test: Presubmit Change-Id: I51439e273752ab9e21f8d7138e900ea55bdfdfc0
* fastboot: [boot] and [flash:raw] command support boot v4Yi-Yo Chiang2021-03-251-10/+17
| | | | | | | | | | | | 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
* fastboot: add support for v3 boot header formatSteve Muckle2020-03-181-0/+40
| | | | | | | | | 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
* Make 'fastboot boot' command support boot header version 2Hridya Valsaraju2019-01-251-7/+15
| | | | | | | | | | | | | 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
* Use vector<char> instead of char* and malloc() for imagesTom Cherry2018-09-201-15/+16
| | | | | | | And fix the associated memory leaks in the process. Test: fastboot works Change-Id: I6e41f351ca6cebf79282d30b1eca1506496e0c21
* Refactor libfastbootAaron Wisner2018-07-191-1/+1
| | | | | | | | | | | | | | | 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
* fastboot: fix header_actual calculationFernando Lugo2018-04-111-1/+1
| | | | | | | Bug: 77920157 Test: fastboot boot $OUT/kernel Change-Id: Ibe2f4b9a6476ac11937448e6547b5159af011633 Signed-off-by: Fernando Lugo <flugo@google.com>
* Add fastboot --os-version and --os-patch-level.Elliott Hughes2018-04-091-22/+17
| | | | | | | | | | | 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
* Add a header-version argument to fastbootHridya Valsaraju2018-04-021-10/+13
| | | | | | | | | | | | | | | 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)
* Fix fastboot memory corruption.Elliott Hughes2018-01-181-3/+5
| | | | | | Bug: http://b/68664649 Test: echo 'ANDROID!' > fake.img ; fastboot -c `python -c "print 'A'*4000"` boot fake.img Change-Id: I3299e0fba24a6c1f6178c994731a94cea68f7254
* Use 64-bit file sizes in fastboot.Elliott Hughes2015-08-251-22/+14
| | | | | Bug: 20110580 Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
* Prepare for switching to libziparchive.Elliott Hughes2015-03-181-0/+85
Bug: 19765860 Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c