3. Compile Source
❶ unzip source
1tar xvf rk356x_linux5.10_source-20230905.tar.bz2
2cd rk356x_linux5.10_source\
3sudo tar xvf debian.tar.bz2
❷ set the compile board
1./build.sh -h //view the build command
2./build.sh device/rockchip/rk356x/BoardConfig-rk3566-evb2-lp4x-v10.mk
or use the command
1./build.sh lunch
print as follow. Select 2
processing option: lunch
You're building on Linux
Lunch menu...pick a combo:
0. default BoardConfig.mk
1. BoardConfig-rk3566-evb2-lp4x-v10-32bit.mk
2. BoardConfig-rk3566-evb2-lp4x-v10.mk
3. BoardConfig-rk3568-evb1-ddr4-v10-32bit.mk
4. BoardConfig-rk3568-evb1-ddr4-v10-spi-nor-64M.mk
5. BoardConfig-rk3568-evb1-ddr4-v10.mk
6. BoardConfig-rk3568-nvr-spi-nand.mk
7. BoardConfig-rk3568-nvr.mk
8. BoardConfig-rk3568-uvc-evb1-ddr4-v10.mk
9. BoardConfig.mk
Which would you like? [0]: 2 (BoardConfig-rk3566-evb2-lp4x-v10.mk)
switching to board: /home/EM1126/rk3566_linux_source/device/rockchip/rk356x/BoardConfig-rk3566-evb2-lp4x-v10.mk
❸ compile uboot, kernel, recovery, buildroot
1./build.sh //compile all in one step
After compile the firmwares are generated in rk356x_linux5.10_source\rockdev

User can also use the single-step to compile.
1./build.sh uboot //compile uboot
2./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.

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\
, and the kernel’s default configuration file is kernel\arch\arm64\configs\rockchip_linux_defconfig
. So It needs to copy the update from kernel\.config
to kernel\arch\arm64\configs\rockchip_linux_defconfig
after reconfig.
1source envsetup.sh
2cd buildroot
3make recovery-rebuild
4cd ..
5./build.sh recovery //compile recovery
6./build.sh rootfs //compile buildroot
❹ Compile debian11
1cd debian/
2sudo apt-get install binfmt-support qemu-user-static live-build
3sudo dpkg -i ubuntu-build-service/packages/*
4sudo apt-get install -f
5RELEASE=bullseye TARGET=desktop ARCH=arm64 ./mk-base-debian.sh
6VERSION=debug ARCH=arm64 ./mk-rootfs-bullseye.sh
7./mk-image.sh
After compile, will get linaro-rootfs.img
in the directory rk356x_linux5.10_source\debian

Execute the command to clean the build after compilation.
1sudo ./build.sh cleanall //clean the build