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
1=== modified file 'README'
2--- README 2012-09-05 20:28:45 +0000
3+++ README 2013-04-03 08:26:25 +0000
4@@ -29,3 +29,6 @@
5 extra minutes to finish. The interactive serial console will be activated after
6 this process has finished. Once this process is done it is *not recommended* to
7 clone the SD card anymore.
8+
9+Note: If you wish to build a different rootfs size with this tool, you will have
10+to force it with a --rebuild-vanilla
11
12=== modified file 'lava-create-master'
13--- lava-create-master 2013-03-13 13:21:33 +0000
14+++ lava-create-master 2013-04-03 08:26:25 +0000
15@@ -20,6 +20,8 @@
16 # defaults to 4G (4 GigaBytes)
17 export ROOTFS_SIZE="4G"
18
19+export MASTER_ROOTFS_SIZE="1G"
20+
21 # Used during partitioning on first boot - size of the userdata partition
22 # defaults to 2G (2 GigaBytes)
23 export USERDATA_SIZE="2G"
24@@ -73,7 +75,7 @@
25
26 show_usage() {
27 # Display the usage line
28- echo "Usage: lava-create-master [--rebuild-vanilla] [--verbose] (--help | --version | DEVICE) [ --output|-o IMAGE] [--rootfs-size|-r SIZE] [--userdata-size|-u SIZE]"
29+ 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]"
30 }
31
32
33@@ -88,7 +90,8 @@
34 printf -- " %-9s - %s\n" "--verbose" "Display additional messages"
35 printf -- " %-9s - %s\n" "--output" "Save the output as IMAGE"
36 printf -- " %-9s - %s\n" "--rebuild-vanilla" "Always rebuild vanilla image"
37- printf -- " %-9s - %s\n" "--rootfs-size" "Size of the testrootfs partition (default 4G)"
38+ printf -- " %-9s - %s\n" "--master-rootfs-size" "Size of the master rootfs partition"
39+ printf -- " %-9s - %s\n" "--test-rootfs-size" "Size of the testrootfs partition (default 4G)"
40 printf -- " %-9s - %s\n" "--userdata-size" "Size of the userdata partition (default 2G), no meaning for iMX and Origen"
41 echo
42 echo "supported devices:"
43@@ -136,7 +139,11 @@
44 OUTPUT_IMAGE="$2"
45 shift 2
46 ;;
47- --rootfs-size|-r)
48+ --master-rootfs-size|-m)
49+ MASTER_ROOTFS_SIZE="$2"
50+ shift 2
51+ ;;
52+ --rootfs-size|--test-rootfs-size|-r)
53 ROOTFS_SIZE="$2"
54 shift 2
55 ;;
56@@ -367,7 +374,7 @@
57 --dev $LMC_DEV \
58 --rootfs ext4 \
59 --image-file $CACHE_DIR/pristine-images/$dev-vanilla.img \
60- --image-size 1G \
61+ --image-size $MASTER_ROOTFS_SIZE \
62 --align-boot-part \
63 --binary $CACHE_DIR/image-pieces/$ROOTFS \
64 --hwpack $CACHE_DIR/image-pieces/$HWPACK \

Subscribers

People subscribed via source and target branches