已阅读5页,还剩78页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MTKALPS开发环境配置及编译 Liu Yang Android AndroidAnatomy Android AndroidSourceCode 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的底层的一些库以及守护进程 EnvironmentRequirements OSLinuxUbuntu10 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 X EnvironmentRequirements MakeutilityGNUmake3 81oraboveOtherswine1 1orabovebison2 4 X flex2 5 X gperf3 0 Xmingw32 tobuildwin32executableforemulatoronlinuxhost unix2dos tofrodos tobuildwindowstoolforSDKpackage InstallSoftware RequiredPackages recommendinstallationway InstallSoftware InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware InstallUbuntu InstallSoftware Installbuildrelativepackages1 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 sudochmoda xjdk 6u29 linux x64 bin jdk 6u29 linux x64 bin InstallSoftware ConfigureBuildProfilegedit bashrcAddyouJavafoldertoSystemPathsource bashrc Notnessary itwillalsobesetbymbldenv shwhenmakeMtk InstallSoftware ConfigureBuildProfilegeditmbldenv shthenchangetheJava eabi andpythonpathforyourcomputerTakemineforexample InstallSoftware CheckEnvironmentIfhavingfinishedinstallingyourenvironmenttobuildALPS Youcanusethiscommand makeMtkcheck envtoknowiftheenvironmentisprepared InstallSoftware CheckEnvironmentFromthesceenshotabove weknowmyenvironmentisfailedformylowphysicalmemory SometimeourcomputersmaynotmeetthelowesthardwarerequriementforAPLS Soweneedtocheatinenvironmentcheck geditmediatek build tools checkEnv py InstallSoftware CheckEnvironmentNowtheenvironmentisOK Ofcourse youcanchange checkEnv py forotherfailureifnecessary InstallSoftware BuildanewprojectTaketinnopmt73 gbforExample makeMtklistpYouwillgetalltheprojectsupportedinyoursourcecodeBuildthewholeprojecttinnopmt73 gb makeMtktinnopmt73 gbrNotice Ifyoufailinbuildingandroid trymakeupdate apiinALPSrootdirectory InstallSoftware Buildanewproject InstallSoftware BuildanewprojectYoucanreviewthelogsin out target product ifthereareanyerrors InstallSoftware BuildanewprojectYoucanfindallyouproductimagesinout target product tinnopmt73 gb BuildALPS Weuse makeMtk buildALPSIfyoutype makeMtkor makeMtk h youwillgethowtousethemakeMtk BuildALPS Weuse makeMtk buildALPS BuildALPS Weuse makeMtk buildALPSForexample1 Buildthewholeprojectfortinnopmt73 gb makeMtktinnopmt73 gbr2 BuildtheLinuxKernelfortinnopmt73 gb makeMtktinnopmt73 gbrk makeMtktinnopmt73 gbbootimage3 BuildtheGalley apkfortinnopmt73 gb makeMtktinnopmt73 gbrdrGalleryNotice mkisalinktomakeMtk sowecanusemktoreplacemakeMtk BuildALPS BuildScriptsIntroduction1 makeMtk mbldenv sh mentionedabove setyourbuildenvIfthefollowingfoldersorfilesdonotexsits makeMtkwilldiemediatekmediatek configmediatek build toolsmediatek config project ProjectConfig mkMainlyusethefollowingscriptsmediatek build makemtk mk BuildALPS BuildScriptsIntroduction2 makeMtk mkItexecutesthecommandsentbymakeMtk like custgen rebuild clean andsoon Itwillalsosavethelogsforbuilding Mainlyusesthefollowingscriptsmediatek build Makefiledefinesseveralglobevariablesinthefunctioncodebase pathforusemediatek build custgen mkmostimportantscriptwhichusedbymakeMtk mkfor custgen BuildALPS BuildScriptsIntroduction3 custgen mkcustgen mkisusedtochoosethesourcecodeandconfigforourownproject Mainlyusethefollowingscriptsmediatek build Makefilemediatek build libs gmslmediatek build libs custom mkmediatek build libs config mk Thelastthreescriptsisincludedinmediatek build MakefileThecontentsofcustgen mkisverysimpleincludemediatek build Makefile callcodebase path all mtk config filesmtk custom files echo done mtk config files strip callmtk config generate rules mtk config files mtk custom files strip callmtk custom generate rules mtk custom files BuildALPS BuildScriptsIntroduction3 custgen mkmediatek build libs gmslisanExtendedLibraryforGNUmakeItdefinessomeAPIformakeuseForexampledefinepath split patsubst dir patsubst 1 notdir patsubst 1 endefUsage callpath split kernel imgsensor ov7675 yuv ov7675yuv Sensor c outputiskernel imgsensor ov7675 yuvov7675yuv Sensor cdefinewildcard2 strip if wildcard 1 wildcard 1 wildcard subst subst 1 endef BuildALPS BuildScriptsIntroduction3 custgen mkmediatek build libs custom mkisusedtochoosethecorrectsourcecodeforourprojectdefinemtk custom generate rules if MTK ROOT CUSTOM strip eval custflist eval custfmap eval custfgen foreachd addprefix MTK ROOT CUSTOM MTK CUSTOM FOLDERS eval dirs callwildcard2 if 2 addprefix d 2 d if dirs eval files filter out custflist patsubst d shellfind L dirs name typef foreachf files eval call mtk custom map module f if eval src firstword eval des lastword eval custflist src eval custfmap MTK ROOT CUSTOM OUT des d src BuildALPS BuildScriptsIntroduction3 custgen mk eval TODOpre generatedfilesshouldbeenforceddirectlybyarchitecture if 3 foreachf filter out custflist 3 eval g MTK ROOT CUSTOM OUT patsubst MTK ROOT CUSTOM MTK PROJECT f if filter addprefix MTK ROOT CUSTOM OUT custflist g eval custfgen g eval custflist f eval custfmap g f if callwildcard2 MTK ROOT CUSTOM OUT foreachf filter out custfgen foreachf custfmap word1 subst f shellfind if 2 addprefix MTK ROOT CUSTOM OUT 2 MTK ROOT CUSTOM OUT name oas o name ko o name o name mod c o name gcno o name modules order typef2 dev null eval call mtk custom delete rule 1 f foreachf custfmap eval call mtk custom generate rule 1 word1 subst f word2 subst f word1 subst f endef BuildALPS BuildScriptsIntroduction3 custgen mkTaketinnopmt73 gbforexampleMTK ROOT CUSTOM MTK ROOT custom mediatek customMTK ROOT CUSTOM OUT MTK ROOT CUSTOM out FULL PROJECT mediatek custom out tinnopmt73 gbMTK PLATFORM MT6573 inProjectConfig mkMTK CUSTOM FOLDERS call mtk custom generate folder list define mtk custom generate folder list strip eval mtk project subst subst FULL PROJECT eval flvlist strip subst word2 mtk project eval prjlist call mtk custom split project subst word1 mtk project eval fp list foreachp prjlist foreachf flvlist p f prjlist fp list calllc MTK PLATFORM common endef fp list tinnopmt73 gb calllc MTK PLATFORM common mt6573commonsoMTK CUSTOM FOLDERSistinnopmt73 gbmt6573common addprefix MTK ROOT CUSTOM MTK CUSTOM FOLDERS mediatek custom tinnopmt73 gbmediatek custom mt6573mediatek custom common BuildALPS BuildScriptsIntroduction3 custgen mk patsubst d shellfind L dirs name typef When dirsismediatek custom commonfind L dirs name typefwilllistallthefiles exceptfilesbeginwith undermediatek custom common includesubfolders like mediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Sensor cmediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Sensor hmediatek custom common kernel imgsensor ov7675 yuv ov7675yuv CameraCustomized hmediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Camera Sensor para h Thenweusepatsubsttofilteroutthecustomfoldernames sothefilelistabovewillbechangedto kernel imgsensor ov7675 yuv ov7675yuv Sensor ckernel imgsensor ov7675 yuv ov7675yuv Sensor hkernel imgsensor ov7675 yuv ov7675yuv CameraCustomized hkernel imgsensor ov7675 yuv ov7675yuv Camera Sensor para h BuildALPS BuildScriptsIntroduction3 custgen mkThenwemeetthefollowingfuctiondefine mtk custom map module strip eval custom callpath split 1 eval custom d callpath split firstword custom eval custom f lastword custom eval custom n CUSTOM calluc subst firstword custom d eval custom v lastword custom d if filter custom n custom v 1 firstword custom d custom f if callseq undefined origin custom n 1 1 if filterinc custom v 1 1 if filtersrc custom v 1 firstword custom d custom f endef BuildALPS BuildScriptsIntroduction3 custgen mkForexample wesetthefirstinputparam kernel imgsensor ov7675 yuv ov7675yuv Sensor c custom kernel imgsensor ov7675 yuvov7675yuv Sensor c custom d kernel imgsensorov7675 yuv custom f ov7675yuv Sensor c custom n CUSTOM KERNEL IMGSENSOR custom v ov7675 yuvNowwetrytofindwheretheCUSTOM KERNEL IMGSENSORdefinedbeforegoingonMTK PROJECT CONFIGS callwildcard2 foreachc callreverse addsuffix ProjectConfig mk addprefix config MTK CUSTOM FOLDERS callrelative path c AfterparsingMTK PROJECT CONFIGSismediatek build libs config common ProjectConfig mkmediatek build libs config mt6573 ProjectConfig mkmediatek build libs config tinnopmt73 gb ProjectConfig mk foreachp MTK PROJECT CONFIGS evalexportMTK PROJECT strip shellcat p grep v s sed s s s g BuildALPS BuildScriptsIntroduction3 custgen mk foreachp MTK PROJECT CONFIGS evalexportMTK PROJECT strip shellcat p grep v s sed s s s g When pismediatek build libs config tinnopmt73 gb ProjectConfig mkgrep v s willfilteroutthecontentsafter andsed s s s g willfilteroutthecontentsontherighterof Forexample tempsolutionforcustomfolderCUSTOM HAL IMGSENSOR imx073 mipi rawov7675 yuvCUSTOM KERNEL IMGSENSOR imx073 mipi rawov7675 yuvCUSTOM HAL LENS fm50afdummy lensCUSTOM KERNEL LENS fm50afdummy lensWhenweusethefollowingfilterrule thetextwillturntoCUSTOM HAL IMGSENSORCUSTOM KERNEL IMGSENSORCUSTOM HAL LENSCUSTOM KERNEL LENS BuildALPS BuildScriptsIntroduction3 custgen mkSo shellcat p grep v s sed s s s g willreturnallthevariablesdefinesin pAfterusing export wecangetthevariablesvalueinMakefilesFrommediatek build libs config tinnopmt73 gb ProjectConfig mkWeknowCUSTOM KERNEL IMGSENSOR imx073 mipi rawov7675 yuvNowgobackto mtk custom map module if filter custom n custom v 1 firstword custom d custom f if callseq undefined origin custom n 1 1 if filterinc custom v 1 1 if filtersrc custom v 1 firstword custom d custom f BuildALPS BuildScriptsIntroduction3 custgen mkSo theremaybefivepossibilitiesforallthefilesIfweset 1kernel imgsensor ov7675 yuv ov7675yuv Sensor coutput kernel imgsensor ov7675 yuv ov7675yuv Sensor ckernel imgsensor ov7675yuv Sensor c 1kernel btwlanem btwlanem btwlanem cCOSTOM KERNEL BTWLANEMnotdefined nochangeoutput kernel btwlanem btwlanem btwlanem ckernel btwlanem btwlanem btwlanem c 1kernel imgsensor inc kd imgsensor houtput kernel imgsensor inc kd imgsensor hkernel imgsensor inc kd imgsensor h 1kernel imgsensor src kd sensorlist houtput kernel imgsensor src kd sensorlist hkernel imgsensor kd sensorlist h 1kernel imgsensor ov5642 raw ov5642raw Sensor coutput Null BuildALPS BuildScriptsIntroduction3 custgen mkHaving mtk custom map modulereviewed Wegobacktomtk custom generate rules foreachf files eval call mtk custom map module f if eval src firstword eval des lastword eval custflist src eval custfmap MTK ROOT CUSTOM OUT des d src MTK ROOT CUSTOM OUT MTK ROOT CUSTOM out FULL PROJECT mediatek custom out tinnopmt73 gbif f iskernel imgsensor ov7675 yuv ov7675yuv Sensor c src iskernel imgsensor ov7675 yuv ov7675yuv Sensor c des iskernel imgsensor ov7675yuv Sensor cThenaddkernel imgsensor ov7675 yuv ov7675yuv Sensor cto custflist andmediatek custom out tinnopmt73 gb kernel imgsensor ov7675yuv Sensor c mediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Sensor cto custfmap d ismediatek custom commonhere BuildALPS BuildScriptsIntroduction3 custgen mk foreachf custfmap eval call mtk custom generate rule 1 word1 subst f word2 subst f word1 subst f custfmap istheoutputfilelistwehavejustgenerateddefine mtk custom generate rule 1 2 2 3 echo CUSTOM copy 3 echo to 2 mkdir p dir 2 cp f 3 2 endefWhen f ismediatek custom out tinnopmt73 gb kernel imgsensor ov7675yuv Sensor c mediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Sensor c 2 ismediatek custom out tinnopmt73 gb kernel imgsensor ov7675yuv Sensor c 3 ismediatek custom common kernel imgsensor ov7675 yuv ov7675yuv Sensor c BuildALPS BuildScriptsIntroduction3 custgen mk dir 2 mediatek custom out tinnopmt73 gb kernel imgsensormkdir p dir 2 createtheabovefolder andtheparentfolderifnecessary replaynoerrorevenifthefolderexsits cp f 3 2 copythefiletothe out folder BuildALPS BuildScriptsIntroduction3 custgen mkmediatek build libs config mkisusedtochoosethecorrectconfigsforourprojectdefinemtk config generate rules foreachc MTK AUTOCONFIG LIST call mtk config generate auto rules c if MTK ROOT CONFIG strip eval confflist eval conffmap foreachd addprefix MTK ROOT CONFIG MTK CUSTOM FOLDERS eval dirs d info dirs if dirs eval files filter out confflist patsubst d shellfind L dirs name typef grep v autoconfig ProjectConfig mk foreachf files eval confflist f eval conffmap MTK ROOT CONFIG OUT f d f BuildALPS BuildScriptsIntroduction3 custgen mk if callwildcard2 MTK ROOT CONFIG OUT foreachf filter out MTK ROOT CONFIG OUT ProjectConfig mk callwildcard2 MTK ROOT CONFIG OUT autoconfig foreachf conffmap word1 subst f shellfind if 2 addprefix MTK ROOT CONFIG OUT 2 MTK ROOT CONFIG OUT typef2 dev null eval call mtk config delete rule 1 f foreachf conffmap eval call mtk config generate rule 1 word1 subst f word2 subst f word1 subst f endef BuildALPS BuildScriptsIntroduction3 custgen mk foreachc MTK AUTOCONFIG LIST call mtk config generate auto rules c MTK AUTOCONFIG LIST patsubst callrelative path config common autoconfig callwildcard2 callrelative path config common autoconfig Wemeetthefuctionbelowdefine mtk config generate auto rules evalinclude MTK ROOT CONFIG common autoconfig 1 config mk eval merge order callwildcard2 foreachm merge order foreachp callreverse MTK CUSTOM FOLDERS MTK ROOT CONFIG p autoconfig 1 m eval target file MTK ROOT GEN CONFIG 1 if callseq auto merge config type eval call mtk config generate auto merge rules 1 target file merge order MTK ROOT GEN CONFIG merge command eval addyourownconfigfileparsingrulehere target file endef BuildALPS BuildScriptsIntroduction3 custgen mkWhen 1iskconfig MTK ROOT CONFIG common autoconfig 1 config mkismediatek config common autoconfig kconfig config mk merge order definedintheabove mkmerge order common platform if callseq yes HAVE AEE FEATURE AEE project flavor if callseq user TARGET BUILD VARIANT USER merge orderiscommonplatformAEEprojectflavor merge order ismediatek config mt6573 autoconfig kconfig platformmediatek config common autoconfig kconfig AEEmediatek config tinnopmt73 gb autoconfig kconfig project target file ismediatek config out tinnopmt73 gb autoconfig kconfig BuildALPS BuildScriptsIntroduction3 custgen mkNowwemeetanotherfuctionagaindefine mtk config generate auto merge rules PHONY mediatek configs 1 mediatek configs mediatek configs 1 mediatek configs 1 2 2 PRIVATE FILE LIST 3 2 3 4 echo CONFIG generate 2 cat 3 5 2 endef BuildALPS BuildScriptsIntroduction3 custgen mkUsethevalueswehavegottoreplace PHONY mediatek configs kconfigmediatek configs mediatek configs kconfigmediatek configs kconfig mediatek config out tinnopmt73 gb autoconfig kconfigmediatek config out tinnopmt73 gb autoconfig kconfig PRIVATE FILE LIST mediatek config mt6573 autoconfig kconfig platformmediatek config common autoconfig kconfig AEEmediatek config tinnopmt73 gb autoconfig kconfig projectmediatek config out tinnopmt73 gb autoconfig kconfig mediatek config mt6573 autoconfig kconfig platformmediatek config common autoconfig kconfig AEEmediatek config tinnopmt73 gb autoconfig kconfig project echo CONFIG generatemediatek config out tinnopmt73 gb autoconfig kconfig catmediatek config mt6573 autoconfig kconfig platformmediatek config common autoconfig kconfig AEEmediatek config tinnopmt73 gb autoconfig kconfig project pythonmediatek build tools config merge kconfig py mediatek config out tinnopmt73 gb autoconfig kconfig BuildALPS BuildScriptsIntroduction3 custgen mkNotice IfwewanttochangeaMacroforKernel Remembertheordermon2 platform3 AEE4 project5
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年有研(广东)新材料技术研究院招聘备考题库及完整答案详解1套
- 2026年沁阳市高级中学招聘教师备考题库及完整答案详解一套
- 会议召开与通知发布制度
- 国家药品监督管理局新闻宣传中心2026年度编制外人员公开招聘备考题库完整答案详解
- 2026年湖州市长兴县第三人民医院招聘备考题库附答案详解
- 企业薪酬管理制度
- 2026年连云港市第一人民医院病理科医师招聘备考题库及一套完整答案详解
- 2026年杭州市余杭区人民检察院招聘高层次人员备考题库及一套答案详解
- 2026年沈阳大学和沈阳开放大学面向社会公开招聘急需紧缺事业单位工作人员21人备考题库附答案详解
- 2026年盐城市交通运输局直属事业单位公开选调工作人员备考题库及答案详解一套
- 惠州市惠阳区(2025年)社工岗位考试题目及答案
- 2026年辽宁现代服务职业技术学院单招职业技能笔试参考题库带答案解析
- (2025年)病理学试题及答案
- 贵州省贵阳市普通中学2024-2025学年高二上学期语文期末试卷(含答案)
- 广西医疗机构病历书写规范与治理规定(第三版)
- 2026年浙江省公务员考试《行测》真题(A类)
- 2025年党务干部考试题目及答案
- 海外安保培训核心科目
- 2024-2025学年安徽省合肥市蜀山区七年级上学期期末考试数学试卷
- 统编版 2025-2026学年 语文三年级上册 第六单元 综合过关验收卷 (有答案)
- 九年级语文议论文写作教学设计
评论
0/150
提交评论