Under Construction
Supported Architectures: x86_64
riscv64
x86_64
Supported Toolchains:
3.2.0
Xuantie-900 Linux 6.6.0 v3.2.014
Mainline RISC-V GCC 14 Cross Compiler (default)
riscv64
Supported Toolchains:
rv
Mainline GCC Compiler
Select the compiler to use via the TOOLCHAIN_VERSION
variable
docker build --build-arg TOOLCHAIN_VERSION=14 -t xuantie900:linux14 .
docker run -it --rm -v LOCAL_PATH:/output xuantie900:linux14 bash
./mkkernel_x64.sh # use mkkernel_xuantie.sh or mkkernel_riscv64.sh depend on your TOOLCHAIN_VERSION
The built kernel deb packages will be copied to the directory specified by LOCAL_PATH
, and then you can install them using dpkg
.
The compilation process will produce several results:
- linux-headers-6.6.77-th1520_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb (Install when compiling kernel modules or for kernel development)
- linux-image-6.6.77-th1520-dbg_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb (Debug symbols, install when debugging the kernel)
- linux-image-6.6.77-th1520_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb (Kernel, must install)
- linux-libc-dev_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb (libc interface, generally not installed, use the generic version)
- To change the version to be compiled, you can freely modify it after entering the docker environment (input
bash
) - The
linux-header
package cross-compiled in thex86_64
environment may containx86_64
header files. If you need to develop the kernel or use DKMS modules such aszfs
, please compile withTOOLCHAIN_VERSION=rv
in the RISC-V environment.
仍在施工中
支持架构:x86_64
riscv64
x86_64
支持工具链:
3.2.0
Xuantie-900 Linux 6.6.0 版本v3.2.014
主线 RISC-V GCC 14交叉编译器(默认)
riscv64
支持工具链:
rv
主线 GCC 编译器
通过TOOLCHAIN_VERSION
变量选择要使用的编译器
docker build --build-arg TOOLCHAIN_VERSION=14 -t xuantie900:linux14 .
docker run -it --rm -v LOCAL_PATH:/output xuantie900:linux14 bash
./mkkernel_x64.sh # 根据 TOOLCHAIN_VERSION 配置选择 mkkernel_xuantie.sh 或 mkkernel_riscv64.sh
会将构建好的内核deb包拷贝到LOCAL_PATH
指定的目录中,然后使用dpkg
安装即可。
编译过程会产生多个结果:
- linux-headers-6.6.77-th1520_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb(需要编译内核模块或内核开发时安装)
- linux-image-6.6.77-th1520-dbg_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb(调试符号,需要调试内核时安装)
- linux-image-6.6.77-th1520_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb(内核,必装)
- linux-libc-dev_6.6.77-2025.03.02.09.37+cb159e628_riscv64.deb(libc接口,一般不安装,使用通用版即可)
- 如需更改编译的版本,可在进入docker环境(输入
bash
)后自由修改 x86_64
环境下交叉编译出的linux-header
包可能包含x86_64
的头文件。如需进行内核开发或使用如zfs
之类的DKMS模块,请在RISC-V环境下使用TOOLCHAIN_VERSION=rv
编译。