Merge lp:~mvo/goget-ubuntu-touch/populate-ab into lp:goget-ubuntu-touch

Proposed by Michael Vogt
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 139
Merged at revision: 139
Proposed branch: lp:~mvo/goget-ubuntu-touch/populate-ab
Merge into: lp:goget-ubuntu-touch
Diff against target: 68 lines (+27/-20)
1 file modified
diskimage/core_uboot.go (+27/-20)
To merge this branch: bzr merge lp:~mvo/goget-ubuntu-touch/populate-ab
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+251124@code.launchpad.net

Commit message

Populate both /boot/uboot/{a,b} when creating a ubuntu-core image.

Description of the change

Tiny branch that populates both A/B partitions so that the snappy tool can be simpler - but testing gives me /tmp/core-uboot-disk045485567/boot/a/hardware.yaml: - so maybe its not good? I will dig into this tomorrow unless you have a hint for me :)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:137
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~mvo/goget-ubuntu-touch/populate-ab/+merge/251124/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/goget-ubuntu-touch-ci/143/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/goget-ubuntu-touch-vivid-amd64-ci/56
    SUCCESS: http://jenkins.qa.ubuntu.com/job/goget-ubuntu-touch-vivid-armhf-ci/56
    SUCCESS: http://jenkins.qa.ubuntu.com/job/goget-ubuntu-touch-vivid-i386-ci/56

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/goget-ubuntu-touch-ci/143/rebuild

review: Needs Fixing (continuous-integration)
138. By Michael Vogt

merged trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
139. By Michael Vogt

add missing directory create

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Vogt (mvo) wrote :

I tested this branch this morning and wrote a daily snappy arm image on my card. The image contains both /boot/uboot/{a,b} with kernel/initrd/dtbs as expected.

I then tested this with the snappy-go branch lp:~mvo/ppy/snappy-sync-bootloader-udf that does no longer contains "SyncBootFiles()" and upgraded with a fake stating point of "1" in "system-b". This upgraded the kernel in /boot/uboot/b from the assets/ as expected. Then rebooted, set "system-a" to "1", upgraded and /boot/uboot/a got updated too. I then set system-b to "N-1" (without a kernel update) and updated. This caused no change to the kernels (as expected).

So I think once this branch lands in u-d-f we can simplify the snappy-go code.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On jueves 5 de marzo de 2015 05h'24:43 ART, Michael Vogt wrote:
> I tested this branch this morning and wrote a daily snappy arm
> image on my card. The image contains both /boot/uboot/{a,b} with
> kernel/initrd/dtbs as expected.
>
> I then tested this with the snappy-go branch
> lp:~mvo/ppy/snappy-sync-bootloader-udf that does no longer
> contains "SyncBootFiles()" and upgraded with a fake stating
> point of "1" in "system-b". This upgraded the kernel in
> /boot/uboot/b from the assets/ as expected. Then rebooted, set
> "system-a" to "1", upgraded and /boot/uboot/a got updated too. I
> then set system-b to "N-1" (without a kernel update) and
> updated. This caused no change to the kernels (as expected).
>
> So I think once this branch lands in u-d-f we can simplify the
> snappy-go code.

Great, thanks for the detailed per testing! There's one thing I guess I
need and it's a bug report to link to to be able to be compliant with FF.

Thanks!

Revision history for this message
Michael Vogt (mvo) wrote :

On Thu, Mar 05, 2015 at 01:06:29PM -0000, Sergio Schvezov wrote:
> On jueves 5 de marzo de 2015 05h'24:43 ART, Michael Vogt wrote:
> > I tested this branch this morning and wrote a daily snappy arm
> > image on my card. The image contains both /boot/uboot/{a,b} with
> > kernel/initrd/dtbs as expected.
[..]
> > So I think once this branch lands in u-d-f we can simplify the
> > snappy-go code.
>
>
> Great, thanks for the detailed per testing! There's one thing I guess I
> need and it's a bug report to link to to be able to be compliant with FF.

I filed #1428640 - but I don't think this needs a FFe, as its not a
feature but a bugfix in my book. I mean its creating a system
with system-a (and /boot/uboot/a) and system-b populated but not
/boot/uboot/b. Unless you feel strongly differently I think its fine
to upload tihs a bugfix.

Cheers,
 Michael

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

The bug is to have an upload with a bug number, not an FFe per se... unless I'm terribly mistaken about the policy :-)

Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

Oh, misread FF for FFe :) Indeed, a bug is fine.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'diskimage/core_uboot.go'
2--- diskimage/core_uboot.go 2015-01-29 14:26:27 +0000
3+++ diskimage/core_uboot.go 2015-03-04 14:47:11 +0000
4@@ -295,7 +295,6 @@
5 bootPath := filepath.Join(img.baseMount, string(bootDir))
6 bootAPath := filepath.Join(bootPath, "a")
7 bootBPath := filepath.Join(bootPath, "b")
8- bootDtbPath := filepath.Join(bootAPath, "dtbs")
9 bootuEnvPath := filepath.Join(bootPath, "uEnv.txt")
10 bootSnappySystemPath := filepath.Join(bootPath, "snappy-system.txt")
11
12@@ -304,29 +303,37 @@
13 kernelPath := filepath.Join(img.baseMount, img.hardware.Kernel)
14 initrdPath := filepath.Join(img.baseMount, img.hardware.Initrd)
15
16- // create layout
17- if err := os.MkdirAll(bootDtbPath, 0755); err != nil {
18- return err
19- }
20-
21 if err := os.MkdirAll(bootBPath, 0755); err != nil {
22 return err
23 }
24
25- if err := copyFile(hardwareYamlPath, filepath.Join(bootAPath, "hardware.yaml")); err != nil {
26- return err
27- }
28-
29- if err := copyFile(kernelPath, filepath.Join(bootAPath, filepath.Base(kernelPath))); err != nil {
30- return err
31- }
32-
33- if err := copyFile(initrdPath, filepath.Join(bootAPath, filepath.Base(initrdPath))); err != nil {
34- return err
35- }
36-
37- if err := img.provisionDtbs(oem, bootDtbPath); err != nil {
38- return err
39+ // populate both A/B
40+ for _, path := range []string{bootAPath, bootBPath} {
41+ if err := os.MkdirAll(path, 0755); err != nil {
42+ return err
43+ }
44+
45+ if err := copyFile(hardwareYamlPath, filepath.Join(path, "hardware.yaml")); err != nil {
46+ return err
47+ }
48+
49+ if err := copyFile(kernelPath, filepath.Join(path, filepath.Base(kernelPath))); err != nil {
50+ return err
51+ }
52+
53+ if err := copyFile(initrdPath, filepath.Join(path, filepath.Base(initrdPath))); err != nil {
54+ return err
55+ }
56+
57+ // create layout
58+ bootDtbPath := filepath.Join(path, "dtbs")
59+ if err := os.MkdirAll(bootDtbPath, 0755); err != nil {
60+ return err
61+ }
62+
63+ if err := img.provisionDtbs(oem, bootDtbPath); err != nil {
64+ return err
65+ }
66 }
67
68 if err := img.provisionUenv(bootuEnvPath); err != nil {

Subscribers

People subscribed via source and target branches