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 RISC-V 64-bit support and builds #1536

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

needs: smoke-tests

container: ghcr.io/pi-hole/ftl-build:v1.23-${{ matrix.arch }}
container: ghcr.io/pi-hole/ftl-build:v1.26-${{ matrix.arch }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -81,6 +81,8 @@ jobs:
bin_name: pihole-FTL-armv8-linux-gnueabihf
- arch: aarch64
bin_name: pihole-FTL-aarch64-linux-gnu
- arch: riscv64
bin_name: pihole-FTL-riscv64-linux-gnu

env:
CI_ARCH: ${{ matrix.arch }}${{ matrix.arch_extra }}
Expand Down
3 changes: 3 additions & 0 deletions src/struct_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ int check_one_struct(const char *struct_name, const size_t found_size, const siz
#elif defined(__arm__)
const size_t expected_size = size32;
const char *arch = "arm";
#elif defined(__riscv) && __riscv_xlen == 64
const size_t expected_size = size64;
const char *arch = "riscv64";
#else
const size_t expected_size = 0;
const char *arch = NULL;
Expand Down
6 changes: 6 additions & 0 deletions test/arch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ elif [[ "${CI_ARCH}" == "armv8a" ]]; then
check_CPU_arch "v8"
check_FP_arch "VFPv3-D16"

elif [[ "${CI_ARCH}" == "riscv64" ]]; then

check_machine "ELF64" "RISC-V"
check_libs "[libm.so.6] [libc.so.6] [ld-linux-riscv64-lp64d.so.1]"
check_file "ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, with debug_info, not stripped"

else

echo "Invalid job ${CI_ARCH}"
Expand Down