Skip to content

Conversation

@smoser
Copy link
Member

@smoser smoser commented May 6, 2025

The qemu runner "just works" for cross arch, you just have to supply it a target-arch kernel. So the changes here really only amount to creating kernel//vmlinuz rather than kernel/vmlinuz.

Now, tested inside a 'make dev-container' environment and also on an x86_64 Ubuntu 24.04 host, I can:

make MELANGE_RUNNER=qemu ARCH=aarch64 debug/dash

And also:

make MELANGE_RUNNER=qemu ARCH=aarch64 test-debug/dash

@smoser smoser requested a review from a team as a code owner May 6, 2025 17:31
@smoser smoser requested review from dannf and dustinkirkland May 6, 2025 17:31
@smoser smoser force-pushed the feat/qemu-multi-arch branch from e01cc48 to 9474281 Compare May 6, 2025 17:37
The qemu runner "just works" for cross arch, you just have
to supply it a target-arch kernel.  So the changes here really
only amount to creating kernel/<ARCH>/vmlinuz rather than
kernel/vmlinuz.

Now, tested inside a 'make dev-container' environment and also
on an x86_64 Ubuntu 24.04 host, I can:

    make MELANGE_RUNNER=qemu ARCH=aarch64 debug/dash

And then also:

    make MELANGE_RUNNER=qemu ARCH=aarch64 test/dash
@smoser smoser force-pushed the feat/qemu-multi-arch branch from 9474281 to 3bb8361 Compare May 6, 2025 17:39
@smoser
Copy link
Member Author

smoser commented May 6, 2025

Related chainguard-dev/melange#1970

@dustinkirkland
Copy link
Member

This is sweet! Thanks for banging this out so quickly!

@dustinkirkland
Copy link
Member

Works for me here on a Linux machine. Would be great if someone could try this from a Mac and see if it can cross-compile x86 as well?

@justinvreeland
Copy link
Member

Tested on my Mac seems to be working fine

justinvreeland
justinvreeland previously approved these changes May 7, 2025
QEMU_KERNEL_DEP should be added to the test deps so you can
just 'make MELANGE_RUNNER=qemu test/dash' without having
to first 'make fetch-kernel'.

Second thing here is a fix to verify that a 'vmlinuz' is
created by the tar extraction.  Without that change
if the apk did not contain boot/vmlinuz, we'd created it with
'touch'
@smoser smoser merged commit bad33b2 into wolfi-dev:main May 7, 2025
14 checks passed
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.

4 participants