Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge-2l:development:android:build-android

This is an old revision of the document!


Edge-2L 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.

Build ALL:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -UCKAou

You can also distribute compilations:

Build U-Boot:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -Uu

Build kernel:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -CKu

Build Android:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -Au

Build OTA:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -ou

Modify the file build.sh BUILD_JOBS=16 as the number you want when you run BUILD_JOBS=n.

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

rockdev/Image-xxx/
├── baseparameter.img
├── boot-debug.img
├── boot.img
├── config.cfg
├── dtbo.img
├── MiniLoaderAll.bin
├── misc.img
├── parameter.txt
├── pcba_small_misc.img
├── pcba_whole_misc.img
├── recovery.img
├── resource.img
├── super.img
├── uboot.img
├── update.img
└── vbmeta.img

Packing update.img:

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch kedge2l-userdebug
$ ./build.sh -u

After compiling, you need to reload update.img when flashing.

See Also

Last modified: 2026/01/26 00:44 by goenjoy