Skip to content

Commit 75b8208

Browse files
committed
Attempt to resolve the CI build errors. Add missing .yaml file.
1 parent 63d6d61 commit 75b8208

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed

.github/workflows/test-build-riscv.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
build:
2020
runs-on: ubuntu-24.04
2121
timeout-minutes: 30
22+
env:
23+
# Pin toolchain release to avoid GCC 15+ multilib breakage.
24+
# https://github.com/riscv-collab/riscv-gnu-toolchain/releases
25+
RISCV_TOOLCHAIN_TAG: '2024.09.03'
2226

2327
steps:
2428
- uses: actions/checkout@v4
@@ -88,16 +92,16 @@ jobs:
8892
- name: Download and install RISC-V toolchain (riscv32)
8993
if: ${{ inputs.arch == 'riscv' }}
9094
run: |
91-
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/latest/download/riscv32-elf-ubuntu-24.04-gcc.tar.xz
92-
tar -xf riscv32-elf-ubuntu-24.04-gcc.tar.xz
95+
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${RISCV_TOOLCHAIN_TAG}/riscv32-elf-ubuntu-24.04-gcc-nightly-${RISCV_TOOLCHAIN_TAG}-nightly.tar.gz
96+
tar -xf riscv32-elf-ubuntu-24.04-gcc-nightly-${RISCV_TOOLCHAIN_TAG}-nightly.tar.gz
9397
echo "$GITHUB_WORKSPACE/riscv/bin" >> $GITHUB_PATH
9498
$GITHUB_WORKSPACE/riscv/bin/riscv32-unknown-elf-gcc --version
9599
96100
- name: Download and install RISC-V toolchain (riscv64)
97101
if: ${{ inputs.arch == 'riscv64' }}
98102
run: |
99-
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/latest/download/riscv64-elf-ubuntu-24.04-gcc.tar.xz
100-
tar -xf riscv64-elf-ubuntu-24.04-gcc.tar.xz
103+
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${RISCV_TOOLCHAIN_TAG}/riscv64-elf-ubuntu-24.04-gcc-nightly-${RISCV_TOOLCHAIN_TAG}-nightly.tar.gz
104+
tar -xf riscv64-elf-ubuntu-24.04-gcc-nightly-${RISCV_TOOLCHAIN_TAG}-nightly.tar.gz
101105
echo "$GITHUB_WORKSPACE/riscv/bin" >> $GITHUB_PATH
102106
$GITHUB_WORKSPACE/riscv/bin/riscv64-unknown-elf-gcc --version
103107

arch.mk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,10 @@ ifeq ($(ARCH),RISCV)
572572
RISCV32_ZIFENCEI := $(shell echo "void _start(void){}" | \
573573
$(CROSS_COMPILE)gcc -march=rv32imac_zifencei -mabi=ilp32 -c -x c - -o /dev/null 2>/dev/null && echo _zifencei)
574574
ifneq ($(RISCV32_ZICSR)$(RISCV32_ZIFENCEI),)
575-
RISCV32_EXT_LINK_OK := $(shell echo "void _start(void){}" | \
575+
# Link test using 64-bit integer division to force libgcc resolution.
576+
# A trivial void _start(){} never references libgcc, hiding ABI
577+
# mismatches (e.g., GCC 15 falling back to double-float libgcc).
578+
RISCV32_EXT_LINK_OK := $(shell echo 'long long _d(long long a,long long b){return a/b;}void _start(void){_d(0,1);}' | \
576579
$(CROSS_COMPILE)gcc -march=rv32imac$(RISCV32_ZICSR)$(RISCV32_ZIFENCEI) \
577580
-mabi=ilp32 -nostartfiles -x c - -o /dev/null 2>/dev/null && echo ok)
578581
ifneq ($(RISCV32_EXT_LINK_OK),ok)
@@ -635,7 +638,10 @@ ifeq ($(ARCH),RISCV64)
635638
RISCV64_ZIFENCEI := $(shell echo "void _start(void){}" | \
636639
$(CROSS_COMPILE)gcc -march=rv64imafd_zifencei -mabi=lp64d -c -x c - -o /dev/null 2>/dev/null && echo _zifencei)
637640
ifneq ($(RISCV64_ZICSR)$(RISCV64_ZIFENCEI),)
638-
RISCV64_EXT_LINK_OK := $(shell echo "void _start(void){}" | \
641+
# Link test using 128-bit integer division to force libgcc resolution.
642+
# A trivial void _start(){} never references libgcc, hiding multilib
643+
# mismatches (e.g., GCC 15 arch decomposition breaking multilib lookup).
644+
RISCV64_EXT_LINK_OK := $(shell echo '__int128 _d(__int128 a,__int128 b){return a/b;}void _start(void){_d(0,1);}' | \
639645
$(CROSS_COMPILE)gcc -march=rv64imafd$(RISCV64_ZICSR)$(RISCV64_ZIFENCEI) \
640646
-mabi=lp64d -nostartfiles -x c - -o /dev/null 2>/dev/null && echo ok)
641647
ifneq ($(RISCV64_EXT_LINK_OK),ok)

hal/mpfs-l2lim.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# HSS Payload Generator - configuration file for wolfBoot on PolarFire SoC
3+
# Boot target: L2-LIM (no DDR) via sNVM or QSPI HSS payload
4+
#
5+
# wolfBoot is loaded by HSS to L2-LIM at WOLFBOOT_ORIGIN (0x08040000).
6+
# HSS remains resident in lower L2-LIM for SBI services (timer, IPI, etc.).
7+
# wolfBoot runs on U54_1 in S-mode, loads application from SC QSPI flash.
8+
#
9+
10+
set-name: 'PolarFire-SoC-HSS::wolfBoot-L2LIM'
11+
hart-entry-points: {
12+
u54_1: '0x08040000',
13+
u54_2: '0x08040000',
14+
u54_3: '0x08040000',
15+
u54_4: '0x08040000'
16+
}
17+
payloads:
18+
wolfboot.elf: {
19+
owner-hart: u54_1,
20+
priv-mode: prv_s
21+
}

0 commit comments

Comments
 (0)