@@ -59,21 +59,60 @@ jobs:
5959 name : " ${{ matrix.target_name }}-zsbl"
6060 path : dist
6161
62- # build-opensbi:
63- # name: Build OpenSBI
64- # strategy:
65- # matrix:
66- # include:
67- # - opensbi_repo: revyos/opensbi
68- # # Branch sg204x-v1.8.1-rva23 as of 20260225
69- # opensbi_ref: 1a59a37c667dde717c26abf02c9a54c7c5d9212a
70- # - opensbi_repo: revyos/opensbi
71- # # Branch sg204x-v1.8.1 as of 20260225
72- # opensbi_ref: 175cafd0ca69534c5a6943e1e427150e65fbec23
73- # - opensbi_repo: sophgo/opensbi
74- # # Branch sg2042-dev as of 20260225
75- # opensbi_ref: adc7ba17f3726aee599bc6fc879fbc569fbbba71
76- # steps: []
62+ build-opensbi :
63+ name : Build OpenSBI
64+ runs-on : ubuntu-latest
65+ strategy :
66+ matrix :
67+ include :
68+ - target_name : sophgo-sg2044-rva23
69+ opensbi_repo : revyos/opensbi
70+ # Branch sg204x-v1.8.1-rva23 as of 20260225
71+ opensbi_ref : 1a59a37c667dde717c26abf02c9a54c7c5d9212a
72+ - target_name : sophgo-sg2044
73+ opensbi_repo : revyos/opensbi
74+ # Branch sg204x-v1.8.1 as of 20260225
75+ opensbi_ref : 175cafd0ca69534c5a6943e1e427150e65fbec23
76+ - target_name : sophgo-sg2042
77+ opensbi_repo : sophgo/opensbi
78+ # Branch sg2042-dev as of 20260225
79+ opensbi_ref : adc7ba17f3726aee599bc6fc879fbc569fbbba71
80+ steps :
81+ - name : Cache OpenSBI Build
82+ id : cache-opensbi-build
83+ uses : actions/cache@v5
84+ with :
85+ path : dist
86+ key : cache-opensbi-build-${{ matrix.target_name }}-${{ matrix.opensbi_ref }}
87+ - uses : actions/checkout@v5
88+ if : ${{ steps.cache-opensbi-build.outputs.cache-hit != 'true' }}
89+ - name : Setup Toolchains
90+ if : ${{ steps.cache-opensbi-build.outputs.cache-hit != 'true' }}
91+ id : setup-gcc-toolchain
92+ uses : ./.github/actions/riscv64-gcc-toolchain
93+ - name : Checkout OpenSBI
94+ if : ${{ steps.cache-opensbi-build.outputs.cache-hit != 'true' }}
95+ uses : actions/checkout@v6
96+ with :
97+ repository : ${{ matrix.opensbi_repo }}
98+ path : opensbi
99+ # Branch sg204x as of 20260224
100+ ref : ${{ matrix.opensbi_ref }}
101+ fetch-depth : 1
102+ - name : Build OpenSBI
103+ if : ${{ steps.cache-opensbi-build.outputs.cache-hit != 'true' }}
104+ run : |
105+ make -j"$(nproc)" -C opensbi O=$(pwd)/build CROSS_COMPILE=${{ steps.setup-gcc-toolchain.outputs.full-prefix }} PLATFORM=generic FW_PIC=y BUILD_INFO=y
106+ - name : Collect OpenSBI Binary
107+ if : ${{ steps.cache-opensbi-build.outputs.cache-hit != 'true' }}
108+ run : |
109+ mkdir dist
110+ cp build/platform/generic/firmware/fw_dynamic.bin dist/fw_dynamic.bin
111+ - name : Upload Artifacts
112+ uses : actions/upload-artifact@v4
113+ with :
114+ name : " ${{ matrix.target_name }}-opensbi"
115+ path : dist
77116
78117 build-u-root :
79118 name : Build u-root for LinuxBoot
0 commit comments