Skip to content

Commit 04afa56

Browse files
cp0613guoren83
authored andcommitted
ci: linux-6.6: Add debug image compilation
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
1 parent 674a286 commit 04afa56

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
toolchain_tripe: riscv64-unknown-linux-gnu-
3131
- name: linux-6.6-64lp64
3232
toolchain_tripe: riscv64-unknown-linux-gnu-
33+
- name: linux-6.6-64lp64-debug
34+
toolchain_tripe: riscv64-unknown-linux-gnu-
3335
- name: linux-6.6-64ilp32
3436
toolchain_tripe: riscv64-unknown-elf-
3537
- name: zsb-32ilp32
@@ -53,7 +55,7 @@ jobs:
5355
- name: Install software
5456
run: |
5557
sudo apt update && \
56-
sudo apt install -y build-essential
58+
sudo apt install -y build-essential libelf-dev dwarves
5759
5860
- name: Checkout source
5961
uses: actions/checkout@v4
@@ -86,6 +88,11 @@ jobs:
8688
tar -xvf ${rv64_toolchain_file_name} -C /opt
8789
rm -v ${rv64_toolchain_file_name}
8890
fi
91+
if [ x"${{ matrix.name }}" = x"linux-6.6-64lp64-debug" ]; then
92+
wget ${rv64_toolchain}/${rv64_toolchain_file_name}
93+
tar -xvf ${rv64_toolchain_file_name} -C /opt
94+
rm -v ${rv64_toolchain_file_name}
95+
fi
8996
if [ x"${{ matrix.name }}" = x"linux-6.6-64ilp32" ]; then
9097
wget ${rv64ilp32_toolchain}/${rv64ilp32_toolchain_file_name}
9198
tar -xvf ${rv64ilp32_toolchain_file_name} -C /opt
@@ -165,7 +172,20 @@ jobs:
165172
export PATH="/opt/riscv/bin:$PATH"
166173
git clone https://github.com/ruyisdk/linux-xuantie-kernel.git linux
167174
cd linux
168-
make ARCH=riscv EXTRA_CFLAGS+=-g defconfig all INSTALL_MOD_PATH=../modules_install modules_install INSTALL_HDR_PATH=../headers_install headers_install -j$(nproc)
175+
make ARCH=riscv EXTRA_CFLAGS+=-g xuantie_defconfig all INSTALL_MOD_PATH=../modules_install modules_install INSTALL_HDR_PATH=../headers_install headers_install -j$(nproc)
176+
mv arch/riscv/boot/Image ../
177+
mv vmlinux ../
178+
cp Documentation/admin-guide/kdump/gdbmacros.txt ../
179+
git log --oneline -500 > ../git.log
180+
cat ../git.log
181+
cd -
182+
tar czvf ${{ matrix.name }}.tar.gz Image vmlinux git.log modules_install headers_install gdbmacros.txt
183+
fi
184+
if [ x"${{ matrix.name }}" = x"linux-6.6-64lp64-debug" ]; then
185+
export PATH="/opt/riscv/bin:$PATH"
186+
git clone https://github.com/ruyisdk/linux-xuantie-kernel.git linux
187+
cd linux
188+
make ARCH=riscv EXTRA_CFLAGS+=-g xuantie_debug_defconfig all INSTALL_MOD_PATH=../modules_install modules_install INSTALL_HDR_PATH=../headers_install headers_install -j$(nproc)
169189
mv arch/riscv/boot/Image ../
170190
mv vmlinux ../
171191
cp Documentation/admin-guide/kdump/gdbmacros.txt ../

0 commit comments

Comments
 (0)