Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim-5:development:android:build-android

Differences

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

Link to this comparison view

Next revision
Previous revision
products:sbc:vim-5:development:android:build-android [2026/09/15 02:51]
127.0.0.1 external edit
products:sbc:vim-5:development:android:build-android [2026/10/30 02:30] (current)
goenjoy
Line 2: Line 2:
  
  
-====== VIM4 Build Android ======+====== VIM 5 Build Android ======
  
 ===== Preparations ===== ===== Preparations =====
  
   * [[http://source.android.com/source/initializing.html|Set up a Build Environment]]   * [[http://source.android.com/source/initializing.html|Set up a Build Environment]]
-  * [[products:sbc:vim4:development:android:download-android-source-code|Downloading the Android Source]] +  * [[products:sbc:vim5:development:android:download-android-source-code|Downloading the Android Source]] 
-  * [[products:sbc:vim4:development:android:install-toolchains|Install Toolchains for the Amlogic Platform]]+  * [[products:sbc:vim5:development:android:install-toolchains|Install Toolchains for the Amlogic Platform]]
  
 ===== Building ===== ===== Building =====
Line 17: Line 17:
 </WRAP> </WRAP>
  
-<tabbox Android 14> 
 **Build U-Boot:** **Build U-Boot:**
  
 ```shell ```shell
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
-$ cd bootloader/uboot +$ cd bootloader/uboot-repo/ 
-$ ./mk kvim4 --avb2 --vab+$ ./mk kvim5 --fastboot-write --avb2 --vab
 ``` ```
 Gernerate images in this step: Gernerate images in this step:
  
-  * ''build/u-boot.bin'': for onboard eMMC storage booting +  * ''build/u-boot.bin.signed'': for onboard eMMC storage booting 
-  * ''build/u-boot.bin.sd.bin'': for external TF card booting+  * ''build/u-boot.bin.sd.bin.signed'': for external TF card booting
  
 **Build Linux Kernel:** **Build Linux Kernel:**
Line 34: Line 33:
  
 ```shell ```shell
-$ ./mk kvim4 -v common14-5.15 -jN+$ ./mk kvim5 -v common16-6.12 -jN
 ``` ```
  
Line 48: Line 47:
 $ cd PATH_YOUR_PROJECT $ cd PATH_YOUR_PROJECT
 $ . build/envsetup.sh $ . build/envsetup.sh
-$ lunch kvim4_arm64-userdebug +$ lunch kvim5_arm64-bp4a-userdebug 
-$ make aml_upgrade -jN+$ make -jN
 $ make -jN otapackage $ make -jN otapackage
 ``` ```
  
-Gernerate images in this step: ''out/target/product/kvim4/update.img''.+Gernerate images in this step: ''out/target/product/kvim5/update.img''.
  
  
Line 69: Line 68:
 if [ "$1" == 'u' ] || [ "$1" == 'n' ]; then  if [ "$1" == 'u' ] || [ "$1" == 'n' ]; then
  echo "build uboot"  echo "build uboot"
- cd bootloader/uboot+ cd bootloader/uboot-repo/
 if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then
  make clean   make clean
  echo "build uboot n"  echo "build uboot n"
 fi  fi
- ./mk kvim4 --avb2 --vab+ ./mk kvim5 --fastboot-write --avb2 --vab
  cd -  cd -
 fi fi
Line 82: Line 81:
  echo "build kernel"  echo "build kernel"
 if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then
- rm -rf common/common14-5.15/out+ rm -rf common/common16-6.12/out
 fi  fi
- ./mk kvim4 -v common14-5.15 -j88+ ./mk kvim5 -v common16-6.12 -j88
 fi fi
  
Line 93: Line 92:
  rm -rf out/  rm -rf out/
 fi fi
- . build/envsetup.sh  + . build/envsetup.sh 
-  lunch kvim4_arm64-userdebug+  lunch kvim5_arm64-bp4a-userdebug
 # make installclean # make installclean
  rm android.log  rm android.log
- make aml_upgrade -j88 >> android.log+ make -j88 >> android.log
 fi fi
  
 if [ "$1" == 'o' ] || [ "$1" == 'n' ]; then if [ "$1" == 'o' ] || [ "$1" == 'n' ]; then
  echo "build otapackage"   echo "build otapackage" 
- . build/envsetup.sh  + . build/envsetup.sh 
-  lunch kvim4_arm64-userdebug+  lunch kvim5_arm64-bp4a-userdebug
  make -j88 otapackage  make -j88 otapackage
 fi 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> 
- 
- 
-**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 
-$ cat demo.sh 
-#!/bin/bash 
- 
-#build U-Boot 
-if [ "$1" == 'u' ] || [ "$1" == 'n' ]; then  
- echo "build U-Boot" 
- cd bootloader/uboot 
- ./mk kvim4 --avb2 --vab  
- cd - 
-fi 
- 
-#build Kernel 
-if [ "$1" == 'k' ] || [ "$1" == 'n' ]; then 
- echo "build Kernel" 
-if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then 
- . build/envsetup.sh  
- lunch kvim4-userdebug  
- make distclean 
-fi  
- ./mk kvim4 -v 5.4 -j100 
-fi 
- 
-#build Android 
-if [ "$1" == 'a' ] || [ "$1" == 'n' ]; then 
- echo "build Android" 
-if [ "$2" == 'n' ] || [ "$1" == 'n' ]; then 
- . build/envsetup.sh  
- lunch kvim4-userdebug  
- make clean 
-fi   
- . build/envsetup.sh  
- lunch kvim4-userdebug  
- make installclean 
- #make -j80 otapackage 
- make -j80 
-fi 
-``` 
- 
-</tabbox> 
  
 **Build U-Boot:** **Build U-Boot:**
Last modified: 2026/09/15 02:51 by 127.0.0.1