您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 公司方案 > MTKALPS开发环境配置及编译
MTKALPS开发环境配置及编译Liu.YangAndroidAndroidAnatomyAndroidAndroidSourceCode|--Makefile(全局的Makefile,make总入口)|--bionic(一些基础的库的源代码)|--bootloader(引导加载器)|--build(是编译和配置所需要的脚本和工具)|--cts(cts测试源码)|--dalvik(JAVA虚拟机有关的代码)|--development(程序开发所需要的模板和工具)|--external(目标机器使用的一些库)|--frameworks(应用程序的框架层)|--hardware(与硬件相关的库,供framework调用)|--kernel(Linux内核源代码)|--mediatek(MTK平台相关代码)|--packages(Android的各种应用程序)|--prebuilt(Android在各种平台下编译的预置脚本)|--recovery(与目标的恢复功能相关)|--system(Android的底层的一些库以及守护进程)EnvironmentRequirementsOSLinuxUbuntu10.04(LTS,longtermsupportversion)64bitMemory&DiskSpace2+Gphysicalmemory(Avoid“JVMrunoutofmemory”&Speedupbuildperformance)10+Gormorediskspaceisneeded(tobuildAndroidtree)Compilationtoolchainarm-eabi-4.4.3(cangetfromreleasedSWpackage,prebuilt/linux-x86/toolchain/arm-eabi-4.4.3)gcc4.4.3JDK1.6Perl,PythoninterpreterPerl5.10.XPython2.6.XEnvironmentRequirementsMakeutilityGNUmake3.81oraboveOtherswine1.1orabovebison2.4.X,flex2.5.X,gperf3.0.Xmingw32(tobuildwin32executableforemulatoronlinuxhost)unix2dos/tofrodos(tobuildwindowstoolforSDKpackage)InstallSoftwareRequiredPackages&recommendinstallationwayInstallSoftwareInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallUbuntuInstallSoftwareInstallbuildrelativepackages1.Usethefollowingcommandtogetthesepackagestoinstallsudoapt-getinstallflexbisongperfbuild-essentialcurlzlib1g-devg++-multilibg++-4.4-multiliblibc6-dev-i386lib32ncurses5-devia32-libsx11proto-core-devlibx11-devlib32readline5-devlib32z1-devwinemingw32tofrodos2.Changedefaultshsoftlinktobashsudorm/bin/shsudoln-s/bin/bash/bin/sh3.InstallJDK1.6(recommendedinstallationway)ConfigureBuildProfilegedit~/.bashrcAddyouJavafoldertoSystemPathsource~/.bashrc(Notnessary,itwillalsobesetbymbldenv.shwhenmakeMtk)InstallSoftwareConfigureBuildProfilegeditmbldenv.shthenchangetheJava,eabi,andpythonpathforyourcomputerTakemineforexample:InstallSoftwareCheckEnvironmentIfhavingfinishedinstallingyourenvironmenttobuildALPS,Youcanusethiscommand./makeMtkcheck-envtoknowiftheenvironmentispreparedInstallSoftwareCheckEnvironmentFromthesceenshotabove,weknowmyenvironmentisfailedformylowphysicalmemory.SometimeourcomputersmaynotmeetthelowesthardwarerequriementforAPLS,Soweneedtocheatinenvironmentcheck.geditmediatek/build/tools/checkEnv.pyInstallSoftwareCheckEnvironmentNowtheenvironmentisOK,Ofcourse,youcanchange“checkEnv.py”forotherfailureifnecessary.InstallSoftwareBuildanewprojectTaketinnopmt73_gbforExample./makeMtklistpYouwillgetalltheprojectsupportedinyoursourcecodeBuildthewholeprojecttinnopmt73_gb./makeMtktinnopmt73_gbrNotice:Ifyoufailinbuildingandroid,trymakeupdate-apiinALPSrootdirectoryInstallSoftwareBuildanewprojectInstallSoftwareBuildanewprojectYoucanreviewthelogsin/out/target/product,ifthereareanyerrors.InstallSoftwareBuildanewprojectYoucanfindallyouproductimagesinout/target/product/tinnopmt73_gbBuildALPSWeuse“makeMtk”buildALPSIfyoutype./makeMtkor./makeMtk–h,youwillgethowtousethemakeMtkBuildALPSWeuse“makeMtk”buildALPSBuildALPSWeuse“makeMtk”buildALPSForexample1.Buildthewholeprojectfortinnopmt73_gb./makeMtktinnopmt73_gbr2.BuildtheLinuxKernelfortinnopmt73_gb./makeMtktinnopmt73_gbrk./makeMtktinnopmt73_gbbootimage3.BuildtheGalley.apkfortinnopmt73_gb./makeMtktinnopmt73_gbrdrGalleryNotice:mkisalinktomakeMtk,sowecanusemktoreplacemakeMtkBuildALPSBuildScriptsIntroduction1)makeMtk./mbldenv.sh#mentionedabove,setyourbuildenvIfthefollowingfoldersorfilesdonotexsits,makeMtkwilldiemediatekmediatek/configmediatek/build/toolsmediatek/config/${project}/ProjectConfig.mkMainlyusethefollowingscriptsmediatek/build/makemtk.mkBuildALPSBuildScriptsIntroduction2)makeMtk.mkItexecutesthecommandsentbymakeMtk,like“custgen”,“rebuild”,“clean”andsoon.Itwillalsosavethelogsforbuilding.Mainlyusesthefollowingscriptsmediatek/build/Makefiledefinesseveralglobevariablesinthefunctioncodebase-pathforusemediatek/build/custgen.mkmostimportantscriptwhichusedbymakeMtk.mkfor“custgen
本文标题:MTKALPS开发环境配置及编译
链接地址:https://www.777doc.com/doc-904871 .html