Skip to content

Commit

Permalink
Add config for supporting RISC-V
Browse files Browse the repository at this point in the history
Signed-off-by: Antony Chazapis <[email protected]>
  • Loading branch information
chazapis authored and brandond committed Jun 14, 2023
1 parent 2515217 commit be4d58e
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,51 @@ volumes:
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
name: k3s-root-linux-riscv64

platform:
os: linux
arch: amd64

steps:
- name: build-riscv64
image: rancher/dapper:v0.5.0
commands:
- dapper ci
environment:
BUILDARCH: riscv64
VERBOSE: "0"
volumes:
- name: docker
path: /var/run/docker.sock

- name: github-riscv64-binary-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
checksum_file: CHECKSUMsum-riscv64.txt
checksum_flatten: true
files:
- dist/k3s-*riscv64.tar
prerelease: true
when:
event:
- tag
instance:
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*

volumes:
- name: docker
host:
path: /var/run/docker.sock

...
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARCH ?= amd64
ALL_ARCH = amd64 arm64 arm ppc64le s390x
ALL_ARCH = amd64 arm64 arm ppc64le s390x riscv64

export BUILDARCH = $(ARCH)
export VERBOSE ?= 1
Expand Down
40 changes: 40 additions & 0 deletions buildroot/riscv64config
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Target options
#
BR2_ARCH_IS_64=y
BR2_USE_MMU=y
# BR2_arcle is not set
# BR2_arceb is not set
# BR2_arm is not set
# BR2_armeb is not set
# BR2_aarch64 is not set
# BR2_aarch64_be is not set
# BR2_i386 is not set
# BR2_m68k is not set
# BR2_microblazeel is not set
# BR2_microblazebe is not set
# BR2_mips is not set
# BR2_mipsel is not set
# BR2_mips64 is not set
# BR2_mips64el is not set
# BR2_nios2 is not set
# BR2_or1k is not set
# BR2_powerpc is not set
# BR2_powerpc64 is not set
# BR2_powerpc64le is not set
BR2_riscv=y
# BR2_s390 is not set
# BR2_sh is not set
# BR2_sparc is not set
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_xtensa is not set
BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y
BR2_ARCH="riscv64"
BR2_NORMALIZED_ARCH="riscv"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ARCH="riscv64"
BR2_BINFMT_SUPPORTS_SHARED=y
BR2_READELF_ARCH_NAME="RISC-V"
BR2_BINFMT_ELF=y
BR2_RISCV_64=y

0 comments on commit be4d58e

Please sign in to comment.