aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2015-09-19 13:07:26 +1000
committerAndrei Gherzan <andrei@gherzan.ro>2015-09-23 23:02:58 +0300
commit16718000cfb6edc8a9fdc57cb378814ff1d1582a (patch)
tree431c5b09ec7021a0f6026ff3e86795f75c5ec861
parent17dad9328b100beda1cf870c9075e509b5cbfa90 (diff)
downloadmeta-raspberrypi-16718000cfb6edc8a9fdc57cb378814ff1d1582a.tar.gz
meta-raspberrypi-16718000cfb6edc8a9fdc57cb378814ff1d1582a.tar.bz2
meta-raspberrypi-16718000cfb6edc8a9fdc57cb378814ff1d1582a.zip
sdcard_image-rpi.bbclass: use existing ROOTFS_SIZE variable
The ROOTFS_SIZE variable is already set to the aligned root filesystem size. Signed-off-by: Jonathan Liu <net147@gmail.com>
-rw-r--r--classes/sdcard_image-rpi.bbclass8
1 files changed, 2 insertions, 6 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index bdecfb4..2e9bdb3 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -78,13 +78,9 @@ IMAGE_CMD_rpi-sdimg () {
# Align partitions
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
- ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'`
- # Round up RootFS size to the alignment size as well
- ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
- ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
- SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
+ SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE)
- echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"
+ echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
# Check if we are building with device tree support
DTS="${@get_dts(d, None)}"