GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
472 stars 66 forks source link

Extend uboot abootimg command with "get valuable size" subcommand. #24

Closed rsglobal closed 3 years ago

rsglobal commented 4 years ago

Reading whole boot partition into RAM takes a lot of boot time. Usually boot partition on production devices used only on about 30-50%, remaining space are reserved for debug builds.

Map (numbers may be not correct): Sector 0: Header Sector 1-V: Kernel image, ramdisk, etc Sector V-(TOTAL-8): Unused Sector (TOTAL-8)-TOTAL: AVB Footer.

Read process:

  1. Read Header sector into the RAM
  2. Parse heaer with new abootimg get_valuable_size sub-command
  3. Read only sectors with valuable data from sdcard/emmc.
  4. Read AVB footer.
  5. Fill remaining area with zeros using CPU.

This should save from 0.5 to 1 second of boot time.

Upstream changes.

rsglobal commented 3 years ago

No time to implement this and gain in boot time is not too big comparing by other sources of time delays. Closing for now.