【A40i-Android7.1】---A40i compile process and package into firmware

One, compile lichee

1. Give build.sh permission

chmod 777 build.sh

2. Configure the motherboard model

./build.sh config

Configuration options

Welcome to mkscript setup progress
All available chips:
   0. sun8iw11p1
Choice: 0
All available platforms:
   0. android
   1. androidm
   2. dragonboard
   3. linux
   4. camdroid
Choice: 0
All available kernel:
   0. linux-3.10
Choice: 0
All available boards:
   0. a40-p1
   1. t3-mp1
   2. t3-mp3
   3. t3-p1
   4. t3-p2
   5. t3-p3
Choice: 0

3. Compile lichee

./build.sh

Two, compile android

1. Configure the compilation environment

source build/envsetup.sh

2. Compilation options

lunch a40-p1 

Choice 24

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_arm64-eng
     3. aosp_mips-eng
     4. aosp_mips64-eng
     5. aosp_x86-eng
     6. aosp_x86_64-eng
     7. full_fugu-userdebug
     8. aosp_fugu-userdebug
     9. mini_emulator_arm64-userdebug
     10. m_e_arm-userdebug
     11. m_e_mips64-eng
     12. m_e_mips-userdebug
     13. mini_emulator_x86_64-userdebug
     14. mini_emulator_x86-userdebug
     15. aosp_dragon-userdebug
     16. aosp_dragon-eng
     17. aosp_marlin-userdebug
     18. aosp_sailfish-userdebug
     19. aosp_flounder-userdebug
     20. aosp_angler-userdebug
     21. aosp_bullhead-userdebug
     22. hikey-userdebug
     23. aosp_shamu-userdebug
     24. a40_p1-eng
     25. a40_p1-user
     26. t3_p3-eng
     27. t3_p3-user

3. Copy files

Copy the bsp and output files to the output directory of the compiled Android source code

extract-bsp

An error will be reported here, the solution

diff --git a/android/device/softwinner/common/vendorsetup.sh b/android/device/softwinner/common/vendorsetup.sh
index a3be43d..b825fce 100644
--- a/android/device/softwinner/common/vendorsetup.sh
+++ b/android/device/softwinner/common/vendorsetup.sh
@@ -65,7 +65,7 @@ function get_lichee_out_dir()
         LINUXOUT_DIR=$LICHEE_DIR/out/sun8iw11p1/androidm/common
     fi
     if [ "$TARGET_BOARD_PLATFORM" == "a40" ]; then
-        LINUXOUT_DIR=$LICHEE_DIR/out/sun8iw11p1/androidm/common
+        LINUXOUT_DIR=$LICHEE_DIR/out/sun8iw11p1/android/common
     fi
     LINUXOUT_MODULE_DIR=$LINUXOUT_DIR/lib/modules/*/*
 }

4. Compile

-j is how many threads to start to compile, choose according to your own cpu

make -j64

Three, package into firmware

1. Packing

pack

Packing here will report an error

ERROR: build lichee before you pack

Solution

diff --git a/android/device/softwinner/a40-p1/package.sh b/android/device/softwinner/a40-p1/package.sh
index 6ad9395..60c8c34 100644
--- a/android/device/softwinner/a40-p1/package.sh
+++ b/android/device/softwinner/a40-p1/package.sh
@@ -3,7 +3,7 @@
 cd $PACKAGE

 chip=sun8iw11p1
-platform=androidm
+platform=android
 board=a40-p1
 debug=uart0
 sigmode=none

Guess you like

Origin blog.csdn.net/weixin_44205779/article/details/108236614