sg204x: split pipeline #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SOPHGO SG2042 | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/sophgo-sg2042.yml' | |
| - '.github/workflows/.sophgo-sg204x.*' | |
| - 'sophgo/sg2042/**' | |
| jobs: | |
| build-zsbl-sg2042: | |
| name: Build ZSBL for SG2042 | |
| uses: ./.github/workflows/.sophgo-sg204x.zsbl-build.yml | |
| with: | |
| target_name: sophgo-sg2042 | |
| zsbl_repo: revyos/zsbl | |
| # Branch sg204x as of 20260227 | |
| zsbl_ref: 45054e711d81fbfa1c2167829402d26795199ae7 | |
| zsbl_defconfig: sg2042_defconfig | |
| build-opensbi-sg2042: | |
| name: Build OpenSBI for SG2042 | |
| uses: ./.github/workflows/.sophgo-sg204x.opensbi-build.yml | |
| with: | |
| target_name: sophgo-sg2042 | |
| opensbi_repo: sophgo/opensbi | |
| # Branch sg2042-dev as of 20260225 | |
| opensbi_ref: adc7ba17f3726aee599bc6fc879fbc569fbbba71 | |
| build-u-root: | |
| name: Build u-root | |
| uses: ./.github/workflows/.sophgo-sg204x.u-root-build.yml | |
| with: | |
| target_name: sophgo-sg204x | |
| u_root_repo: openeuler-riscv/u-root | |
| # Branch sg204x-v0.15 as of 20260225 | |
| u_root_ref: 69595b5c67cb59b0afb9744d13625b9df6869a64 | |
| build-kernel-sg2042: | |
| name: Build Kernel for SG2042 | |
| uses: ./.github/workflows/.sophgo-sg204x.kernel-build.yml | |
| with: | |
| target_name: sophgo-sg2042 | |
| kernel_repo: sophgo/linux-riscv | |
| # Branch sg2042-dev-6.6 as of 20260226 | |
| kernel_ref: 15143c39ba8d2ebd6c47e7eabcbf2a3b19960532 | |
| kernel_defconfig: sophgo_mango_normal_defconfig | |
| prepare-firmware-content-sg2042: | |
| name: Prepare Firmware Contents for SG2042 | |
| needs: | |
| - build-zsbl-sg2042 | |
| - build-opensbi-sg2042 | |
| - build-u-root | |
| - build-kernel-sg2042 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - firmware_target_name: linuxboot-sophgo-sg2042 | |
| zsbl_target_name: sophgo-sg2042 | |
| opensbi_target_name: sophgo-sg2042 | |
| u_root_target_name: sophgo-sg204x | |
| kernel_target_name: sophgo-sg2042 | |
| steps: | |
| - name: Checkout This Repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| path: u-boot-build | |
| - name: Setup Work Dirs | |
| run: | | |
| mkdir -p dist/riscv64 | |
| - name: Fetch Pre-built ZSBL | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: "zsbl-${{ matrix.zsbl_target_name }}" | |
| path: dist | |
| merge-multiple: true | |
| - name: Copy fip.bin | |
| run: | | |
| cp u-boot-build/sophgo/sg2042/blobs/fip.bin dist | |
| - name: Fetch Pre-built OpenSBI | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: "opensbi-${{ matrix.opensbi_target_name }}" | |
| path: dist/riscv64 | |
| merge-multiple: true | |
| - name: Fetch Pre-built u-root | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: "u-root-${{ matrix.u_root_target_name }}" | |
| path: dist/riscv64 | |
| merge-multiple: true | |
| - name: Fetch Pre-built Kernel | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: "kernel-${{ matrix.kernel_target_name }}" | |
| path: dist/riscv64 | |
| merge-multiple: true | |
| - name: Install dtc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y device-tree-compiler | |
| - name: Fixup dtb name | |
| run: | | |
| dtc dist/riscv64/mango-milkv-pioneer.dtb | sed 's/console=tty1 //' | dtc > dist/riscv64/sg2042-milkv-pioneer.dtb | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "collected-${{ matrix.firmware_target_name }}" | |
| path: dist | |
| pack-sd-boot-firmware-sg2042: | |
| name: Pack SD Card Boot Image for SG2042 | |
| needs: prepare-firmware-content-sg2042 | |
| uses: ./.github/workflows/.sophgo-sg204x.pack-sdimg.yml | |
| with: | |
| firmware_target_name: linuxboot-sophgo-sg2042 |