mirror of
https://github.com/revyos/thead-opensbi.git
synced 2026-06-21 09:12:28 +02:00
committed by
Han Gao/Revy/Rabenda
parent
00ce75ee41
commit
61d7484c75
46
.github/workflows/build.yml
vendored
46
.github/workflows/build.yml
vendored
@@ -8,9 +8,13 @@ on:
|
||||
- cron: "0 2 * * *"
|
||||
|
||||
env:
|
||||
xuetie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1663142514282
|
||||
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
|
||||
xuantie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1698113812618
|
||||
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-20231018.tar.gz
|
||||
mainline_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18
|
||||
mainline_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz
|
||||
wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0'
|
||||
ARCH: riscv
|
||||
CROSS_COMPILE: riscv64-unknown-linux-gnu-
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -18,13 +22,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: thead-gcc
|
||||
toolchain_tripe: riscv64-unknown-linux-gnu-
|
||||
- name: gcc-12
|
||||
toolchain_tripe: riscv64-linux-gnu-
|
||||
env:
|
||||
CROSS_COMPILE: ${{ matrix.toolchain_tripe }}
|
||||
name: [thead-gcc, gcc-13]
|
||||
|
||||
steps:
|
||||
- name: Install software
|
||||
@@ -33,36 +31,34 @@ jobs:
|
||||
sudo apt install -y gdisk dosfstools g++-12-riscv64-linux-gnu cpp-12-riscv64-linux-gnu build-essential \
|
||||
libncurses-dev gawk flex bison openssl libssl-dev tree \
|
||||
dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf device-tree-compiler
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/riscv64-linux-gnu-gcc riscv64-gcc /usr/bin/riscv64-linux-gnu-gcc-12 10
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/riscv64-linux-gnu-g++ riscv64-g++ /usr/bin/riscv64-linux-gnu-g++-12 10
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/riscv64-linux-gnu-cpp riscv64-cpp /usr/bin/riscv64-linux-gnu-cpp-12 10
|
||||
|
||||
- name: Checkout opensbi
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure toolchains
|
||||
run: |
|
||||
mkdir rootfs && mkdir rootfs/boot
|
||||
wget ${xuetie_toolchain}/${toolchain_file_name}
|
||||
tar -xvf ${toolchain_file_name} -C /opt
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: opensbi compile
|
||||
run: |
|
||||
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1/bin:$PATH"
|
||||
mkdir output
|
||||
if [[ ${{ matrix.name }} = "thead-gcc" ]]; then
|
||||
${wget_alias} ${xuantie_toolchain}/${toolchain_file_name}
|
||||
tar -xvf ${toolchain_file_name} -C /opt
|
||||
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0/bin:$PATH"
|
||||
else
|
||||
${wget_alias} ${mainline_toolchain}/${mainline_toolchain_file_name}
|
||||
tar -xvf ${mainline_toolchain_file_name} -C /opt
|
||||
export PATH="/opt/riscv/bin:$PATH"
|
||||
fi
|
||||
${CROSS_COMPILE}gcc -v
|
||||
|
||||
pushd $PWD
|
||||
make PLATFORM=generic
|
||||
make PLATFORM=generic FW_PIC=y
|
||||
cp -v build/platform/generic/firmware/fw_dynamic.bin output/
|
||||
popd
|
||||
tree ${GITHUB_WORKSPACE}/output
|
||||
|
||||
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: thead-opensbi-${{ matrix.name }}
|
||||
path: output/fw_dynamic.bin
|
||||
retention-days: 30
|
||||
retention-days: 30
|
||||
|
||||
Reference in New Issue
Block a user