Skip to content

Commit 6ca600d

Browse files
committed
sg204x: split pipeline
1 parent b0ffe72 commit 6ca600d

File tree

4 files changed

+123
-102
lines changed

4 files changed

+123
-102
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: SOPHGO SG2042
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/sophgo-sg2042.yml'
7+
- '.github/workflows/.sophgo-sg204x.*'
8+
- 'sophgo/sg2042/**'
9+
10+
jobs:
11+
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+
22+
build-opensbi-sg2042:
23+
name: Build OpenSBI for SG2042
24+
uses: ./.github/workflows/.sophgo-sg204x.opensbi-build.yml
25+
with:
26+
target_name: sophgo-sg2042
27+
opensbi_repo: sophgo/opensbi
28+
# Branch sg2042-dev as of 20260225
29+
opensbi_ref: adc7ba17f3726aee599bc6fc879fbc569fbbba71
30+
31+
build-u-root:
32+
name: Build u-root
33+
uses: ./.github/workflows/.sophgo-sg204x.u-root-build.yml
34+
with:
35+
target_name: sophgo-sg204x
36+
u_root_repo: openeuler-riscv/u-root
37+
# Branch sg204x-v0.15 as of 20260225
38+
u_root_ref: 69595b5c67cb59b0afb9744d13625b9df6869a64
39+
40+
build-kernel-sg2042:
41+
name: Build Kernel for SG2042
42+
uses: ./.github/workflows/.sophgo-sg204x.kernel-build.yml
43+
with:
44+
target_name: sophgo-sg2042
45+
kernel_repo: sophgo/linux-riscv
46+
# Branch sg2042-dev-6.6 as of 20260226
47+
kernel_ref: 15143c39ba8d2ebd6c47e7eabcbf2a3b19960532
48+
kernel_defconfig: sophgo_mango_normal_defconfig
49+
50+
prepare-firmware-content-sg2042:
51+
name: Prepare Firmware Contents for SG2042
52+
needs:
53+
- build-zsbl-sg2042
54+
- build-opensbi-sg2042
55+
- build-u-root
56+
- build-kernel-sg2042
57+
runs-on: ubuntu-latest
58+
strategy:
59+
matrix:
60+
include:
61+
- firmware_target_name: linuxboot-sophgo-sg2042
62+
zsbl_target_name: sophgo-sg2042
63+
opensbi_target_name: sophgo-sg2042
64+
u_root_target_name: sophgo-sg204x
65+
kernel_target_name: sophgo-sg2042
66+
steps:
67+
- name: Checkout This Repo
68+
uses: actions/checkout@v5
69+
with:
70+
fetch-depth: 1
71+
path: u-boot-build
72+
- name: Setup Work Dirs
73+
run: |
74+
mkdir -p dist/riscv64
75+
- name: Fetch Pre-built ZSBL
76+
uses: actions/download-artifact@v5
77+
with:
78+
name: "zsbl-${{ matrix.zsbl_target_name }}"
79+
path: dist
80+
merge-multiple: true
81+
- name: Copy fip.bin
82+
run: |
83+
cp u-boot-build/sophgo/sg2042/blobs/fip.bin dist
84+
- name: Fetch Pre-built OpenSBI
85+
uses: actions/download-artifact@v5
86+
with:
87+
name: "opensbi-${{ matrix.opensbi_target_name }}"
88+
path: dist/riscv64
89+
merge-multiple: true
90+
- name: Fetch Pre-built u-root
91+
uses: actions/download-artifact@v5
92+
with:
93+
name: "u-root-${{ matrix.u_root_target_name }}"
94+
path: dist/riscv64
95+
merge-multiple: true
96+
- name: Fetch Pre-built Kernel
97+
uses: actions/download-artifact@v5
98+
with:
99+
name: "kernel-${{ matrix.kernel_target_name }}"
100+
path: dist/riscv64
101+
merge-multiple: true
102+
- name: Install dtc
103+
run: |
104+
sudo apt-get update
105+
sudo apt-get install -y device-tree-compiler
106+
- name: Fixup dtb name
107+
run: |
108+
dtc dist/riscv64/mango-milkv-pioneer.dtb | sed 's/console=tty1 //' | dtc > dist/riscv64/sg2042-milkv-pioneer.dtb
109+
- name: Upload Artifacts
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: "collected-${{ matrix.firmware_target_name }}"
113+
path: dist
114+
115+
pack-sd-boot-firmware-sg2042:
116+
name: Pack SD Card Boot Image for SG2042
117+
needs: prepare-firmware-content-sg2042
118+
uses: ./.github/workflows/.sophgo-sg204x.pack-sdimg.yml
119+
with:
120+
firmware_target_name: linuxboot-sophgo-sg2042
Lines changed: 3 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
name: SOPHGO SG204x
1+
name: SOPHGO SG2044
22

33
on:
44
push:
55
paths:
6-
- '.github/workflows/sophgo-sg204x.yml'
6+
- '.github/workflows/sophgo-sg2044.yml'
77
- '.github/workflows/.sophgo-sg204x.*'
8-
- 'sophgo-sg204x/**'
8+
- 'sophgo/sg2044/**'
99

1010
jobs:
1111

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
2112
build-zsbl-sg2044:
2213
name: Build ZSBL for SG2044
2314
uses: ./.github/workflows/.sophgo-sg204x.zsbl-build.yml
@@ -28,14 +19,6 @@ jobs:
2819
zsbl_ref: 45054e711d81fbfa1c2167829402d26795199ae7
2920
zsbl_defconfig: sg2044_defconfig
3021

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
3922
build-opensbi-sg2044:
4023
name: Build OpenSBI for SG2044
4124
uses: ./.github/workflows/.sophgo-sg204x.opensbi-build.yml
@@ -62,16 +45,6 @@ jobs:
6245
# Branch sg204x-v0.15 as of 20260225
6346
u_root_ref: 69595b5c67cb59b0afb9744d13625b9df6869a64
6447

65-
build-kernel-sg2042:
66-
name: Build Kernel for SG2042
67-
uses: ./.github/workflows/.sophgo-sg204x.kernel-build.yml
68-
with:
69-
target_name: sophgo-sg2042
70-
kernel_repo: sophgo/linux-riscv
71-
# Branch sg2042-dev-6.6 as of 20260226
72-
kernel_ref: 15143c39ba8d2ebd6c47e7eabcbf2a3b19960532
73-
kernel_defconfig: sophgo_mango_normal_defconfig
74-
7548
build-kernel-sg2044:
7649
name: Build Kernel for SG2044
7750
uses: ./.github/workflows/.sophgo-sg204x.kernel-build.yml
@@ -82,71 +55,6 @@ jobs:
8255
kernel_ref: a7aa9547d2b946aee64e68ff46ad0f61196fe798
8356
kernel_defconfig: kexec_defconfig
8457

85-
prepare-firmware-content-sg2042:
86-
name: Prepare Firmware Contents for SG2042
87-
needs:
88-
- build-zsbl-sg2042
89-
- build-opensbi-sg2042
90-
- build-u-root
91-
- build-kernel-sg2042
92-
runs-on: ubuntu-latest
93-
strategy:
94-
matrix:
95-
include:
96-
- firmware_target_name: linuxboot-sophgo-sg2042
97-
zsbl_target_name: sophgo-sg2042
98-
opensbi_target_name: sophgo-sg2042
99-
u_root_target_name: sophgo-sg204x
100-
kernel_target_name: sophgo-sg2042
101-
steps:
102-
- name: Checkout This Repo
103-
uses: actions/checkout@v5
104-
with:
105-
fetch-depth: 1
106-
path: u-boot-build
107-
- name: Setup Work Dirs
108-
run: |
109-
mkdir -p dist/riscv64
110-
- name: Fetch Pre-built ZSBL
111-
uses: actions/download-artifact@v5
112-
with:
113-
name: "zsbl-${{ matrix.zsbl_target_name }}"
114-
path: dist
115-
merge-multiple: true
116-
- name: Copy fip.bin
117-
run: |
118-
cp u-boot-build/sophgo-sg204x/blobs/sg2042/fip.bin dist
119-
- name: Fetch Pre-built OpenSBI
120-
uses: actions/download-artifact@v5
121-
with:
122-
name: "opensbi-${{ matrix.opensbi_target_name }}"
123-
path: dist/riscv64
124-
merge-multiple: true
125-
- name: Fetch Pre-built u-root
126-
uses: actions/download-artifact@v5
127-
with:
128-
name: "u-root-${{ matrix.u_root_target_name }}"
129-
path: dist/riscv64
130-
merge-multiple: true
131-
- name: Fetch Pre-built Kernel
132-
uses: actions/download-artifact@v5
133-
with:
134-
name: "kernel-${{ matrix.kernel_target_name }}"
135-
path: dist/riscv64
136-
merge-multiple: true
137-
- name: Install dtc
138-
run: |
139-
sudo apt-get update
140-
sudo apt-get install -y device-tree-compiler
141-
- name: Fixup dtb name
142-
run: |
143-
dtc dist/riscv64/mango-milkv-pioneer.dtb | sed 's/console=tty1 //' | dtc > dist/riscv64/sg2042-milkv-pioneer.dtb
144-
- name: Upload Artifacts
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: "collected-${{ matrix.firmware_target_name }}"
148-
path: dist
149-
15058
prepare-firmware-content-sg2044-rva23:
15159
name: Prepare Firmware Contents for SG2044 with RVA23 Emu
15260
needs:
@@ -205,13 +113,6 @@ jobs:
205113
name: "collected-${{ matrix.firmware_target_name }}"
206114
path: dist
207115

208-
pack-sd-boot-firmware-sg2042:
209-
name: Pack SD Card Boot Image for SG2042
210-
needs: prepare-firmware-content-sg2042
211-
uses: ./.github/workflows/.sophgo-sg204x.pack-sdimg.yml
212-
with:
213-
firmware_target_name: linuxboot-sophgo-sg2042
214-
215116
pack-sd-boot-firmware-sg2044-rva23:
216117
name: Pack SD Card Boot Image for SG2044 with RVA23 Emu
217118
needs: prepare-firmware-content-sg2044-rva23

0 commit comments

Comments
 (0)