feat: add support for RISC-V architecture - #303
Conversation
|
Check where you would like a Mattermost message to be sent to when CI completes and this PR is merged
|
9e60eca to
e500f49
Compare
|
can you please run |
a57cc15 to
d51d537
Compare
|
Now lint is passing but there seems to be a lot of test errors. |
|
For testing purposes, I also modified For diff --git a/conf/bootloaders.yaml b/conf/bootloaders.yaml
index d788a6a..e1b15ac 100644
--- a/conf/bootloaders.yaml
+++ b/conf/bootloaders.yaml
@@ -41,6 +41,16 @@ bootloaders:
- usr/lib/shim/shimaa64.efi.signed.latest, bootaa64.efi
- usr/lib/shim/mmaa64.efi, mmaa64.efi
- usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed, grubaa64.efi
+ - firmware-platform: uefi
+ packages:
+ - grub-efi-riscv64-bin
+ arch: riscv64
+ arches: riscv64
+ archive: http://ports.ubuntu.com
+ release: noble
+ os: grub-efi
+ files:
+ - usr/lib/grub/riscv64-efi/monolithic/grubnetriscv64.efi, grubriscv64.efi
- firmware-platform: open-firmware
packages:
- grub-ieee1275-binFor diff --git a/src/app/apiclient/types.gen.ts b/src/app/apiclient/types.gen.ts
index 6fa5bb4c3..ae243a609 100644
--- a/src/app/apiclient/types.gen.ts
+++ b/src/app/apiclient/types.gen.ts
@@ -1112,6 +1112,7 @@ export type KnownArchesEnum =
| "armhf"
| "i386"
| "ppc64el"
+ | "riscv64"
| "s390x";
/**
diff --git a/src/app/store/general/types/base.ts b/src/app/store/general/types/base.ts
index c1d996d47..f9fe589e6 100644
--- a/src/app/store/general/types/base.ts
+++ b/src/app/store/general/types/base.ts
@@ -113,6 +113,7 @@ export type KnownArchitecture =
| "armhf"
| "i386"
| "ppc64el"
+ | "riscv64"
| "s390x";
export type KnownArchitecturesState = {I'm not sure this is super helpful but just FYI 😃 |
|
Thanks for the review @bjornt. My approach must have been a bit too agressive as I added |
25fe8ee to
ba38823
Compare
|
I pushed an update to the tests that should fix all failures hopefully 😃 |
Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
ba38823 to
5860cd3
Compare
|
Rebased the PR on top of master |
|
/review |
bjornt
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for the contribution!
|
I'm not sure I understand why "ci-check" and "test-python" are passing in CI and failing in merge queue? Is that a real failure that surfaced somehow or an infrastructure / temporary error? I tried to check the logs but they don't seem related to the PR: |
|
@vhaudiquet it looks like |
> WIP: Add support for riscv64 architecture
>
> I added support for riscv64 architecture on 3.7, and used it to
network boot a RISC-V board, the VisionFive 2. With custom-built
maas-images, and a small diff to maas-ui, I could see RISC-V images in
the UI, see my VisionFive2 board, and boot it properly via MAAS.
>
> I rebased the modifications onto master directly.
>
> This is still experimental, but some parts might be directly
mergeable. For example, code matching architecture string to debian
architecture: it already has riscv64 in some places, but not everywhere.
It might be a bit too agressive as I added riscv64 everywhere I thought
it was missing. Someone needs to check if this does not break stuff on
other arches, but otherwise it did work on riscv64 during my
experiments.
I also only added UEFI TFTP boot on riscv64, and not HTTP boot.
Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
(cherry picked from commit 183199d)
Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
Co-authored-by: Valentin Haudiquet <vhaudiquet343@hotmail.fr>
Original MP on Launchpad: https://code.launchpad.net/~vhaudiquet/maas/+git/maas/+merge/501672
It might be a bit too agressive as I added riscv64 everywhere I thought it was missing. Someone needs to check if this does not break stuff on other arches, but otherwise it did work on riscv64 during my experiments.
I also only added UEFI TFTP boot on riscv64, and not HTTP boot.