This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim4:development:android:build-android [2022/07/06 09:45] nick |
products:sbc:vim4:development:android:build-android [2024/11/26 20:09] (current) goenjoy |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{indexmenu_n> | + | {{indexmenu_n> |
| - | ====== Build Android ====== | + | ====== |
| ===== Preparations ===== | ===== Preparations ===== | ||
| - | - [x] [[http:// | + | * [[http:// |
| - | - [x] [[DownloadAndroidSourceCode.html: | + | |
| - | - [x] [[InstallToolchains|Install Toolchains for the Amlogic Platform]] | + | |
| ===== Building ===== | ===== Building ===== | ||
| Line 16: | Line 14: | ||
| <WRAP important > | <WRAP important > | ||
| - | Before you start to build, make sure you have done all the '' | + | Make sure you have done all the '' |
| </ | </ | ||
| + | <tabbox Android 14> | ||
| **Build U-Boot:** | **Build U-Boot:** | ||
| - | ```sh | + | ```shell |
| $ cd PATH_YOUR_PROJECT | $ cd PATH_YOUR_PROJECT | ||
| $ cd bootloader/ | $ cd bootloader/ | ||
| Line 34: | Line 32: | ||
| **Build Linux Kernel:** | **Build Linux Kernel:** | ||
| - | ```sh | + | |
| - | $ ./mk kvim4 -v 5.4 -jN | + | ```shell |
| + | $ ./mk kvim4 -v common14-5.15 -jN | ||
| ``` | ``` | ||
| Line 45: | Line 44: | ||
| **Build Android:** | **Build Android:** | ||
| - | ```sh | + | |
| + | ```shell | ||
| $ cd PATH_YOUR_PROJECT | $ cd PATH_YOUR_PROJECT | ||
| $ . build/ | $ . build/ | ||
| - | $ lunch TARGET_LUNCH | + | $ lunch kvim4_arm64-userdebug |
| + | $ make aml_upgrade -jN | ||
| $ make -jN otapackage | $ make -jN otapackage | ||
| ``` | ``` | ||
| + | Gernerate images in this step: '' | ||
| + | |||
| + | |||
| + | <WRAP important > | ||
| + | Replace '' | ||
| + | </ | ||
| + | |||
| + | |||
| + | **Build Script Demo:** | ||
| + | ```sh demo.sh | ||
| + | $ cat demo.sh | ||
| + | #!/bin/bash | ||
| + | |||
| + | #build uboot | ||
| + | if [ " | ||
| + | echo "build uboot" | ||
| + | cd bootloader/ | ||
| + | if [ " | ||
| + | make clean | ||
| + | echo "build uboot n" | ||
| + | fi | ||
| + | ./mk kvim4 --avb2 --vab | ||
| + | cd - | ||
| + | fi | ||
| + | |||
| + | #build kernel | ||
| + | if [ " | ||
| + | echo "build kernel" | ||
| + | if [ " | ||
| + | rm -rf common/ | ||
| + | fi | ||
| + | ./mk kvim4 -v common14-5.15 -j88 | ||
| + | fi | ||
| + | |||
| + | #build android | ||
| + | if [ " | ||
| + | echo "build android" | ||
| + | if [ " | ||
| + | rm -rf out/ | ||
| + | fi | ||
| + | . build/ | ||
| + | | ||
| + | # make installclean | ||
| + | rm android.log | ||
| + | make aml_upgrade -j88 >> android.log | ||
| + | fi | ||
| + | |||
| + | if [ " | ||
| + | echo "build otapackage" | ||
| + | . build/ | ||
| + | | ||
| + | make -j88 otapackage | ||
| + | fi | ||
| + | ``` | ||
| + | |||
| + | <tabbox Android 11> | ||
| + | **Build U-Boot:** | ||
| + | |||
| + | ```shell | ||
| + | $ cd PATH_YOUR_PROJECT | ||
| + | $ cd bootloader/ | ||
| + | $ ./mk kvim4 --avb2 --vab | ||
| + | ``` | ||
| Gernerate images in this step: | Gernerate images in this step: | ||
| - | * '' | + | * '' |
| + | * '' | ||
| + | **Build Linux Kernel:** | ||
| - | <WRAP important > | ||
| - | * VIM4 compiling Android will not compile the Linux Kernel at the same time as VIM3. | ||
| - | * Replace '' | ||
| - | * Replace '' | ||
| - | * For VIM4, it's '' | ||
| + | ```shell | ||
| + | $ ./mk kvim4 -v 5.4 -jN | ||
| + | ``` | ||
| + | |||
| + | <WRAP important > | ||
| + | Replace '' | ||
| </ | </ | ||
| + | **Build Android:** | ||
| + | |||
| + | ```shell | ||
| + | $ cd PATH_YOUR_PROJECT | ||
| + | $ . build/ | ||
| + | $ lunch kvim4-userdebug | ||
| + | $ make -jN otapackage | ||
| + | ``` | ||
| + | |||
| + | Gernerate images in this step: '' | ||
| + | |||
| + | |||
| + | <WRAP important > | ||
| + | Replace '' | ||
| + | </ | ||
| - | **Made your own compiled script demo:** | + | **Build Script Demo:** |
| - | ```sh | + | ```sh demo.sh |
| $ cat demo.sh | $ cat demo.sh | ||
| #!/bin/bash | #!/bin/bash | ||
| Line 86: | Line 168: | ||
| echo "build Kernel" | echo "build Kernel" | ||
| if [ " | if [ " | ||
| + | . build/ | ||
| + | lunch kvim4-userdebug | ||
| make distclean | make distclean | ||
| fi | fi | ||
| Line 95: | Line 179: | ||
| echo "build Android" | echo "build Android" | ||
| if [ " | if [ " | ||
| + | . build/ | ||
| + | lunch kvim4-userdebug | ||
| make clean | make clean | ||
| fi | fi | ||
| Line 105: | Line 191: | ||
| ``` | ``` | ||
| - | ```sh | + | </ |
| - | # | + | |
| + | **Build | ||
| + | ```shell | ||
| $ ./demo.sh u | $ ./demo.sh u | ||
| + | ``` | ||
| - | # | + | **Build |
| + | |||
| + | ```shell | ||
| $ ./demo.sh k | $ ./demo.sh k | ||
| + | ``` | ||
| - | # | + | **Build |
| + | |||
| + | ```shell | ||
| $ ./demo.sh a | $ ./demo.sh a | ||
| + | ``` | ||
| + | |||
| + | **Build all:** | ||
| - | #build all | + | ```shell |
| $ ./demo.sh n | $ ./demo.sh n | ||
| ``` | ``` | ||