diff options
author | Daniel Baumann <daniel@debian.org> | 2010-07-02 14:29:52 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:13 +0100 |
commit | 7837cd5f8a4c8c2e97eca443bbc4304b94172fb9 (patch) | |
tree | 4d8386faf883aeb2043df0ee10a429a091dcafed | |
parent | b984ebe40d1df8d3836f7d09e1f07dce88fd716f (diff) | |
download | live-build-7837cd5f8a4c8c2e97eca443bbc4304b94172fb9.zip live-build-7837cd5f8a4c8c2e97eca443bbc4304b94172fb9.tar.gz |
Adding slightly modified patch from Alexander Sack <asac@linaro.org> to add meta info about filesystem size in binary_rootfs.
-rwxr-xr-x | helpers/binary_rootfs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/helpers/binary_rootfs b/helpers/binary_rootfs index ac2b1e7..7aa4fb7 100755 --- a/helpers/binary_rootfs +++ b/helpers/binary_rootfs @@ -111,6 +111,12 @@ case "${LH_CHROOT_FILESYSTEM}" in # Move image mv chroot/filesystem.${LH_CHROOT_FILESYSTEM} binary/${INITFS} + case "${LH_MODE}" in + ubuntu) + du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size + ;; + esac + if [ -e chroot/chroot.cache ] then rm -f .lock @@ -308,6 +314,12 @@ case "${LH_CHROOT_FILESYSTEM}" in # Create image Chroot chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}" + case "${LH_MODE}" in + ubuntu) + du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size + ;; + esac + # Move image ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS} ${LH_ROOT_COMMAND} rm -f chroot/squashfs.sort @@ -363,6 +375,12 @@ case "${LH_CHROOT_FILESYSTEM}" in false) mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} + + case "${LH_MODE}" in + ubuntu) + du -B 1 -s chroot | cut -f1 > binary/${INITFS}/filesystem.size + ;; + esac ;; esac |