Merge lp://qastaging/~liuyq0307/lava-master-image-scripts/add-sdcard into lp://qastaging/lava-master-image-scripts

Proposed by Yongqin Liu
Status: Merged
Merged at revision: 62
Proposed branch: lp://qastaging/~liuyq0307/lava-master-image-scripts/add-sdcard
Merge into: lp://qastaging/lava-master-image-scripts
Diff against target: 146 lines (+30/-5)
4 files modified
lava-create-master (+10/-0)
master-rootfs-extras/bin/lava-partition-disk (+18/-4)
master-rootfs-extras/lib/lava/common (+1/-0)
master-rootfs-extras/lib/lava/lava-master-init (+1/-1)
To merge this branch: bzr merge lp://qastaging/~liuyq0307/lava-master-image-scripts/add-sdcard
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle (community) Approve
Dave Pigott Approve
Zygmunt Krynicki Pending
Review via email: mp+112257@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-06-18.

Description of the change

Add support to creating an sdcard partition into the sdcard disk.
But because the mmcblk0p8 is not supported,
so for Origen and iMX, the sdcard partition keep not used.

The addition of sdcard partition into sdcard disk in this branch will not affect the deployment for Origen and iMX boards.

To post a comment you must log in.
Revision history for this message
Spring Zhang (qzhang) wrote : Posted in a previous version of this proposal

imx53 bug is on https://bugs.launchpad.net/lava-master-image-scripts/+bug/1014498, but I think it's related with master kernel.

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Posted in a previous version of this proposal

<liuyq> could you help to try this branch https://code.launchpad.net/~liuyq0307/lava-master-image-scripts/add-sdcard with a imx53 or origen board?
<liuyq> davepigott, I have tested with panda, it works
<zyga> liuyq, would you mind opening a merge request
 even if it is still work in progress
 (mark it as such if needed)
<davepigott> liuyq: Will test
<liuyq> davepigott, thanks, and I submitted a MP for it. https://code.launchpad.net/~liuyq0307/lava-master-image-scripts/add-sdcard/+merge/110770
<liuyq> davepigott, springz has used it with his imx, but there is a problem about the last 8th partition of sdcard.
 davepigott, I don't know if the problem has relation to the size of his sdcard, the size is 4G in total.
<davepigott> liuyq: Our recommendation is always to use at least 8GB, but I'll check
<liuyq> davepigott, I am a little afraid that we can't create the 8th partition on imx or origen.
<davepigott> liuyq: I'll find out
<zyga> liuyq, why did you move to kpartx?
<liuyq> zyga, partx does not work on my precise, also not work on springz's natty
<zyga> liuyq, I see
<liuyq> zyga, but kparx works work for both
<zyga> liuyq, I'd prefer that to be a separate patch, and drop the # commented out version of partx
* zyga is not really in a position to tell this as I'm not a lava or validation person anymore
<zyga> but that's what I think
<davepigott> zyga: liuyq I completely agree about the commented out code, and we did say that you had to be on precise to make this work properly
<liuyq> zyga, thanks, I will delete the old partx comment when I merge. Here just for the convenience that if the kpartx does not work for all we can easily rollback
<zyga> davepigott, yes but apparently it's hard for some of the assignees to transition to new os release
 sure
 liuyq, I'd rather see a version that works on just kpartx than both comments, that'
 that's why we have bzr for
<davepigott> liuyq: The default rootfs size we set is 4G so it won't work on a 4G card
<liuyq> davepigott, yes, I told springz to specify the size with the command parameters
<liuyq> davepigott, zyga, BTW, we also have a lava-partition-disk under lava-dispatcher/doc/scripts/lava-partition-disk
<zyga> liuyq, oh, I'm happy to kill it if davepigott doesn't mind
<liuyq> davepigott, zyga, should we delete it? it seems almost the same as the one in lava-master-image-scripts, but a little out of date
<zyga> yes
<davepigott> +1

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Posted in a previous version of this proposal

* split the kpartx from sdcard partition improvements
* remove the old commented out code

review: Needs Fixing
Revision history for this message
Dave Pigott (dpigott) wrote : Posted in a previous version of this proposal

Will not work with imx53 and Origen. We hit the limit of 8 partitions. Needs rethinking in light of this.

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Posted in a previous version of this proposal

Interesting:

What are the partitions on imx53:

master:

 boot
 rootfs

test:

 boot
 rootfs / system *
 userdata *
 scdard *

Android partitions marked with *

I assume I'm missing some special boot partitions specific to imx53

Revision history for this message
Dave Pigott (dpigott) wrote : Posted in a previous version of this proposal

imx53 and origen images have a small first partition as well as boot and rootfs - infrastructure or landing teams team would probably be able to tell us what they are for.

Revision history for this message
Spring Zhang (qzhang) wrote : Posted in a previous version of this proposal

I upgrade my linux-util to precise version, and found the same error like Yongqin's when using partx.

But I say it doesn't matter, it will finish the image, I can dd it to a SD card and make it boot up, the only missing is that partition making process doesn't happen automatically when first boot up. The error I met:

$ ./lava-create-master imx53 -o ../masteimx53.img --verbose
LAVA master images are easy to make, just three steps:

1) Preparing vanilla Linaro image
 * Inhibiting udisks...
 * Re-using existing vanilla image: /home/spring/.cache/lava/master-image-scripts/pristine-images/imx53-vanilla.img
2) Converting vanilla image to LAVA master image
 * Creating a copy of vanilla image...
 * Attaching master image to loopback device...
 * Adding partitions to the loopback device...
partx: /dev/loop0: error adding partitions 1-3
 * Removing loopback device partitions...
partx: defined range <1:0> does not make sense

$ partx --show ../master_imx53.img
NR START END SECTORS SIZE NAME UUID
 1 1 8191 8191 4M
 2 8192 114687 106496 52M
 3 114688 4194303 4079616 2G

Revision history for this message
Yongqin Liu (liuyq0307) wrote : Posted in a previous version of this proposal

./lava-create-master will mount the image file locally, and add some file
into it to make it do the partition job when first boot.
(the files are in master-rootfs-extras directory)
but the partx error make it not able to mount the image file locally.

On 20 June 2012 09:28, Spring Zhang <email address hidden> wrote:

> I upgrade my linux-util to precise version, and found the same error like
> Yongqin's when using partx.
>
> But I say it doesn't matter, it will finish the image, I can dd it to a SD
> card and make it boot up, the only missing is that partition making process
> doesn't happen automatically when first boot up. The error I met:
>
> $ ./lava-create-master imx53 -o ../masteimx53.img --verbose
> LAVA master images are easy to make, just three steps:
>
> 1) Preparing vanilla Linaro image
> * Inhibiting udisks...
> * Re-using existing vanilla image:
> /home/spring/.cache/lava/master-image-scripts/pristine-images/imx53-vanilla.img
> 2) Converting vanilla image to LAVA master image
> * Creating a copy of vanilla image...
> * Attaching master image to loopback device...
> * Adding partitions to the loopback device...
> partx: /dev/loop0: error adding partitions 1-3
> * Removing loopback device partitions...
> partx: defined range <1:0> does not make sense
>
> $ partx --show ../master_imx53.img
> NR START END SECTORS SIZE NAME UUID
> 1 1 8191 8191 4M
> 2 8192 114687 106496 52M
> 3 114688 4194303 4079616 2G
>
> --
>
> https://code.launchpad.net/~liuyq0307/lava-master-image-scripts/add-sdcard/+merge/110770
> You are the owner of lp:~liuyq0307/lava-master-image-scripts/add-sdcard.
>

Revision history for this message
Yongqin Liu (liuyq0307) wrote : Posted in a previous version of this proposal

> * split the kpartx from sdcard partition improvements
> * remove the old commented out code
Split the change to kpartx to this MP
https://code.launchpad.net/~liuyq0307/lava-master-image-scripts/use-kpartx/+merge/111133

please review it

Revision history for this message
Dave Pigott (dpigott) wrote :

Given the partitioning limits for origen and imx53, I'd rather see us not do the userdata partitioning on those boards, rather than attempting and failing.

68. By Yongqin Liu

keep not changed for iMX and origen

69. By Yongqin Liu

add comment for userdata partition

70. By Yongqin Liu

make some lines the same as before

71. By Yongqin Liu

add double quote

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

> Given the partitioning limits for origen and imx53, I'd rather see us not do
> the userdata partitioning on those boards, rather than attempting and failing.

Yeah, I agree with you.
Now I have updated it to only add the userdata partition for 2part board.
Please review it again.

BTW, I have not test this updated source yet, could you help to test it with the Origen and iMX first?
I will test the 2part with panda tomorrow after the jobs on it now completed.

Thanks,
Yongqin Liu

Revision history for this message
Dave Pigott (dpigott) :
review: Approve
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks good to me now too.

review: Approve
72. By Yongqin Liu

fix the bug for format userdata partition

73. By Yongqin Liu

fix the bug for format userdata partition

74. By Yongqin Liu

revert back the fix for trap on EXIT

75. By Yongqin Liu

add the for the if condition

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches