Building Kernel Image
Perform the following steps to prepare the kernel image:
- Pull the kernel
code:
$ git clone https://github.com/starfive-tech/VisionFive2.git
- For more instructions, please refer to https://github.com/starfive-tech/VisionFive2.
- The Debian image version used in this step is
starfive-jh7110-VF2_515_v2.5.0-69.
Link: https://debian.starfivetech.com/
The corresponding software version is VisionFive2 Software v2.5.0.
Link: https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v2.5.0
- Compile code:
- Enter the following directory:
/VisionFive2/linux/arch/riscv/configs
- Use the following file to replace
starfive_visionfive2_defconfig.Note: To download this file, you need to register or login to RVspace.
- Run ./build_kernel_vf2.sh script under
/VisionFive2/work/linux directory.Note:
- Script download address: build_kernel_vf2.shNote: To download this file, you need to register or login to RVspace.
- You need to change the target path of the script file to your own file path.
- Script download address: build_kernel_vf2.sh
- Enter the following directory:
- Confirm the generated files after compilation:
- Under ./VisionFive2/work/boot path:
- config-5.15.0-starfive-dirty
- System.map-5.15.0-starfive-dirty
- vmlinuz-5.15.0-starfive-dirty
Note: To simplify the later operations, rename the generated files as the following:- config-5.15.0-starfive
- System.map-5.15.0-starfive
- vmlinuz-5.15.0-starfive
- Under ./VisionFive2/work path:
- linux-headers-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb
- linux-image-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb
- linux-libc-dev_5.15.0-starfive-1_riscv64.deb
- Under ./VisionFive2/work/boot path: