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
products:sbc:edge2:development:android:build-android [2022/08/01 23:00]
haylrn
products:sbc:edge2:development:android:build-android [2022/09/29 23:00] (current)
haylrn [Building]
Line 1: Line 1:
-{{indexmenu_n>3}}+{{indexmenu_n>15}}
  
  
Line 6: Line 6:
 ===== Introduction ===== ===== Introduction =====
  
-This document mainly introduces how to compile the Android source code. You will learn how to compile different versions of android source code.+This document mainly introduces how to compile the Android source code. You will learn how to compile different versions of Android source code.
  
 ===== Preparation ===== ===== Preparation =====
Line 21: Line 21:
  
  
-<tabbox Android 10.0>  +Build ALL:
-Build U-Boot: +
- +
-```shell +
-$ cd PATH_YOUR_PROJECT +
-$ cd u-boot +
-$ make mrproper +
-$ ./make.sh kedge +
-``` +
- +
-Build kernel: +
-```shell +
-$ 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:+
  
 ```shell ```shell
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ source build/envsetup.sh $ source build/envsetup.sh
-$ lunch rk3588_Android10-userdebug +$ lunch kedge2-userdebug 
-$ make installclean +$ ./build.sh -AUCKu
-$ make -jN +
-$ ./mkimage.sh+
 ``` ```
 +You can also distribute compilations:
  
-<WRAP info > 
-Replace ''N'' as the number you want when you run ''make -jN''. 
-</WRAP> 
  
-After executing ''./mkimage.sh'', generate a complete firmware package in the ''rockdev/Image-xxx/directory''(xxx is the product name of the specific lunch). +Build U-Boot:
- +
-``` +
-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:+
  
 ```shell ```shell
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ source build/envsetup.sh $ source build/envsetup.sh
-$ lunch rk3588_Android10-userdebug +$ lunch kedge2-userdebug 
-$ ./pack_image.sh +$ ./build.sh -Uu
-``` +
- +
-<tabbox Android 9.0>  +
- +
-Build U-Boot: +
- +
-```shell +
-$ cd PATH_YOUR_PROJECT +
-$ cd u-boot +
-$ make mrproper +
-$ ./make.sh kedge+
 ``` ```
  
 Build kernel: Build kernel:
- 
 ```shell ```shell
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
-cd kernel +source build/envsetup.sh 
-make ARCH=arm64 kedge_defconfig -jN +lunch kedge2-userdebug 
-make ARCH=arm64 rk3588-khadas-edge-android.img -jN+$ ./build.sh -CKu
 ``` ```
  
Line 112: Line 54:
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ source build/envsetup.sh $ source build/envsetup.sh
-$ lunch rk3588-userdebug +$ lunch kedge2-userdebug 
-$ make installclean +$ ./build.sh -Au
-$ make -jN +
-$ ./mkimage.sh+
 ``` ```
 +
 <WRAP info > <WRAP info >
-Replace ''N'' as the number you want when you run ''make -jN''.+ Modify the file build.sh ''BUILD_JOBS=16'' as the number you want when you run ''BUILD_JOBS=n''.
 </WRAP> </WRAP>
  
-After executing ''./mkimage.sh'', generate a complete firmware package in the ''rockdev/Image-xxx/directory''(xxx is the product name of the specific lunch).+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/ rockdev/Image-xxx/
-├── MiniLoaderAll.bin+├── boot-debug.img
 ├── boot.img ├── boot.img
 +├── config.cfg
 ├── dtbo.img ├── dtbo.img
-├── kernel.img+├── MiniLoaderAll.bin
 ├── misc.img ├── misc.img
-├── oem.img 
 ├── parameter.txt ├── parameter.txt
 ├── pcba_small_misc.img ├── pcba_small_misc.img
Line 136: Line 77:
 ├── recovery.img ├── recovery.img
 ├── resource.img ├── resource.img
-├── system.img +├── super.img
-├── trust.img+
 ├── uboot.img ├── uboot.img
 ├── update.img ├── update.img
-── vbmeta.img+── vbmeta.img
 ``` ```
  
Line 148: Line 88:
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ source build/envsetup.sh $ source build/envsetup.sh
-$ lunch rk3588-userdebug +$ lunch kedge2-userdebug 
-$ ./pack_image.sh+$ ./build.sh -u
 ``` ```
  
-<tabbox Android 7.1>  +<WRAP important 
- +After compiling, you need to reload ''update.img'' when flashing.
- +
-Build U-Boot: +
- +
-```shell +
-$ cd PATH_YOUR_PROJECT +
-$ cd uboot +
-$ make kedge_defconfig +
-$ make ARCHV=aarch64 +
-``` +
- +
-Build kernel: +
- +
-```shell +
-$ cd PATH_YOUR_PROJECT +
-$ cd kernel +
-$ make ARCH=arm64 kedge_defconfig -jN +
-$ make ARCH=arm64 rk3588-khadas-edge-android.img -jN +
-``` +
- +
-Build Android: +
- +
-```shell +
-$ cd PATH_YOUR_PROJECT +
-$ source build/envsetup.sh +
-$ lunch rk3588_all-userdebug +
-$ make installclean +
-$ make -jN +
-$ ./mkimage.sh +
-``` +
- +
-<WRAP info +
-Replace ''N'' as the number you want when you run ''make -jN''.+
 </WRAP> </WRAP>
  
-After executing ''./mkimage.sh'', generate a complete firmware package in the ''rockdev/Image-xxx/directory'' (xxx is the product name of the specific lunch).+===== See Also =====
  
-``` +  * [[/products/sbc/edge2/install-os/install-os-into-emmc-via-usb-tool|]] 
-rockdev/Image-xxx+  * [[/products/sbc/edge2/install-os/install-os-into-external-storage|]]
-├── boot.img +
-├── kernel.img +
-├── misc.img +
-├── parameter.txt +
-├── recovery.img +
-├── resource.img +
-├── RK3588MiniLoaderAll.bin +
-├── system.img +
-├── trust.img +
-└── uboot.img +
-```+
  
-Packing ''update.img'': 
- 
-```shell 
-$ cd PATH_YOUR_PROJECT 
-$ source build/envsetup.sh 
-$ lunch rk3588_all-userdebug 
-$ ./pack_image.sh 
-``` 
- 
-</tabbox> 
- 
-===== See Also ===== 
  
-  * [[/products/sbc/edge1/install-os/install-os-into-emmc-via-usb-tool|Install OS Into eMMC via USB Tool]]. 
-  * [[/products/sbc/edge1/install-os/install-os-into-external-storage|Install OS into External Storage]]. 
-{{indexmenu_n>3}} 
  
Last modified: 2022/08/01 23:00 by haylrn