3.Compile Source

3.1 Unzip source and configure

tar xvf rk356x_linux5.10_source-20230728.tar.bz2
cd rk356x_linux5.10_source\
./build.sh -h                                 //view the build command
./build.sh lunch

Print out as follow. Select 3 : rockchip_rk3566_evb2_lp4x_v10_defconfig

 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

User can also use the single-step to compile.

./build.sh uboot    //compile uboot
./build.sh kernel     //compile 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.

RK3566-IO-Power-Domain-Map

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

cd kernel
make 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.

cd buildroot
source envsetup.sh
make recovery-rebuild
cd ..
./build.sh recovery             //compile recovery
./build.sh rootfs   //compile buildroot

Execute the follow command to clean the build after compilation.

sudo ./build.sh cleanall     //Clean the build