OSDN Git Service

fix image size tests
authorDoug Zongker <dougz@android.com>
Thu, 2 Jul 2009 16:00:54 +0000 (09:00 -0700)
committerDoug Zongker <dougz@android.com>
Thu, 2 Jul 2009 19:21:43 +0000 (12:21 -0700)
commit4647f12a4ff9dc54247184f17ff3de1cc423f213
treef76b1206a3a70abeef6d0242dcc9753260415b46
parentbd1ee348a1891836cf3b5d0da72e75c0d256fa43
fix image size tests

There are currently two errors in the way we test the size of built
images against the size of the partition on the hardware:

- the limits in BoardConfig.mk are set with the data size only, but
  images contain an extra 64 bytes per 2048-byte page.  This means we
  think the partition is about 1/32 smaller than it really is.

- when we deliver a build via OTA, the system partition ends up with
  one more file than when it's flashed via fastboot.  That file is a
  copy of the recovery image.  In order to be able to OTA a build, we
  need to make sure the system partition has enough room for all the
  system files plus the recovery image as well.

For the kila system partition, these errors are roughly the same order
of magnitude -- about 2MB, one in the "safe" direction, one in the
"unsafe" direction.  This change fixes both to give us a more accurate
notion of how close we are to the limit.

Make the build emit a warning (but not fail) when the size is within
32kb of the limit.

Also, include the values of the partition size limits in an info file
in the target-files package, so post-processing tools can use them
without parsing the BoardConfig.mk file.
core/Makefile
core/definitions.mk