3. Compile Source

Step 1, unzip the source

tar xvf ROCKCHIP_ANDROID12.0_SDK_RELEASE.tar.gz
cd ROCKCHIP_ANDROID12.0_SDK_RELEASE

Step 2, compile uboot

cd u-boot
./make.sh rk3568

Step 3, compile kernel

cd kernel-4.19/
make ARCH=arm64 rockchip_defconfig android-11.config
make ARCH=arm64 rk3568-evb2-lp4x-v10.img -j24

kernel.img and resource.img are included in boot.img.

If only update kernel, complie as follow. After compiling, user can directly flash the boot.img under kernel directory.

make ARCH=arm64 rockchip_defconfig android-11.config
make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3568_s/boot.img  rk3568-evb2-lp4x-v10.img -j24

Step 4, compile Android

source build/envsetup.sh
lunch rk3568_r-userdebug
make -j12

Step 5, generated image file

./mkimage.sh
./build.sh -u     //package update.img
cd rockdev
ls

Images and update.img are generated in current directory.