From be4d58e676049e46028db551bb6ffa3b9adab250 Mon Sep 17 00:00:00 2001 From: Antony Chazapis Date: Wed, 14 Jun 2023 09:58:11 +0300 Subject: [PATCH] Add config for supporting RISC-V Signed-off-by: Antony Chazapis --- .drone.yml | 47 +++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- buildroot/riscv64config | 40 +++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 buildroot/riscv64config diff --git a/.drone.yml b/.drone.yml index ad5e5cf..53fc7ed 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 + ... diff --git a/Makefile b/Makefile index 414dd8c..7798bf4 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/buildroot/riscv64config b/buildroot/riscv64config new file mode 100644 index 0000000..4fc2c4c --- /dev/null +++ b/buildroot/riscv64config @@ -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