Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for riscv64 #90

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Add support for riscv64 #90

merged 1 commit into from
Sep 24, 2024

Conversation

chantra
Copy link
Collaborator

@chantra chantra commented Sep 10, 2024

Re-using the options used in https://lore.kernel.org/all/20240905081401.1894789-10-pulehui@huaweicloud.com/ add support for running vmtest against a riscv64 target.

Tested by running:

cargo run -- \
    -k /tmp/kbuild-riscv64/arch/riscv/boot/Image \
    -r ../libbpf-ci/libbpf-vmtest-rootfs-2024.09.09-noble-riscv64 \
    -a riscv64 \
    'uname -a'

Which generated https://gist.github.com/chantra/c595fa58ef6fdc72f567e21c1c207e15

/tmp/kbuild-riscv64/arch/riscv/boot/Image is a kernel cross-compiled using:

make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- O=/tmp/kbuild-riscv64 -j4 all

libbpf-vmtest-rootfs-2024.09.09-noble-riscv64 is a rootgs generated by

make ARCHS=riscv64

using https://github.com/libbpf/ci/blob/main/rootfs/ into which I chrooted and installed qemu-guest-agent.

Re-using the options used in https://lore.kernel.org/all/20240905081401.1894789-10-pulehui@huaweicloud.com/
add support for running vmtest against a riscv64 target.

Tested by running:
```
cargo run -- \
    -k /tmp/kbuild-riscv64/arch/riscv/boot/Image \
    -r ../libbpf-ci/libbpf-vmtest-rootfs-2024.09.09-noble-riscv64 \
    -a riscv64 \
    'uname -a'
```

Which generated https://gist.github.com/chantra/c595fa58ef6fdc72f567e21c1c207e15

/tmp/kbuild-riscv64/arch/riscv/boot/Image is a kernel cross-compiled using:
```
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- O=/tmp/kbuild-riscv64 -j4 all
```

libbpf-vmtest-rootfs-2024.09.09-noble-riscv64 is a rootgs generated by
```
make ARCHS=riscv64
```
using https://github.com/libbpf/ci/blob/main/rootfs/ into which I chrooted and installed
`qemu-guest-agent`.

Signed-off-by: Manu Bretelle <chantr4@gmail.com>
@chantra
Copy link
Collaborator Author

chantra commented Sep 10, 2024

side note..... this did not seem to be able to boot off Image.gz

cc @pulehui

@pulehui
Copy link

pulehui commented Sep 11, 2024

side note..... this did not seem to be able to boot off Image.gz

cc @pulehui

libbpf/ci#390 mentions that qemu not support riscv gzipped kernel yet. And this PR looks good to me.

Copy link
Owner

@danobi danobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, missed this. but lgtm assuming it works (I didn't try)

@danobi danobi merged commit 2cd7e35 into danobi:master Sep 24, 2024
1 check passed
@chantra
Copy link
Collaborator Author

chantra commented Sep 24, 2024

oh, missed this. but lgtm assuming it works (I didn't try)

yeah, it did work... to the best of my testing as long as an uncompressed image is used.

@chantra chantra deleted the riscv64 branch September 24, 2024 17:34
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.

3 participants