Merge lp:~dpigott/lava-master-image-scripts/add-master-rootfs-size-option into lp:lava-master-image-scripts

Proposed by Dave Pigott on 2013-04-02
Status: Needs review
Proposed branch: lp:~dpigott/lava-master-image-scripts/add-master-rootfs-size-option
Merge into: lp:lava-master-image-scripts
Diff against target: 64 lines (+14/-4)
2 files modified
README (+3/-0)
lava-create-master (+11/-4)
To merge this branch: bzr merge lp:~dpigott/lava-master-image-scripts/add-master-rootfs-size-option
Reviewer Review Type Date Requested Status
Linaro Validation Team 2013-04-02 Pending
Review via email: mp+156576@code.launchpad.net

Description of the change

Added an option to specify master rootfs size. Additionally added alternative options for testrootfs size to maintain (a) backwards compatibility and (b) consistency in option naming

To post a comment you must log in.
Zygmunt Krynicki (zyga) wrote :

+ echo "Usage: lava-create-master [--rebuild-vanilla] [--verbose] (--help | --version | DEVICE) [ --output|-o IMAGE] [ --master-rootfs-size|-m SIZE] [--test-rootfs-size|-r|rootfs-size SIZE] [--userdata-size|-u SIZE]"

You probably wanted --rootfs-size there for consistency, also, moving -r to be the last item of the alternative set would be consistent with the rest

Dave Pigott (dpigott) wrote :

Yeah, I maintained rootfs-size for backward compatibility. Good point about placement. Will make that change.

On 2 Apr 2013, at 15:50, Zygmunt Krynicki <email address hidden> wrote:

> + echo "Usage: lava-create-master [--rebuild-vanilla] [--verbose] (--help | --version | DEVICE) [ --output|-o IMAGE] [ --master-rootfs-size|-m SIZE] [--test-rootfs-size|-r|rootfs-size SIZE] [--userdata-size|-u SIZE]"
>
> You probably wanted --rootfs-size there for consistency, also, moving -r to be the last item of the alternative set would be consistent with the rest
> --
> https://code.launchpad.net/~dpigott/lava-master-image-scripts/add-master-rootfs-size-option/+merge/156576
> You are the owner of lp:~dpigott/lava-master-image-scripts/add-master-rootfs-size-option.

75. By Dave Pigott on 2013-04-03

Consistency change in help order

Unmerged revisions

75. By Dave Pigott on 2013-04-03

Consistency change in help order

74. By Dave Pigott on 2013-04-02

Add ability to specify master image rootfs size

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2012-09-05 20:28:45 +0000
+++ README 2013-04-03 08:26:25 +0000
@@ -29,3 +29,6 @@
29extra minutes to finish. The interactive serial console will be activated after29extra minutes to finish. The interactive serial console will be activated after
30this process has finished. Once this process is done it is *not recommended* to30this process has finished. Once this process is done it is *not recommended* to
31clone the SD card anymore.31clone the SD card anymore.
32
33Note: If you wish to build a different rootfs size with this tool, you will have
34to force it with a --rebuild-vanilla
3235
=== modified file 'lava-create-master'
--- lava-create-master 2013-03-13 13:21:33 +0000
+++ lava-create-master 2013-04-03 08:26:25 +0000
@@ -20,6 +20,8 @@
20# defaults to 4G (4 GigaBytes)20# defaults to 4G (4 GigaBytes)
21export ROOTFS_SIZE="4G"21export ROOTFS_SIZE="4G"
2222
23export MASTER_ROOTFS_SIZE="1G"
24
23# Used during partitioning on first boot - size of the userdata partition25# Used during partitioning on first boot - size of the userdata partition
24# defaults to 2G (2 GigaBytes)26# defaults to 2G (2 GigaBytes)
25export USERDATA_SIZE="2G"27export USERDATA_SIZE="2G"
@@ -73,7 +75,7 @@
7375
74show_usage() {76show_usage() {
75 # Display the usage line77 # Display the usage line
76 echo "Usage: lava-create-master [--rebuild-vanilla] [--verbose] (--help | --version | DEVICE) [ --output|-o IMAGE] [--rootfs-size|-r SIZE] [--userdata-size|-u SIZE]"78 echo "Usage: lava-create-master [--rebuild-vanilla] [--verbose] (--help | --version | DEVICE) [ --output|-o IMAGE] [ --master-rootfs-size|-m SIZE] [--test-rootfs-size|rootfs-size SIZE|-r] [--userdata-size|-u SIZE]"
77}79}
7880
7981
@@ -88,7 +90,8 @@
88 printf -- " %-9s - %s\n" "--verbose" "Display additional messages"90 printf -- " %-9s - %s\n" "--verbose" "Display additional messages"
89 printf -- " %-9s - %s\n" "--output" "Save the output as IMAGE"91 printf -- " %-9s - %s\n" "--output" "Save the output as IMAGE"
90 printf -- " %-9s - %s\n" "--rebuild-vanilla" "Always rebuild vanilla image"92 printf -- " %-9s - %s\n" "--rebuild-vanilla" "Always rebuild vanilla image"
91 printf -- " %-9s - %s\n" "--rootfs-size" "Size of the testrootfs partition (default 4G)"93 printf -- " %-9s - %s\n" "--master-rootfs-size" "Size of the master rootfs partition"
94 printf -- " %-9s - %s\n" "--test-rootfs-size" "Size of the testrootfs partition (default 4G)"
92 printf -- " %-9s - %s\n" "--userdata-size" "Size of the userdata partition (default 2G), no meaning for iMX and Origen"95 printf -- " %-9s - %s\n" "--userdata-size" "Size of the userdata partition (default 2G), no meaning for iMX and Origen"
93 echo96 echo
94 echo "supported devices:"97 echo "supported devices:"
@@ -136,7 +139,11 @@
136 OUTPUT_IMAGE="$2"139 OUTPUT_IMAGE="$2"
137 shift 2140 shift 2
138 ;;141 ;;
139 --rootfs-size|-r)142 --master-rootfs-size|-m)
143 MASTER_ROOTFS_SIZE="$2"
144 shift 2
145 ;;
146 --rootfs-size|--test-rootfs-size|-r)
140 ROOTFS_SIZE="$2"147 ROOTFS_SIZE="$2"
141 shift 2148 shift 2
142 ;;149 ;;
@@ -367,7 +374,7 @@
367 --dev $LMC_DEV \374 --dev $LMC_DEV \
368 --rootfs ext4 \375 --rootfs ext4 \
369 --image-file $CACHE_DIR/pristine-images/$dev-vanilla.img \376 --image-file $CACHE_DIR/pristine-images/$dev-vanilla.img \
370 --image-size 1G \377 --image-size $MASTER_ROOTFS_SIZE \
371 --align-boot-part \378 --align-boot-part \
372 --binary $CACHE_DIR/image-pieces/$ROOTFS \379 --binary $CACHE_DIR/image-pieces/$ROOTFS \
373 --hwpack $CACHE_DIR/image-pieces/$HWPACK \380 --hwpack $CACHE_DIR/image-pieces/$HWPACK \

Subscribers

People subscribed via source and target branches