Merge lp:~mwaddel/linaro-image-tools/create-gzip-image into lp:linaro-image-tools/11.11

Proposed by Matt Waddel
Status: Merged
Merged at revision: 20
Proposed branch: lp:~mwaddel/linaro-image-tools/create-gzip-image
Merge into: lp:linaro-image-tools/11.11
Diff against target: 28 lines (+6/-2)
1 file modified
linaro-media-create (+6/-2)
To merge this branch: bzr merge lp:~mwaddel/linaro-image-tools/create-gzip-image
Reviewer Review Type Date Requested Status
Alexander Sack (community) Approve
Review via email: mp+28947@code.launchpad.net

Description of the change

Create .gz file from <file>.img.
Fix SWAP file calculation.

To post a comment you must log in.
Revision history for this message
Alexander Sack (asac) wrote :

ok. pushed this change though i think committing both changes in separate commits would have been cleaner :). Anyway, lets continue ...

review: Needs Resubmitting
Revision history for this message
Alexander Sack (asac) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro-media-create'
2--- linaro-media-create 2010-06-18 18:56:17 +0000
3+++ linaro-media-create 2010-06-30 22:42:25 +0000
4@@ -250,14 +250,14 @@
5
6 SPACE_LEFT=$(df ${DIR}/disk/ | grep ${MMC2} | awk '{print $4}')
7
8- let SIZE=$SWAP_SIZE*1024*1024
9+ let SIZE=$SWAP_SIZE*1024
10
11 if [ $SPACE_LEFT -ge $SIZE ] ; then
12 sudo dd if=/dev/zero of=${DIR}/disk/mnt/SWAP.swap bs=1M count=$SWAP_SIZE
13 sudo mkswap ${DIR}/disk/mnt/SWAP.swap
14 echo "/mnt/SWAP.swap none swap sw 0 0" | sudo tee -a ${DIR}/disk/etc/fstab
15 else
16- echo "FIXME Recovery after user selects SWAP file bigger then whats left not implemented"
17+ echo "SWAP file bigger then whats left on partition"
18 fi
19 fi
20
21@@ -532,3 +532,7 @@
22 populate_boot
23 populate_rootfs
24
25+ if [ "${IMAGE_FILE}" ]; then
26+ echo "Create ${IMAGE_FILE}.gz"
27+ gzip -f ${IMAGE_FILE} > ${IMAGE_FILE}.gz
28+ fi

Subscribers

People subscribed via source and target branches