Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
products:sbc:edge2:development:android:build-android [2022/07/15 23:46]
nick
products:sbc:edge2:development:android:build-android [2022/09/28 09:50]
nick
Line 1: Line 1:
-{{indexmenu_n>3}}+{{indexmenu_n>15}}
  
  
 ====== Edge2 Build Android ====== ====== 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 =====
 +
 +  * [[http://source.android.com/source/initializing.html]]
 +  * [[.download-android-source-code]]
 +  * [[.install-toolchains]]
 +
 +===== Building =====
 +
 +<WRAP important >
 +Before you start to build, make sure you have done all the Preperations listed above.
 +</WRAP>
 +
 +
 +Build ALL:
 +
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ ./enjoy.sh
 +```
 +You can also distribute compilations:
 +
 +
 +Build U-Boot:
 +
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ cd u-boot
 +$ ./make.sh rk3588
 +```
 +
 +Build kernel:
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ source build/envsetup.sh
 +$ lunch kedge2-userdebug
 +$ ./build.sh -CKu
 +```
 +
 +Build Android:
 +
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ source build/envsetup.sh
 +$ lunch kedge2-userdebug
 +$ ./build.sh -Au
 +```
 +
 +<WRAP info >
 + Modify the file build.sh ''BUILD_JOBS=16'' as the number you want when you run ''BUILD_JOBS=n''.
 +</WRAP>
 +
 +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/
 +├── 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:
 +
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ source build/envsetup.sh
 +$ lunch kedge2-userdebug
 +$ ./build.sh -u
 +```
 +
 +<WRAP important >
 +After compiling, you need to reload ''update.img'' when flashing.
 +</WRAP>
 +
 +===== See Also =====
 +
 +  * [[/products/sbc/edge2/install-os/install-os-into-emmc-via-usb-tool|]]
 +  * [[/products/sbc/edge2/install-os/install-os-into-external-storage|]]
 +
 +
 +
Last modified: 2022/09/29 23:00 by haylrn