Files
OpenCellular/Makefile
Vadim Bendebury 361f3a74ba make: add size calculations
Room remaining in flash is an ever important property of many EC
images. This patch adds a makefile rule with will calculate how much
free room is left in the RW partition with the current image.

The calculation uses two variables set by the linker: 'FLASH' which
shows how much room is allocated to the image and '__image_size' which
shows how much room is actually taken. The difference is how much room
is still available.

Wnen building with V=0, size is not reported.

BRANCH=cr50, cr50-mp
BUG=b:65253310
TEST=observed reported values:
    $ make BOARD=cr50 -j
    ...
    *** 7864 bytes still available in flash on cr50 ****
    $ rm -rf build/cr50/
    $ make BOARD=cr50 CR50_DEV=1 -j
    *** 4488 bytes still available in flash on cr50 ****

Change-Id: I66e23dc72905988b21666c5dc9608d92e3fead50
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1030909
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2018-05-14 12:28:05 -07:00

10 KiB