build_image: print the size of the rootfs

Add the size of the rootfs of the base image to the build log. This
makes it easy to see the rootfs usage from a build log, without having
to download/mount an image and manually check the output of df.

Typical output:

INFO : Usage of the root filesystem:
INFO : Blocks:        Total: 579536     Used: 482893     Free: 96643
INFO : Inodes:        Total: 147456     Used: 13053      Free: 134403
INFO : Size (bytes):  Total: 2373779456 Used: 1977929728 Free: 395849728
INFO : Size (MiB):    Total: 2263       Used: 1886       Free: 377

TEST=run build_image, verify that the output shows the expected message

Change-Id: I57cc30c4488b004189efa2c1929f975f4279d2d7
Tested-by: Nicolas Norvez <>
Reviewed-by: Mike Frysinger <>
1 file changed