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
6231 build-opensbi :
6332 name : Build OpenSBI
@@ -216,7 +185,7 @@ jobs:
216185 pack-sdimage-sg2042 :
217186 name : Pack SD Card Boot Image for SG2042
218187 needs :
219- - build-zsbl
188+ - build-zsbl-sg2042
220189 - build-opensbi
221190 - build-u-root
222191 - build-kernel
@@ -230,7 +199,7 @@ jobs:
230199 # - zsbl_target_name: sophgo-sg2044-srd3-10
231200 # opensbi_target_name: sophgo-sg2044
232201 # kernel_target_name: sophgo-sg2044
233- - zsbl_target_name : sophgo-sg2042-milkv-pioneer
202+ - zsbl_target_name : sophgo-sg2042
234203 opensbi_target_name : sophgo-sg2042
235204 kernel_target_name : sophgo-sg2042
236205 output_filename : firmware-linuxboot-sophgo-sg2042.img
0 commit comments