Skip to content

Commit 87c042c

Browse files
committed
github: Add riscv kernel build and upload
Add required pacakge for cross-compile riscv kernel, workflow for build and upload kernel. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
1 parent d339d41 commit 87c042c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ jobs:
1212
with:
1313
fetch-depth: 1
1414
- name: Install build tools
15-
run: sudo apt install build-essential flex bison libssl-dev libelf-dev bc gcc-aarch64-linux-gnu
15+
run: sudo apt install build-essential flex bison libssl-dev libelf-dev bc gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu
1616
- name: Configure (aarch64)
1717
run: ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make ch_defconfig
1818
- name: Build (aarch64)
1919
run: ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Image.gz -j `nproc`
20+
- name: Configure (riscv64)
21+
run: ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make ch_defconfig
22+
- name: Build (riscv64)
23+
run: ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make Image.gz -j `nproc`
2024
- name: Configure (x86-64)
2125
run: make ch_defconfig
2226
- name: Build kernel (x86-64)
@@ -66,3 +70,21 @@ jobs:
6670
asset_path: arch/arm64/boot/Image
6771
asset_name: Image-arm64
6872
asset_content_type: application/octet-stream
73+
- name: Upload Image.gz for riscv64
74+
uses: actions/upload-release-asset@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
upload_url: ${{ steps.create_release.outputs.upload_url }}
79+
asset_path: arch/riscv/boot/Image.gz
80+
asset_name: Image-riscv.gz
81+
asset_content_type: application/octet-stream
82+
- name: Upload Image for riscv64
83+
uses: actions/upload-release-asset@v1
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
with:
87+
upload_url: ${{ steps.create_release.outputs.upload_url }}
88+
asset_path: arch/riscv/boot/Image
89+
asset_name: Image-riscv
90+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)