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 riscv64 support #14601

Merged
merged 1 commit into from Mar 23, 2022
Merged

Add riscv64 support #14601

merged 1 commit into from Mar 23, 2022

Conversation

Avimitin
Copy link
Contributor

@Avimitin Avimitin commented Mar 22, 2022

Description

In riscv64, the syscall.Uname function will return a uint8 slice. This is tested in the Arch Linux RISC-V 64 QEMU environment.

func main() {
      var buf syscall.Utsname
	  syscall.Uname(&buf)
      fmt.Printf("Buffer Type: %T\n", buf.Release)
}
$ go build . && ./test
Buffer Type: [65]uint8
$ uname -m
riscv64

Motivation and Context

I am now trying to make minio run on Arch Linux RISC-V, and this package fail to build because of the utsnameStr is not compile. This patch should help improve this issue.

How to test this PR?

You can follow this instruction to setup a QEMU environment https://github.com/felixonmars/archriscv-packages/wiki/Setup-Arch-Linux-RISC-V-Development-Environment.

Then copy the source code into the qemu machine and run:

pacman -Syu go
cd minio
go build .

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

In riscv64, the `syscall.Uname` function will return a uint8 slice.

    func main() {
      var buf syscall.Utsname
      fmt.Printf("Buffer Type: %T\n", buf.Release)
    }

    output:
      Buffer Type: [65]uint8

This is tested in the Arch Linux RISC-V 64 QEMU environment.

Signed-off-by: Avimitin <avimitin@gmail.com>
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
mint-pools.sh ✔️
Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit fb9b530 into minio:master Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants