(注意要确定安装了jdk)

第一步: cd  lichee; ./build.sh  -p sun5i_elite -k 3.0  (apt-get install uboot-mkimage需要安装mkimage工具)

第二步: cd  android; source build/envsetup.sh

第三步:  root@QinQi:/work/shenbao-new/wifi_DDR128X16_shenbao/android# lunch

You're building on Linux

Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_stingray-userdebug
     5. full_wingray-userdebug
     6. full_crespo4g-userdebug
     7. full_crespo-userdebug
     8. full_maguro-userdebug
     9. full_toro-userdebug
     10. full_tuna-userdebug
     11. apollo_mele-eng
     12. apollo_tvdevb-eng
     13. crane_evb_v12r-eng
     14. crane_evb-eng
     15. crane_m1003h6-eng
     16. elite_evb-eng
     17. elite_nm307_v11-eng
     18. elite_nm307-eng
     19. nuclear_12_evb-eng
     20. nuclear_evb-eng
     21. full_panda-eng

Which would you like? [full-eng] 17

第四步:android# extract-bsp

第五步:make  -j8
1)编译报错
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAdapter.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAllocation.o] Error 1

解决:
修改build/core/combo/HOST_linux-x86.mk61行,将
HOST_GLOBAL_CFLAGS+= -D_FORTIFY_SOURCE=0
修改成
HOST_GLOBAL_CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

2)编译报错
/bin/bash: jar: command not found 
其实就是jar这个命令在系统变量里找不到
解决办法:
cd /usr/bin 
sudo ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/jar
jdk安装目录按自己实际情况更改
如果提示javah:commond not found,于是照葫芦画瓢,输入命令
cd /usr/bin 
ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/javah 
如果提示javah:commond not found,于是照葫芦画瓢,输入命令
cd /usr/bin
ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javah
在编译sdk时,如果提示javadoc:commond not found,
cd /usr/bin
ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javadoc

3)编译报错
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 140.
方法:sudo apt-get install gperf

4)编译报错
vim system/core/init/logo.c 修改

cp   ./device/softwinner/common/hardware/include/drv_display_sun4i.h      bionic/libc/include/

5)编译报错
arm-linux-androideabi-g++: ./frameworks/base/media/CedarX-Projects/CedarX/../CedarAndroidLib/LIB_ICS_/libstagefright_httplive_opt.a: No such file or directory
修改
cp  -rf ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_F23/ ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_

frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable 'ParamName' set but not used [-Werror=unused-but-set-variable 
修改
vi frameworks/compile/slang/Android.mk
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter

6)编译报错
home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1
修改
vi external/llvm/llvm-host-build.mk 添加
LOCAL_LDLIBS := -lpthread -ldl

make: ***  [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
修改:  vim external/gtest/include/gtest/internal/gtest-param-util.h 添加:
#include <cstddef>

make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
修改vim?external/mesa3d/src/glsl/linker.cpp?添加:

#include?<cstddef>

7)编译报错
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
解决办法:
external/oprofile/libpp/format_output.h把:mutable counts_t & counts;
改为:counts_t & counts;

Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.idx
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.version
target Prebuilt:  (out/target/product/generic/system/bin/monkey)
target thumb C++: gatord <= system/core/gator-daemon/ConfigurationXML.cpp
target thumb C++: gatord <= system/core/gator-daemon/StreamlineSetup.cpp
target Executable: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/LINKED/gatord)
target Symbolic: gatord (out/target/product/generic/symbols/system/bin/gatord)
target Strip: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/gatord)
target thumb C++: camera. <= device/softwinner/common/hardware/camera/PreviewWindow.cpp
device/softwinner/common/hardware/camera/PreviewWindow.cpp:32:31: error: drv_display_sun5i.h: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/camera._intermediates/PreviewWindow.o] Error 1
root@ubuntu:/home/yanfa/workspace/Android/android_sdk/shenbao-new/wifi_DDR128X16_shenbao/android#
修改:
vim device/softwinner/common/hardware/camera/Android.mk

LOCAL_C_INCLUDES +=                                 \
38     external/jpeg                                   \
39     external/skia/include/core/                     \
40     frameworks/base/core/jni/android/graphics       \
41     frameworks/base/include/media/stagefright/openmax \
42     $(TOP)/frameworks/base/media/CedarX-Projects/CedarX/include/include_camera \
43     hardware/libhardware/include/hardware \
44     external/neven/FaceRecEm/common/src/b_FDSDK     \
45     device/softwinner/common/hardware/include      \ #add
46     $(TARGET_HARDWARE_INCLUDE)

v4l2_pix_size

8)

第六步:pack

android编译遇到问题修改的更多相关文章

  1. react-native android/ios 根据配置文件编译时自动修改版本号

    开发react-native时大都有过这个操作,当版本迭代时候要修改app版本号时,一般都这样做 Android: 的要修改build.gradle文件的versionName ios: 打开xcod ...

  2. 【Android】MTK Android 编译命令

    命令格式:./maketek [option] [project] [action] [modules] Option: -t ,-tee :输出log信息到当前终端 -o , -opt=-- : 编 ...

  3. Android——编译release版签名系统

    http://blog.csdn.net/jscese/article/details/24243171 在我的第一篇博客里面http://blog.csdn.net/jscese/article/d ...

  4. 转: 加快Android编译速度

    转: http://timeszoro.xyz/2015/11/25/%E5%8A%A0%E5%BF%ABandroid%E7%BC%96%E8%AF%91%E9%80%9F%E5%BA%A6/ 加快 ...

  5. android编译openssl静态库.a

    github上有一个开源项目,已经为你编译openssl建好了工程. 地址:https://github.com/aluvalasuman/OpenSSL1.0.1cForAndroid 选择需要的版 ...

  6. [Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程

    本文转载自:[Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6. ...

  7. Android编译环境配置

    Android编译环境配置 网上关于Android编译环境配置的整理资料有不少,经整理亲测后,希望能给需要的亲们提供帮助. 主要分为四步: 1.安装JDK(Java Standard Edition ...

  8. 将linux和uboot集成到Android编译框架中

    span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }.CodeMirror ...

  9. 为 Android 编译并集成 FFmpeg 的尝试与踩坑

    前言与环境说明 随着 FFmpeg.NDK 与 Android Studio 的不断迭代,本文可能也会像我参考过的过期文章一样失效(很遗憾),但希望本文中提到的问题排查以及步骤说明能够帮到你,如果发现 ...

随机推荐

  1. vc调试大全

    一.调试基础 调试快捷键 F5:  开始调试 Shift+F5: 停止调试 F10:   调试到下一句,这里是单步跟踪 F11:   调试到下一句,跟进函数内部 Shift+F11:  从当前函数中跳 ...

  2. Jmeter下载安装配置

    一,进入官网:http://jmeter.apache.org/ 1.第一步进入官网如下图 2.选择进行下载,下载下来为一个压缩包,解压即可. 3.我下载的是jmeter4.0版本,对应jdk1.8. ...

  3. x86保护模式 控制寄存器和系统地址寄存器

    控制寄存器和系统地址寄存器 控制寄存器    crx cr0   指示cpu工作方式的控制位  包含启用和禁止分页管理机制的控制位  包含控制浮点协处理器操作的控制位   注意必须为0的位 cr2和c ...

  4. zoj 2679 Old Bill

    Old Bill Time Limit: 2 Seconds      Memory Limit: 65536 KB Among grandfather��s papers a bill was fo ...

  5. 【Luogu】P3800点收集(DP)

    题目链接 原题解 代码 #include<iostream> #include<cstdio> #include<cstring> #include<ccty ...

  6. Office 中的各种小tips(更新中)

    1.Word 中打字输入会擦掉之后原有字符,出现“吃字”的情况? 要将“改写”切换为“插入”,最简单的方法就是点击键盘上小键盘旁边的“insert”键. 其实仔细观察的话,在word文档下方,会看到如 ...

  7. stm32的IIc总线--超声波测距

  8. http状态码的分类

    状态码分类 转自http://www.cnblogs.com/TankXiao/archive/2013/01/08/2818542.html HTTP状态码被分为五大类, 目前我们使用的HTTP协议 ...

  9. 第1章 SpringBoot 简介

    一.什么是Spring Boot Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而使开发 ...

  10. Spring 详解(二)------- AOP关键概念以及两种实现方式

    目录 1. AOP 关键词 2. AOP 的作用 3. AOP 的通知类型 4. 基于 xml 的配置方式 5. 基于注解的配置方式 6. 切面的优先级 7. 重用切点表达式 8. 两种方式的比较(摘 ...