【A40i-Android7.1】---A40i 编译流程 和 打包成固件

一、编译lichee

1、给予build.sh权限

chmod 777 build.sh

2、配置主板型号

./build.sh config

配置选项

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、编译lichee

./build.sh

二、编译android

1、配置编译环境

source build/envsetup.sh

2、编译选项

lunch a40-p1 

选择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、拷贝文件

将bsp和输出文件复制到编译安卓源码的输出目录

extract-bsp

在这里会报错,解决方法

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、编译

-j 是启动多少条线程来编译,根据自己的cpu选择

make -j64

三、打包成固件

1、打包

pack

打包这里会报错

ERROR: build lichee before you pack

解决方法

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

猜你喜欢

转载自blog.csdn.net/weixin_44205779/article/details/108236614