bootstd: android: boot|vendor_boot: read only image size
The previous implementation was reading the whole partition for boot and vendor_boot image which can be long following the size of the partition or the time to read blocks (driver/SoC specific).
All the necessary informations concerning the size of the components in boot|vendor_boot image are present in the header.
We can extract|use these informations and read only the necessary.
For more infos about how the size is calculated: include/android_image.h
On i700 the time to read/load boot image from MMC was ~8-9 secs.
Now with this change it's around ~4-5 secs.
Edited by Julien Masson