images for android devices: provide boot.img, use img2simg
Right now, we are building an image, which consists of a partition header and the boot and root partition.
For android devices, the boot.img file needs to be pulled out of the boot partition of that image.
Let's make it more convenient by uploading the boot.img file separately, so people could flash the image with two fastboot commands (one for the boot.img and one to flash the big image file).
In addition, let's use img2simg on the image if deviceinfo_flash_sparse is set. This makes smaller images, flashes faster and avoids errors with fastboot.
Ideas for implementation:
- extend bpo.jobs.build_image.py
- at the end of the img task:
- source the deviceinfo file (reference)
- depending on deviceinfo_generate_bootimg, copy the boot.img file to the out dir too (name it like the image, but with -bootimg or something)
- depending on deviceinfo_flash_sparse, install and run img2simg on the image