44 push :
55 paths :
66 - ' .github/workflows/sophgo-sg204x.yml'
7+ - ' .github/workflows/.sophgo-sg204x.*'
78 - ' sophgo-sg204x/**'
89
910jobs :
1011
11- build-zsbl :
12- name : Build ZSBL
13- runs-on : ubuntu-latest
14- strategy :
15- matrix :
16- include :
17- - target_name : sophgo-sg2044-srd3-10
18- zsbl_defconfig : sg2044_defconfig
19- - target_name : sophgo-sg2042-milkv-pioneer
20- zsbl_defconfig : sg2042_defconfig
21- env :
22- ZSBL_COMMIT_ID : 45054e711d81fbfa1c2167829402d26795199ae7
23- steps :
24- - name : Cache ZSBL Build
25- id : cache-zsbl-build
26- uses : actions/cache@v5
27- with :
28- path : dist
29- key : cache-zsbl-build-${{ matrix.target_name }}-${{ env.ZSBL_COMMIT_ID }}
30- - uses : actions/checkout@v5
31- if : ${{ steps.cache-zsbl-build.outputs.cache-hit != 'true' }}
32- - name : Setup Toolchains
33- if : ${{ steps.cache-zsbl-build.outputs.cache-hit != 'true' }}
34- id : setup-gcc-toolchain
35- uses : ./.github/actions/riscv64-gcc-toolchain
36- - name : Checkout ZSBL
37- if : ${{ steps.cache-zsbl-build.outputs.cache-hit != 'true' }}
38- uses : actions/checkout@v6
39- with :
40- repository : revyos/zsbl
41- path : zsbl
42- # Branch sg204x as of 20260224
43- ref : ${{ env.ZSBL_COMMIT_ID }}
44- fetch-depth : 1
45- - name : Build ZSBL
46- if : ${{ steps.cache-zsbl-build.outputs.cache-hit != 'true' }}
47- working-directory : zsbl
48- run : |
49- make -j"$(nproc)" CROSS_COMPILE=${{ steps.setup-gcc-toolchain.outputs.full-prefix }} "${{ matrix.zsbl_defconfig }}"
50- make -j"$(nproc)" CROSS_COMPILE=${{ steps.setup-gcc-toolchain.outputs.full-prefix }} USE_LINUX_BOOT=1 zsbl.bin
51- - name : Collect ZSBL Binary
52- if : ${{ steps.cache-zsbl-build.outputs.cache-hit != 'true' }}
53- run : |
54- mkdir dist
55- cp zsbl/zsbl.bin dist/zsbl.bin
56- - name : Upload Artifacts
57- uses : actions/upload-artifact@v4
58- with :
59- name : " zsbl-${{ matrix.target_name }}"
60- path : dist
12+ build-zsbl-sg2042 :
13+ name : Build ZSBL for SG2042
14+ uses : ./.github/workflows/.sophgo-sg204x.zsbl-build.yml
15+ with :
16+ target_name : sophgo-sg2042
17+ zsbl_repo : revyos/zsbl
18+ # Branch sg204x as of 20260227
19+ zsbl_ref : 45054e711d81fbfa1c2167829402d26795199ae7
20+ zsbl_defconfig : sg2042_defconfig
21+ build-zsbl-sg2044 :
22+ name : Build ZSBL for SG2044
23+ uses : ./.github/workflows/.sophgo-sg204x.zsbl-build.yml
24+ with :
25+ target_name : sophgo-sg2044
26+ zsbl_repo : revyos/zsbl
27+ # Branch sg204x as of 20260227
28+ zsbl_ref : 45054e711d81fbfa1c2167829402d26795199ae7
29+ zsbl_defconfig : sg2044_defconfig
6130
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 : " opensbi-${{ matrix.target_name }}"
115- path : dist
31+ build-opensbi-sg2042 :
32+ name : Build OpenSBI for SG2042
33+ uses : ./.github/workflows/.sophgo-sg204x.opensbi-build.yml
34+ with :
35+ target_name : sophgo-sg2042
36+ opensbi_repo : sophgo/opensbi
37+ # Branch sg2042-dev as of 20260225
38+ opensbi_ref : adc7ba17f3726aee599bc6fc879fbc569fbbba71
39+ build-opensbi-sg2044 :
40+ name : Build OpenSBI for SG2044
41+ uses : ./.github/workflows/.sophgo-sg204x.opensbi-build.yml
42+ with :
43+ target_name : sophgo-sg2044
44+ opensbi_repo : revyos/opensbi
45+ # Branch sg204x-v1.8.1 as of 20260225
46+ opensbi_ref : 175cafd0ca69534c5a6943e1e427150e65fbec23
47+ build-opensbi-sg2044-rva23 :
48+ name : Build OpenSBI for SG2044 with RVA23 Emu
49+ uses : ./.github/workflows/.sophgo-sg204x.opensbi-build.yml
50+ with :
51+ target_name : sophgo-sg2044-rva23
52+ opensbi_repo : revyos/opensbi
53+ # Branch sg204x-v1.8.1-rva23 as of 20260225
54+ opensbi_ref : 1a59a37c667dde717c26abf02c9a54c7c5d9212a
11655
11756 build-u-root :
11857 name : Build u-root for LinuxBoot
@@ -216,8 +155,8 @@ jobs:
216155 pack-sdimage-sg2042 :
217156 name : Pack SD Card Boot Image for SG2042
218157 needs :
219- - build-zsbl
220- - build-opensbi
158+ - build-zsbl-sg2042
159+ - build-opensbi-sg2042
221160 - build-u-root
222161 - build-kernel
223162 runs-on : ubuntu-latest
@@ -230,7 +169,7 @@ jobs:
230169 # - zsbl_target_name: sophgo-sg2044-srd3-10
231170 # opensbi_target_name: sophgo-sg2044
232171 # kernel_target_name: sophgo-sg2044
233- - zsbl_target_name : sophgo-sg2042-milkv-pioneer
172+ - zsbl_target_name : sophgo-sg2042
234173 opensbi_target_name : sophgo-sg2042
235174 kernel_target_name : sophgo-sg2042
236175 output_filename : firmware-linuxboot-sophgo-sg2042.img
0 commit comments