3. Compile Source

Step 1, unzip the source

tar xvf rk356x_android12_sdk.tar.bz2
cd rk356x_android12_sdk
./build.sh -h                //view the build command

Step 2, compile uboot

cd u-boot
./make.sh rk3566

Step 3, compile the kernel

cd kernel-4.19
make ARCH=arm64 rockchip_defconfig
make ARCH=arm64 em3566-boardcon-hdmi.img                   //HDMI display

or

make ARCH=arm64 em3566-boardcon-lvds.img                   // 10.1-inch LVDS display

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

If only update kernel, complie as follow.

make make ARCH=arm64 rockchip_defconfig
make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3566_r/boot.img em3566-boardcon-hdmi.img    // for HDMI

or

make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3566_r/boot.img em3566-boardcon-lvds.img   // for 10.1-inch LVDS

After compiling, user can directly flash the boot.img that under kernel directory.

Step 4, compile Android

source build/envsetup.sh
lunch rk3566_r-userdebug
make -j8

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.