Merge lp:~xnox/ubuntu-cdimage/add-unmatched into lp:ubuntu-cdimage

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1937
Proposed branch: lp:~xnox/ubuntu-cdimage/add-unmatched
Merge into: lp:ubuntu-cdimage
Diff against target: 84 lines (+22/-12)
4 files modified
etc/default-arches (+1/-1)
etc/qa-products (+2/-0)
lib/cdimage/livefs.py (+11/-8)
lib/cdimage/tree.py (+8/-3)
To merge this branch: bzr merge lp:~xnox/ubuntu-cdimage/add-unmatched
Reviewer Review Type Date Requested Status
Steve Langasek Needs Information
Review via email: mp+399498@code.launchpad.net

Commit message

Switch riscv64 image to become two images "unleashed" and "unmatched".

Currently the two SOCs are very different, and cannot be made bootable out of single u-boot builds.

Testing these changes in:
https://launchpad.net/~xnox/+livefs/ubuntu/hirsute/any

So this is draft at the moment.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

builds are good, uploaded livecd-rootfs.

1935. By Dimitri John Ledkov

Add unleashed+unmatched to qa-products

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

livecd-rootfs has migrated this is good to go.

But will need additional entries in the ISO tracker.

Revision history for this message
Steve Langasek (vorlon) wrote :

Will both of these images also work in qemu?

review: Needs Information
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

yes, both images work in qemu.

Because qemu uses u-boot from the host, thus it only read the rootfs partition from the image. It does not care about loader1/loader2 partitions which are used by the sifive boards.

Revision history for this message
Steve Langasek (vorlon) wrote :

If both work in qemu, should we be concerned about there being an obvious default? It doesn't appear the two images are guaranteed to be in sync with respect to the archive so this could cause some confusion and support issues.

1936. By Dimitri John Ledkov

Add description strings

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

To be fair, I wish it was a single livefs build that spits out both builds, as the difference between them is really which dir of u-boot-sifive is used to dd contents of loader1/loader2, which is unused by qemu.

The two images are equivalent from QEMU point of view, as it doesn't use loader1/loader2 partitions, and the rootfs should be the same, or `apt update; apt full-upgrade` will make it the same.

I also kind of wish to package & spit out the SPI flash firmware images too, such that users can upgrade SPI flash firmware to Ubuntu.

Cause ideally the single build will produce 4 artefacts to publish on cdimage.ubuntu.com: .img.xz + spi.img.xz for both unleashed and unmatched.

But this should do for now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/default-arches'
2--- etc/default-arches 2021-02-10 16:01:19 +0000
3+++ etc/default-arches 2021-03-16 01:42:48 +0000
4@@ -57,7 +57,7 @@
5 ubuntu-server daily-preinstalled eoan armhf+raspi3 arm64+raspi3
6 ubuntu-server daily-preinstalled focal armhf+raspi arm64+raspi riscv64
7 ubuntu-server daily-preinstalled groovy armhf+raspi arm64+raspi
8-ubuntu-server daily-preinstalled hirsute armhf+raspi arm64+raspi riscv64
9+ubuntu-server daily-preinstalled hirsute armhf+raspi arm64+raspi riscv64+unleashed riscv64+unmatched
10 ubuntu-server * precise amd64 i386
11 ubuntu-server * trusty amd64 amd64+mac i386 powerpc ppc64el
12 ubuntu-server * xenial amd64 arm64 i386 powerpc ppc64el s390x
13
14=== modified file 'etc/qa-products'
15--- etc/qa-products 2021-02-01 10:15:45 +0000
16+++ etc/qa-products 2021-03-16 01:42:48 +0000
17@@ -80,6 +80,8 @@
18 Ubuntu Server arm64+raspi ubuntu-server daily-preinstalled preinstalled-server arm64+raspi iso
19 Ubuntu Server arm64+raspi3 ubuntu-server daily-preinstalled preinstalled-server arm64+raspi3 iso
20 Ubuntu Server riscv64 ubuntu-server daily-preinstalled preinstalled-server riscv64 iso
21+Ubuntu Server riscv64+unleashed ubuntu-server daily-preinstalled preinstalled-server riscv64+unleashed iso
22+Ubuntu Server riscv64+unmatched ubuntu-server daily-preinstalled preinstalled-server riscv64+unmatched iso
23 Ubuntu Server i386 ubuntu-server daily server i386 iso
24 Ubuntu Server powerpc ubuntu-server daily server powerpc iso
25 Ubuntu Server ppc64el ubuntu-server daily server ppc64el iso
26
27=== modified file 'lib/cdimage/livefs.py'
28--- lib/cdimage/livefs.py 2021-02-16 11:23:00 +0000
29+++ lib/cdimage/livefs.py 2021-03-16 01:42:48 +0000
30@@ -78,14 +78,17 @@
31 subarch = ""
32
33 if cpuarch == "riscv64":
34- # ubuntu-cpc project needs to know that disk1.img.xz is needed
35- # instead of qcow2; and that it should add uboot for hifive
36- # boards, thus specify subarch for livefs build. However, we
37- # don't want +subarch in the published image names. Hence
38- # default-arches does not specify anything.
39- # TODO add support to specify the above via image_format
40- # metadata_override.
41- subarch = "hifive"
42+ # need to specify subarch to get raw.xz instead of qcow2
43+ # originally, no subarch was the unleashed image. Add support
44+ # for user-friendly subarch names and translate them to u-boot
45+ # target names for livecd-rootfs maybe the two will be able to
46+ # merge but at the moment, they are very different SOCs.
47+ if subarch == "":
48+ subarch = "hifive" # for focal
49+ elif subarch == "unleashed":
50+ subarch = "sifive_fu540"
51+ elif subarch == "unmatched":
52+ subarch = "sifive_hifive_unmatched_fu740"
53
54 return cpuarch, subarch
55
56
57=== modified file 'lib/cdimage/tree.py'
58--- lib/cdimage/tree.py 2021-02-03 10:33:30 +0000
59+++ lib/cdimage/tree.py 2021-03-16 01:42:48 +0000
60@@ -778,6 +778,8 @@
61 "powerpc+ps3": "PlayStation 3",
62 "ppc64el": "PowerPC64 Little-Endian",
63 "riscv64": "RISC-V",
64+ "riscv64+unleashed": "RISC-V for SiFive HiFive Unleashed",
65+ "riscv64+unmatched": "RISC-V for SiFive HiFive Unmatched",
66 "s390x": "IBM System z",
67 "sparc": "SPARC",
68 }
69@@ -876,9 +878,12 @@
70 sentences.append(
71 "For POWER8 Little-Endian computers, such as Power Systems "
72 "S8xxL/LC Linux-only servers.")
73- elif arch == "riscv64":
74- sentences.append(
75- "For RISC-V computers, such as SiFive HiFive Unleashed.")
76+ elif arch in ("riscv64", "riscv64+unleashed"):
77+ sentences.append(
78+ "For RISC-V computers, with support for SiFive HiFive Unleashed and QEMU.")
79+ elif arch in ("riscv64+unmatched"):
80+ sentences.append(
81+ "For RISC-V computers, with support for SiFive HiFive Unmatched and QEMU.")
82 elif arch == "s390x":
83 sentences.append(
84 "For IBM System z series mainframes, such as IBM LinuxONE.")

Subscribers

People subscribed via source and target branches