3.Compile Source
3.1 Unzip Source and Configure
1tar xvf rk356x_linux5.10_source-20230728.tar.bz2
2cd rk356x_linux5.10_source\
3./build.sh -h //view the build command
4./build.sh lunch
Print out as follow. Select 3
Pick a defconfig:
1. rockchip_defconfig
2. rockchip_rk3566_evb2_lp4x_v10_32bit_defconfig
3. rockchip_rk3566_evb2_lp4x_v10_defconfig
4. rockchip_rk3568_evb1_ddr4_v10_32bit_defconfig
5. rockchip_rk3568_evb1_ddr4_v10_defconfig
6. rockchip_rk3568_uvc_evb1_ddr4_v10_defconfig
Which would you like? [1]: 3
Switching to defconfig: /home/Name/opt/rk3566/sdk-11.0/device/rockchip/.chip/rockchip_rk3566_evb2_lp4x_v10_defconfig
3.2 Compile uboot, kernel, recovery, buildroot
Compile all in one step:
1./build.sh
User can also compile step by step:
❶ compile uboot
1./build.sh uboot
❷ compile kernel
1./build.sh kernel
It will pop out a window about config the IO Power Domain Map when first time compile kernel, you need to configure according to below form.
kernel.img
, resource.img
and boot.img
are generated in directory
rk3566_linux_source\kernel
If only configure the kernel, please complied kernel as follow:
1cd kernel
2make ARCH=arm64 menuconfig
The reconfig kernel file is located in kernel\
The kernel’s default configuration file is kernel\arch\arm64\configs\rockchip_linux_defconfig
, so it needs to copy the update .config from kernel\
to kernel\arch\arm64\configs\
and rename to rockchip_linux_defconfig after reconfig.
❸ compile recovery
1cd buildroot
2source envsetup.sh
3make recovery-rebuild
4cd ..
5./build.sh recovery
❹ compile buildroot
1./build.sh rootfs //compile buildroot
Execute the follow command to clean the build after compilation.
1sudo ./build.sh cleanall