Skip to content

Conversation

@stskeeps
Copy link
Contributor

- What I did
kernel+squashfs flow didn't work for riscv64, which was due to it missing in MArch function

- How I did it
Added riscv64

- How to verify it
Run minimal.yml with -arch riscv64

- Description for the changelog
Fixed bug preventing kernel+squashfs to work for riscv64 target

this makes kernel+squashfs flow work for risc64

Signed-off-by: Carsten Munk <[email protected]>
@deitch
Copy link
Collaborator

deitch commented Jun 22, 2025

Huh, I really am surprised it is not there. I guess I missed it when adding riscv64.

What happens now when you try? What stage is the failure, and what is the message? Can you paste the command and failure in here?

@stskeeps
Copy link
Contributor Author

before (minimal.yml is from examples/) -- linuxkit-darwin-amd64 is latest built by CI in 1.6.0 tag

./linuxkit-darwin-amd64 build --arch riscv64 --format kernel+squashfs minimal.yml
Extract kernel image: docker.io/linuxkit/kernel:6.6.71
Add init containers:
Process init image: docker.io/linuxkit/init:8eea386739975a43af558eec757a7dcb3a3d2e7b
Process init image: docker.io/linuxkit/runc:667e7ea2c426a2460ca21e3da065a57dbb3369c9
Process init image: docker.io/linuxkit/containerd:a988a1a8bcbacc2c0390ca0c08f949e2b4b5915d
Add onboot containers:
  Create OCI config for linuxkit/dhcpcd:157df9ef45a035f1542ec2270e374f18efef98a5
Add service containers:
  Create OCI config for linuxkit/getty:05eca453695984a69617f1f1f0bcdae7f7032967
Create outputs:
  minimal-squashfs.img
Error: error writing outputs: error writing kernel+squashfs output: unknown arch "riscv64"
2025/06/22 18:53:30 error during command execution: error writing outputs: error writing kernel+squashfs output: unknown arch "riscv64"

It's caused by this as far as I can tell:

march, err := util.MArch(arch)

@deitch deitch merged commit b42e1a8 into linuxkit:master Jun 23, 2025
22 checks passed
@deitch
Copy link
Collaborator

deitch commented Jun 23, 2025

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants