Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge2:development:android:build-android

This is an old revision of the document!


Edge2 Build Android

Introduction

This document mainly introduces how to compile the Android source code. You will learn how to compile different versions of android source code.

Preparation

Building

Before you start to build, make sure you have done all the Preperations listed above.

Android 12.0

Build U-Boot:

$ cd PATH_YOUR_PROJECT
$ cd u-boot
$ make mrproper
$ ./make.sh kedge

Build kernel:

$ cd PATH_YOUR_PROJECT
$ cd kernel
$ make ARCH=arm64 kedge_defconfig android-10.config rk3588.config
$ make ARCH=arm64 rk3588-khadas-edge-android.img -jN

Build Android:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588_Android10-userdebug
$ make installclean
$ make -jN
$ ./mkimage.sh

Replace N as the number you want when you run make -jN.

After executing ./mkimage.sh, generate a complete firmware package in the rockdev/Image-xxx/directory(xxx is the product name of the specific lunch).

rockdev/Image-xxx/
├── MiniLoaderAll.bin
├── boot.img
├── dtbo.img
├── kernel.img
├── misc.img
├── oem.img
├── parameter.txt
├── pcba_small_misc.img
├── pcba_whole_misc.img
├── recovery.img
├── resource.img
├── system.img
├── trust.img
├── uboot.img
├── update.img
├── vbmeta.img
├── super.img
└── vendor.img

Packing update.img:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588_Android10-userdebug
$ ./pack_image.sh

Android 11.0

Build U-Boot:

$ cd PATH_YOUR_PROJECT
$ cd u-boot
$ make mrproper
$ ./make.sh kedge

Build kernel:

$ cd PATH_YOUR_PROJECT
$ cd kernel
$ make ARCH=arm64 kedge_defconfig -jN
$ make ARCH=arm64 rk3588-khadas-edge-android.img -jN

Build Android:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588-userdebug
$ make installclean
$ make -jN
$ ./mkimage.sh

Replace N as the number you want when you run make -jN.

After executing ./mkimage.sh, generate a complete firmware package in the rockdev/Image-xxx/directory(xxx is the product name of the specific lunch).

rockdev/Image-xxx/
├── MiniLoaderAll.bin
├── boot.img
├── dtbo.img
├── kernel.img
├── misc.img
├── oem.img
├── parameter.txt
├── pcba_small_misc.img
├── pcba_whole_misc.img
├── recovery.img
├── resource.img
├── system.img
├── trust.img
├── uboot.img
├── update.img
├── vbmeta.img

Packing update.img:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588-userdebug
$ ./pack_image.sh

Android 10.0

Build U-Boot:

$ cd PATH_YOUR_PROJECT
$ cd uboot
$ make kedge_defconfig
$ make ARCHV=aarch64

Build kernel:

$ cd PATH_YOUR_PROJECT
$ cd kernel
$ make ARCH=arm64 kedge_defconfig -jN
$ make ARCH=arm64 rk3588-khadas-edge-android.img -jN

Build Android:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588_all-userdebug
$ make installclean
$ make -jN
$ ./mkimage.sh

Replace N as the number you want when you run make -jN.

After executing ./mkimage.sh, generate a complete firmware package in the rockdev/Image-xxx/directory (xxx is the product name of the specific lunch).

rockdev/Image-xxx/
├── boot.img
├── kernel.img
├── misc.img
├── parameter.txt
├── recovery.img
├── resource.img
├── RK3588MiniLoaderAll.bin
├── system.img
├── trust.img
└── uboot.img

Packing update.img:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3588_all-userdebug
$ ./pack_image.sh

See Also

Last modified: 2022/08/01 23:51 by haylrn