[Android6.0] [MTK6737] MTK 컴파일 환경 구축
컴파일 환경 설치 및 컴파일
컴파일 환경 종속 패키지 설치
2>ubuntu < 12.04
sudo apt-get install git-core gnupg flex bison ccache gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev gcc-4.4 g++-4.4 g++-4.4-multilib g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc wine
3>ubuntu = 14.04
sudo apt-get install git-core gnupg flex bison ccache gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev g++-multilib g++-4.8-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libc6-dev-i386 lib32z1 lib32ncurses5 lib32bz2-1.0 lib32readline-gplv2-dev wine
설치 문제 없음
ubuntu = 16.04
sudo apt-get install git-core gnupg flex bison ccache gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev g++-multilib g++-4.8-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libc6-dev-i386 lib32z1 lib32ncurses5 lib32bz2-1.0 lib32readline-gplv2-dev wine
오류: libwxgtk2.8-dev mingw32 lib32bz2-1.0 lib32readline-gplv2-dev
Ubuntu 16.04 libwxgtk2.8-dev이libwxgtk3으로 업그레이드되었습니다.0-dev; lib32bz2-1.0이libbz2-1.0:i386로 업그레이드되었습니다.lib32readline-gplv2-dev가lib32readline6-dev로 업그레이드되었습니다.그래서:
sudo apt install libwxgtk3.0-dev lib32readline6-dev libbz2-1.0:i386
mingw32는
sudo vi /etc/apt/sources.list
에 소스를 추가해야 합니다.deb http://us.archive.ubuntu.com/ubuntu trusty main universe
다음
sudo apt update
sudo apt install mingw32
bootloader와kernel 컴파일
전체 컴파일링:
cd runyee/scripts/
./auto.sh IoT_bd6737m_35g_b_m0_ry_smt_hd720_pcb_v1 v00 eng
지금까지 저희 모듈 lunch의bd6737m 를 알게 되었습니다.35g_b_이 프로젝트
모듈 컴파일링: 우선 getbuild_var 프로젝트 이름 가져오기:
get_build_var TARGET_DEVICE
op_project_name
get_build_var TARGET_BUILD_VARIANT
eng
모듈을 나누어 컴파일할 때preloader:1로 전송할 수 있습니다.단독 컴파일
make -j4 pl 2>&1 | tee pl_build.log
생성
bootable/bootloader/preloader/bin
cd bootable/bootloader/preloader
TARGET_PRODUCT=$op_project_name ./build.sh 2>&1 | tee preloader_build.log
lk:
make -j4 lk 2>&1 | tee lk_build.log
생성
bootable/bootloader/lk/build-xx
Kernel: 1. 단독 컴파일cd kernel-3.18
mkdir out
make -j4 O=out 2>&1 | tee kernel_build.log
kernel-3.18/out/arch/arm64/boot/Image가 생성됩니다.gz-dtb
make -j8 n k && make -j8 r bootimage
clean:
# Clean ALL
make clean
# Clean PL
make clean-pl
# Clean lk
make clean-lk
# Clean kernel
make clean-kernel
Android 컴파일
# 1.
source build/envsetup.sh
# 2.
lunch full_bd6737m_35g_b_m0-eng
# 3. MTK
source mbldev.sh
# 4.
make -j4 2 > &1 | tee mtk_build.log
포장하다
# pack boot image
make -j4 bootimage
# pack system image
make -j4 systemimage
# pack system image system image
# ( , build snod )
make -j4 snod
# pack ota image
make -j4 otapackage
하드웨어 매개 변수
https://versus.com/en/mediatek-mt6735-vs-mediatek-mt6737
MTK6737
4 x 1.3GHz 28nm LTE supported GPU: MailT720
Check SDK Version
vi build/core/version_defaults.mk
PLATFORM_VERSION := 6.0
PLATFORM_SDK_VERSION := 23 #Android6.0
vi kernel/Makefile
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 19
컴파일링 중 부딪힌 문제
질문
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj/lib/libart.so' f
ailed
make: *** [out/host/linux-x86/obj/lib/libart.so] Error 1
해결 방법: 코드
art/build/Android.common_build.mk
# By default, host builds use clang for better warnings.
-- ART_HOST_CLANG := true
++ ART_HOST_CLANG := false
STATIC_LIBRARIES SHARED_LIBRARIES 타입의 질문입니다.
예를 들면 밑에 이런 거.
make: *** No rule to make target 'out/target/product/bd6737m_35g_b_m0/obj/STATIC_LIBRARIES/libcam.halmemory_intermediates/export_includes', needed by 'out/target/product/bd6737m_35g_b_m0/obj/SHARED_LIBRARIES/libcam_platform_intermediates/import_includes'。 。
make: *** ....
target thumb C++: libcam.device3.base <= vendor/mediatek/proprietary/hardware/mtkcam/legacy/v3/device/Cam3DeviceFactory.cpp
make: *** No rule to make target 'out/target/product/bd6737m_35g_b_m0/obj/STATIC_LIBRARIES/libcam.halmemory_intermediates/export_includes', needed by 'out/target/product/bd6737m_35g_b_m0/obj/SHARED_LIBRARIES/libcam_platform_intermediates/import_includes'。 。
make: *** ....
target StaticLib: libcam.device3.base (out/target/product/bd6737m_35g_b_m0/obj/STATIC_LIBRARIES/libcam.device3.base_intermediates/libcam.device3.base.a)
컴파일 환경 의존 패키지 설치를 참고하여 필요한 패키지 설치
소록하다
Linux의 굽기 도구는 SPFlash_Tool_v5.1644_Linux.zip 사용 방법:http://spflashtools.com/linux/sp-flash-tool-v5-1644-linux