Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4: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:vim4:development:android:build-android [2023/08/22 21:23]
goenjoy
products:sbc:vim4:development:android:build-android [2024/11/26 20:09] (current)
goenjoy
Line 17: Line 17:
 </WRAP> </WRAP>
  
- +<tabbox Android 14> 
-==== Build U-Boot ====+**Build U-Boot:**
  
 ```shell ```shell
Line 30: Line 30:
   * ''build/u-boot.bin.sd.bin'': for external TF card booting   * ''build/u-boot.bin.sd.bin'': for external TF card booting
  
-==== Build Linux Kernel ====+**Build Linux Kernel:**
  
  
 ```shell ```shell
-$ ./mk kvim4 -v 5.-jN+$ ./mk kvim4 -v common14-5.15 -jN
 ``` ```
  
Line 42: Line 42:
  
  
-==== Build Android ====+**Build Android:**
  
  
Line 48: Line 48:
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ . build/envsetup.sh $ . build/envsetup.sh
-$ lunch TARGET_LUNCH+$ lunch kvim4_arm64-userdebug 
 +$ make aml_upgrade -jN
 $ make -jN otapackage $ make -jN otapackage
 ``` ```
  
-Gernerate images in this step: ''out/target/product/TARGET/update.img''.+Gernerate images in this step: ''out/target/product/kvim4/update.img''.
  
  
 <WRAP important > <WRAP important >
-  * Unlike VIM3,  VIM4 doesn't support compiling Android and Linux Kernel at the same time. +Replace ''N'' with the actual number of threads on your own computer. 
-  * Replace ''N'' with the actual number of threads on your own computer +</WRAP>
-  * Replace ''TARGET_LUNCH'' to your lunch select+
-    * For VIM4, it's ''kvim4-userdebug''.+
  
 +
 +**Build Script Demo:**
 +```sh demo.sh
 +$ cat demo.sh
 +#!/bin/bash
 +
 +#build uboot
 +if [ "$1" == 'u' ] || [ "$1" == 'n' ]; then
 + echo "build uboot"
 + cd bootloader/uboot
 +if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then
 + make clean
 + echo "build uboot n"
 +fi
 + ./mk kvim4 --avb2 --vab
 + cd -
 +fi
 +
 +#build kernel
 +if [ "$1" == 'k' ] || [ "$1" == 'n' ]; then
 + echo "build kernel"
 +if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then
 + rm -rf common/common14-5.15/out
 +fi
 + ./mk kvim4 -v common14-5.15 -j88
 +fi
 +
 +#build android
 +if [ "$1" == 'a' ] || [ "$1" == 'n' ]; then
 + echo "build android" 
 +if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then
 + rm -rf out/
 +fi
 + . build/envsetup.sh 
 +  lunch kvim4_arm64-userdebug
 +# make installclean
 + rm android.log
 + make aml_upgrade -j88 >> android.log
 +fi
 +
 +if [ "$1" == 'o' ] || [ "$1" == 'n' ]; then
 + echo "build otapackage" 
 + . build/envsetup.sh 
 +  lunch kvim4_arm64-userdebug
 + make -j88 otapackage
 +fi
 +```
 +
 +<tabbox Android 11>
 +**Build U-Boot:**
 +
 +```shell
 +$ cd PATH_YOUR_PROJECT
 +$ cd bootloader/uboot
 +$ ./mk kvim4 --avb2 --vab
 +```
 +Gernerate images in this step:
 +
 +  * ''build/u-boot.bin'': for onboard eMMC storage booting
 +  * ''build/u-boot.bin.sd.bin'': for external TF card booting
 +
 +**Build Linux Kernel:**
 +
 +
 +```shell
 +$ ./mk kvim4 -v 5.4 -jN
 +```
 +
 +<WRAP important >
 +Replace ''N'' with the actual number of threads on your own computer.
 </WRAP> </WRAP>
  
  
-==== Build Script Demo ====+**Build Android:** 
 + 
 +```shell 
 +$ cd PATH_YOUR_PROJECT 
 +$ . build/envsetup.sh 
 +$ lunch kvim4-userdebug 
 +$ make -jN otapackage 
 +``` 
 + 
 +Gernerate images in this step: ''out/target/product/kvim4/update.img''
 + 
 + 
 +<WRAP important > 
 +Replace ''N'' with the actual number of threads on your own computer. 
 +</WRAP> 
 + 
 + 
 +**Build Script Demo:**
  
 ```sh demo.sh ```sh demo.sh
Line 104: Line 190:
 fi fi
 ``` ```
 +
 +</tabbox>
  
 **Build U-Boot:** **Build U-Boot:**
Last modified: 2023/08/22 21:23 by goenjoy