SreadrumAndroid-文件编译流程V_第1页
SreadrumAndroid-文件编译流程V_第2页
SreadrumAndroid-文件编译流程V_第3页
SreadrumAndroid-文件编译流程V_第4页
SreadrumAndroid-文件编译流程V_第5页
已阅读5页,还剩48页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

.1TDDivSpreadtrumAndroid------文件编译流程v1.0.0上海·北京·深圳·圣迭戈·韩国·印度课程名称:SpreadtrumAndroid文件编译流程

课程类别:通用课程课程目标:1,了解8810G的源代码结构。2,了解8810G的U-boot,Kernel,Android的编译过程。主要内容./mk./build.shmakeDownloadFilesUboot,kernelandAndroidDownloadFilesFDLBootloaderLogovmMODEMAndroidfdl1.binfdl2.binu-boot-spl-16k.binu-boot.binLogo.bmpVmjaluna.imgModem.binDSP.binNvitem.binBoot.imgSystem.imgUserdata.img1,FDL1:初始化SDRAM,与PC通信下载FDL2到SDRAM,并运行FDL2。2,FDL2:初始化NAND控制器,与PC通信下载其他Image到NANDflash。[客户可自行编译,一般情况下无需改变]3,u-boot-spl-16k.bin:第一级bootloader,在IRAM执行,初始化CPU,SDRAM等,引导UBOOT分区到SDRAM中。[客户可自行编译,一般情况下无需改变]4,u-boot.bin:真正的bootloader,初始化部分设备,负责将虚拟机,ThreadX分区,Linux分区从NAND注入SDRAM。[客户可自行编译,关注LCD,Key以及其它的一些改变]5,vmjaluna.img:虚拟机执行代码。管理和调度两个OS。6,Modem.bin:ThreadX执行代码,Modem通信协议的实现。7,DSP_DM_G2.bin:Modem的DSP代码实现。8,nvitem.bin:FixedNV数据,射频,网络等信息。[客户可使用Nveditor工具生成bin,主要关注RF数据的变化]------要注意不同射频器件对应的不同的DSP和Nvitem文件。9,boot.img:Cmdline+LinuxKernel+Ramdisk。[客户可自行编译,关注外设驱动的变化]10,System.img:Android代码。[客户可自行编译,关注装载驱动模块,HAL,frameworks,Application的变化]11,Userdata.img:Android数据。[客户可自行编译,关注初始数据]代码架构—IDH压缩包Base:主文件包,包括u-boot[FDL2,SPL,uboot],kernel[boot.img]和Android[system.img,userdata.img]Csr:含有csr的BT,GPS,WIFI的code,解压缩后复制到3rdparty对应目录。Inno:含有inno的CMMB的code,解压缩后复制到3rdparty对应目录。代码架构—base包结构apuser@xqianubt:~/source/8810$catmk#!/usr/bin/perl–wrequire"customize/perl/main.pl";代码架构—csr和inno包结构customize代码架构customize代码架构3rdparty代码架构DriversApplicationsToolsUbootbuildscriptmk的使用Options:-o,-opt=arguement:Passargumentstomake.-h,-help :Printthismessageandexit.-lp,-listp:Listallavailableprojects.-ck,-chk-env :checkbuildenvironment.Projects:oneofavailableprojects.Actions:n,new:Cleanandcompile.c,clean:Cleantheobjects.u,update:Re-compiletarget.pac,packet :packetdedicatedfolderpb,prebuild :Gensomefilesforcustomization.ig,idhgen:Genidhcodereleasepackage(usedinternally)igb,idhgenb :Genidhlibreleasepackage(usedinternally)ua,update-api :Theupdate-apiprocess.mc,menuconfig :makemenuconfigModules:ub,uboot:Buildforuboot.k,kernel,bootimage :Buildforkernel.adr,android :Buildforandroid.adr<modulename> :Buildforandroidmoduleuserdata:Buildforuserdataimg.ramdisk:Buildforramdiskrecovery:Buildforrecoveryimage.userdata:packetuserdatafoldersystem :packetsystemfolderExample:(1)Cleanandcompile.:./mksp8810gan(2)Re-compiletarget:./mksp8810gau(3)Cleantheobjects:./mksp8810gac(4)Buildkenrel:./mksp8810gauk(5)Builduboot:./mksp8810gauub(6)Buildkenrelanduboot:./mksp8800gaukub(7)Checkbuildingenvironmet:./mk-ck(8)Listallavailableprojects:./mk-lp(9)Updateapi:./mksp8810gaua(10)PreBuild:./mksp8810gapb(11)Buildramdiskimg:./mksp8810gauramdisk(12)Buildrecoveryimg:./mksp8810gaurecovery(13)Packetsystemimg:./mksp8810gapacsystem(14)Packetuserdataimg:./mksp8810gapacuserdata(15)Makemenuconfig:./mksp8810gamc(16)generateidhlib(onlyforinternaluse):./mksp8810gaigb(17)Buildunderusrmode(defaultengmode):./mk-o=usrsp8810gan(18)Buildaunder1simmode:./mk-o=1simsp8810gan(19)Buildunderusr&1simmode:./mk-o=usr:1simsp8810gan(20)Aftercompilenotcleanlinkfiles(defaultclean):./mk-o=nscsp8810gan(21)Buildandroidmoduleunderpathxxx/xxx:./mksp8810gauadrxxx/xxx(22)Buildkernelkounderpath3rdparty/xxx:./mksp8810gauko3rdparty/xxx(23)Cleankoobjs:./mksp8810gacko3rdparty/xxxperl下各个文件的的作用1.chenv.pl:用来检查客户户编译环境。。2.cleanall.pl:用来恢复至客客户编译前环环境。3.filebk.pl:用来在客户化化代码生成过过程中备份必必要文件。4.fileR.pl:用来在cleanall时恢复备份文文件。5.linksp.pl:用来在3rdparty文件夹下相应应模块和Customize文件夹下相应应模块建立链链接。后续在3rdparty完成历史使命命后,此文件件也就失去作作用。6.listP.pl:用来列出所有有在customize/make文件夹下客户户工程。7.main.pl:用来对客户输输入编译命令令行解析。8.mk:此文件同时也也会存在与客客户工程根目目录下,是所所有编译动作作的最初调用用脚本。9.prebuild.pl:此文件会根据据customize/make中客户化配置置文件在kernel/frameworks等目录下产生生客户化配置置代码,同时时也会自动修修改或生成相相对应MAKEFILE。10.route.pl:用来对route.mk进行解析。与与route.mk同目录的文件件会按照解析析出的文件路路径链接至目标标文件夹。11.record.pl:记录CLEAN动作时需要删删除的文件夹夹和链接。12.kcfg.pl:此文件用来控控制kernel客户化配置文文件生成。13.appcfg.pl:此文件用来来控制app客户化配置文文件生成。14.ckcollision.pl:检查文件是是否冲突,,如果有生生成冲突文文件列表((冲突场景景:不同路路径下同一一文件链接接至同一目目标文件))15.sprd.pm:各脚本通通用函数数列表。。./mksp8810ganew流程1Customize/perl/mail.pl1,parsecustomerinput取得输入入参数项项目$project=lc($ARGV[0]);[即sp8810ga],和$action=lc($ARGV[0]);[即n],@input_module=@ARGV;2,parsecustomerconfiguremakefile解析用户户配置文文件customize/make/sp8810ga.mak#SPRDBuildSystemBUILD_SPRD_PLATFORM=sc8810BUILD_KERNE_MACHINE=CONFIG_MACH_SP8810BUILD_KERNEL_VERSION=kernelBUILD_UBOOT_VERSION=u-boot#Customizeforcustomerdriver(configuredaccordingtoyourneed)3RDPARTY_BLUETOOTH=BC68883RDPARTY_CAMERA=ov5640:ov2655:ov7675:ov2640:gc0309:nmi6013RDPARTY_LCD=hx83693RDPARTY_GSENSOR=lis3dh3RDPARTY_MSENSOR=akm89753RDPARTY_LSENSOR=AL30063RDPARTY_GPS=gsd4t3RDPARTY_TP=PIXCIR3RDPARTY_WIFI=UNIFI60303RDPARTY_FM=kt0812G3RDPARTY_APP=app88103RDPARTY_ANIM=poweranim#SPRDCOMMONMODULE(dedicated!!!.shouldnotchange)3RDPARTY_TOOLS=iperf-2.0.4:wireless_tools.29:tools-binary:testjar3RDPARTY_HEADSET=headset-soc3RDPARTY_AUDIO=snd_dummy_alsa_audio3RDPARTY_MEDIASERVER=mediaserver_listener3RDPARTY_FIREWALL=yeezone3RDPARTY_UBOOT=uboot3RDPARTY_CMMB=IF2383RDPARTY_CMCC=CMCC3RDPARTY_GPU=mali#SPRDAPPFEATURCONTROL(configuredaccordingtoyourneed)#SPRD_APP_USE_TASKMANAGER=noframeworks/base/core/java/android/util/SprdFeatureUtils.javaframeworks/base/include/utils/SprdFeatureUtils.h./mksp8810ganew流程2Customize/perl/mail.pl3,verifythevalidityofcustomerinputactionthenconveycustomerinputactiontostandardaction验证输入动作作并转换为标标准动作@acts=split(",",$action);$result=&act_convey(\@acts,\@cust_act);($uAct="new")if($uActeq"n");4,verifythevalidityofcustomerinputmodule验证输入模块块($uMod="uboot")if($uModeq"ub");($uMod="bootimage")if(($uModeq"k")or($uModeq"kernel"));($uMod="android")if($uModeq"adr");5,generatemake.ini获得make.ini,如果是action=new的话创建make.ini然后read。gen_makeini(\@acts);创建建的的make.ini文件件内内容容::project=sp8810gamode=sim=6,precompileconditionprepare编译译前前条条件件准准备备,生成成mOpts数组组,,若是是new则rm-rf$build_folderpush(@mOpts,"ENABLE_LOG=$log");push(@mOpts,"PROJECT=$project");push(@mOpts,"ROOTDIR=$enterdir");push(@mOpts,"CUR_SIM=$sim");push(@mOpts,"CUR_MODE=$mode");push(@mOpts,"KERNEL_VER=$kernel_ver");push(@mOpts,"UBOOT_VER=$uboot_ver");push(@mOpts,"IDH_PARAM=$idhparam");./mksp8810ganew流程程3Customize/perl/mail.pl7,callmakefilecompileaccordingtocustomerinput$cmdArg=““CMD_ARGU=\””@mOpts\““””;//cmdArg复制制了了一一份份mOpts$makeCmd="make-fcustomize/make/makefile.sprd$cmdArg@mOpts““;&system_call(““touch$logdir/${project}_prebuild.log””);//建立立out/target/product/sp8810ga/log/sp8810ga_prebuild.log&system_call("perlcustomize/perl/prebuild.plcustomize/make/${project}.mak2>&1|tee$logdir/${project}_prebuild.log");&system_call("$makeCmdprebuildCUR_ACTION=prebuild");&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_new.log&system_call("$makeCmd${uAct}CUR_ACTION=${uAct}");&system_call("perlcustomize/perl/cleanall.pl$project$platform");分解::A.perlcustomize/perl/prebuild.plcustomize/make/sp8810ga.mak调用prebuild.pl,执行行18步动作作:step[1]:Judgesomeerrorconditionsstep[2]:parsecustomize/make/rules.makstep[3]:accordingtocustomize/make/sp8810ga.makgeneratehashtablestep[4]:cleansoftlinkandhardlink,recoverallthebackupfilestonativefolder,deletebackupfolderstep[5]:generatecustomerappfeaturecontrolfilesstep[6]:generatecustomerkernelcfgfilesstep[7]:autosynccustomizemoduleswith3rdpartymodulesstep[8]:judgewhetherkernelcfgsrcfolderanddstfolderareexiststep[9]:generatesoftlinkbetweencustomer_cfgkernelfolderandkernelcfgfolderstep[10]:generatekernelcfgtopfoldermakefilesstep[11]:generatekernelcfgsubfoldermakefilesstep[12]:generatesoftlinkbetween3rdpartymodulekernelfolderandkerneldriverfolderstep[13]:generatesoftlinkbetweencustomercfghalfilesanddsthalfilesstep[14]:generatehal/framework/specailsoftlinkandmakefilegeneratesoftlinkbetweenhal/hardware/frameworksrcfolderanddstfolderstep[15]:generateubootsoftlinkandmakefilestep[16]:generateengineeringsoftlinkandmakefilestep[17]:generatespecialmodulesoftlinkandchipliststep[18]:generatedummyAndroid.mk./mksp8810ganew流程4B.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=prebuildCUR_ACTION=prebuild调用makefile.sprd中prebuild:($(BUILD_MODE)./ducts.shsp8810gaprebuild$(DEAL_STDOUT_ACTION))即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810gaprebuild$(DEAL_STDOUT_ACTION))[prebuild[dirname]--编译android工程时脚本本会将第3方chip的修改动态态patch到android工程中]./ducts.shsp8810gaprebuildandroid_3rdparty_kernel_build:BuildkernelImage/zImageandkernelmodulesfirst,C.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=newCUR_ACTION=new调用makefile.sprd中new:($(BUILD_MODE)./ducts.sh$(PROJECT)$(SIM_OPT)fprebuild)$(DEAL_STDOUT_ACTION)即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810ga$(SIM_OPT)fprebuild$(DEAL_STDOUT_ACTION))[fprebuild--快速build需要的前提提配置自动动设置,同时完成一一次彻底编编译(建议使用)]./ducts.shsp8810gafprebuildandroid_3rdparty_kernel_build:BuildkernelImage/zImageandkernelmodulessecond,sprd_build_3rdparty_all_chips:buildu-bootandothers3rdpartyko,sprd_3rdparty_make_android:makeupdate-api,makePRODUCT-sprdroid_base-eng-j1D.perlcustomize/perl/cleanall.plsp8810gasc8810调用cleanall.pl,主要动作作包含:eraseallcustomize/customer_drvspecialmodulerelatedsoftlinkfilesrecoverallthebackupfileseraseallprojectrelateddirincludesubdirandfiles./mksp8810gaclean流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput$cmdArg=“CMD_ARGU=\”@mOpts\“”;//cmdArg复制了一份份mOpts$makeCmd="make-fcustomize/make/makefile.sprd$cmdArg@mOpts“;&system_call("$makeCmd${uAct}CUR_ACTION=${uAct}");&system_call(“perlcustomize/perl/cleanall.pl$project$platform”);//同new中内容&system_call("rm-rf$build_folder");分解:A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=cleanCUR_ACTION=clean调用makefile.sprd中clean:$(BUILD_MODE)./ducts.sh$(PROJECT)clean即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810gaclean[clean--清除第3方对android的所有修修改,恢复到原原始的android版本,可以认为为是unpatch.]B.rm-rf$build_folderrm-rfout/target/product/sp8810ga,此目录仅仅含一些些logClean后不带参参数。./mksp8810gaprebuild流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_prebuild.log");//建立out/target/product/sp8810ga/log/sp8810ga_prebuild.log&system_call("perlcustomize/perl/prebuild.plcustomize/make/${project}.mak2>&1|tee$logdir/${project}_prebuild.log");&system_call("$makeCmd${uAct}CUR_ACTION=${uAct}");分解::A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=prebuildCUR_ACTION=prebuild调用makefile.sprd中prebuild:($(BUILD_MODE)./ducts.sh$(PROJECT)prebuild$(DEAL_STDOUT_ACTION))即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810gaprebuild$(DEAL_STDOUT_ACTION))[prebuild[dirname]--编译android工程时时脚本本会将将第3方chip的修改改动态态patch到android工程中中]./mksp8810gaupdate流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_prebuild.log");//建立out/target/product/sp8810ga/log/sp8810ga_prebuild.log&system_call("perlcustomize/perl/prebuild.plcustomize/make/${project}.mak2>&1|tee$logdir/${project}_prebuild.log");&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_update.log&system_call("$makeCmd${uAct}CUR_ACTION=${uAct}");&system_call("perlcustomize/perl/cleanall.pl$project$platform");//同new中内容分解::A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=updateCUR_ACTION=update调用makefile.sprd中update:($(BUILD_MODE)./ducts.sh$(PROJECT)$(SIM_OPT)fbuild2)$(DEAL_STDOUT_ACTION)即,,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810gafbuild2$(DEAL_STDOUT_ACTION))[fbuild2--快速速build,在fbuild基础础上上,再额额外外编编译译3rdparty下的的文文件件(建议议使使用用)]./ducts.shsp8810gafbuild2android_3rdparty_kernel_build:BuildkernelImage/zImageandkernelmodulessecond,sprd_build_3rdparty_all_chips:buildu-bootandothers3rdpartyko,sprd_3rdparty_make_android:makePRODUCT-sprdroid_base-eng-j1单独update可以生生成kernelImage,u-boot.bin,u-boot-spl-16k.bin,fdl2.bin,3rdpartyko,system.img,userdata.img,boot.img./mksp8810gaupdateuboot流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_uboot.log&system_call("$makeCmd$uModCUR_ACTION=$uActCUR_MODULE=$uMod");&system_call("perlcustomize/perl/cleanall.pl$project$platform");//同new中内容分解:A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=ubootCUR_ACTION=updateCUR_MODULE=uboot调用makefile.sprd中uboot:($(BUILD_MODE)./ducts.sh$(PROJECT)lbuild$(CUR_MODULE)$(CUR_ACTION))$(DEAL_STDOUT_MODULE)即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810galbuildubootupdate$(DEAL_STDOUT_MODULE)[lbuild[dirname][clean]--调用第3方build.sh脚本中的的functionmy_local_build函数(主要用来来编译ko)]生成文件件:/home/apuser/source/1206/idh.code/u-boot/u-boot.bin/home/apuser/source/1206/idh.code/u-boot/nand_spl/u-boot-spl-16k.bin/home/apuser/source/1206/idh.code/u-boot/nand_fdl/fdl2.bin./mksp8810gaupdatekernel流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_bootimage.log&system_call("$makeCmd$uModCUR_ACTION=$uActCUR_MODULE=$uMod");&system_call("perlcustomize/perl/cleanall.pl$project$platform");//同new中内容分解:A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=bootimageCUR_ACTION=updateCUR_MODULE=bootimage调用makefile.sprd中bootimage:($(BUILD_MODE)./ducts.sh$(PROJECT)$(CUR_MODULE))$(DEAL_STDOUT_MODULE)kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810gabootimage$(DEAL_STDOUT_MODULE)[bootimage--生成boot.img内核文件]生成文件::out/target/product/hsdroid/boot.img可以同时时更新两个个目标./mksp8810gaupdateubootkernel./mksp8810gaupdateko3rdparty/xxx/yyy流程前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_ko.log&system_call("$makeCmd$uModCUR_ACTION=$uActCUR_MODULE=$uModKMOD_PATH=$CUR_MODULE_PATH");&system_call("perlcustomize/perl/cleanall.pl$project$platform");//同new中内容分解:A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=koCUR_ACTION=updateCUR_MODULE=koKMOD_PATH=/home/apuser/source/1206/idh.code/3rdparty/lsensor/AL3006调用makefile.sprd中ko:($(BUILD_MODE)./ducts.sh$(PROJECT)lbuild$(KMOD_PATH)modules)$(DEAL_STDOUT_MODULE)即,kver=kerneluver=u-bootdc=yjobs=1./ducts.shsp8810galbuild/home/apuser/source/1206/idh.code/3rdparty/lsensor/AL3006modules$(DEAL_STDOUT_MODULE)[lbuild[dirname][clean]--调用第3方build.sh脚本中的functionmy_local_build函数(主要用来编译ko)]可生成模块LD[M]/home/apuser/source/1206/idh.code/3rdparty/gsensor/lis3dh/special/driver/lis3dh_acc.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/msensor/akm8975/special/driver/akm8975.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/audio/snd_dummy_alsa_audio/special/driver/snd_dummy.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/headset/headset-soc/special/driver/headset.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/fm/kt0812G/special/driver/kt0812g_fm_ctrl.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/tp/PIXCIR/special/driver/pixcir_i2c_ts.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/gpu/mali/special/ump/ump.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/gpu/mali/special/mali/mali.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/lsensor/AL3006/special/driver/al3006_pls.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/gps/gsd4t/special/driver/gpsctl.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/cmmb/IF238/special/driver/core/inno_core.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/cmmb/IF238/special/driver/lgx/inno_lgx.koLD[M]/home/apuser/source/1206/idh.code/3rdparty/cmmb/IF238/special/driver/plat/inno_plat.koLD[M]3rdparty/wifi/UNIFI6030/special/synergy/modules/wifi_softmac/host/os_linux/driver/unifi_sdio.ko./mksp8810gaupdateandroidxxx/yyy/zzz流程Customize/perl/mail.pl前面6步同mksp8810ganew,第7步:7,callmakefilecompileaccordingtocustomerinput&system_call("touch$logdir/${project}_${uAct}.log");//建立out/target/product/sp8810ga/log/sp8810ga_android.log&system_call("$makeCmd$uModCUR_ACTION=$uActCUR_MODULE=$uModKMOD_PATH=$CUR_MODULE_PATH");&system_call("perlcustomize/perl/cleanall.pl$project$platform");//同new中内容分解:A.make-fcustomize/make/makefile.sprdCMD_ARGU="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM="ENABLE_LOG=TRUEPROJECT=sp8810gaROOTDIR=/home/apuser/source/1206/idh.codeCUR_SIM=CUR_MODE=KERNEL_VER=kernelUBOOT_VER=u-bootIDH_PARAM=androidCUR_ACTION=updateCUR_MODULE=androidKMOD_PATH=/home/apuser/source/1206/idh.code/packages/apps/Phone调用用makefile.sprd中ko:($(BUILD_MODE)./make_android.sh$(KMOD_PATH))$(DEAL_STDOUT_MODULE)即,kver=kerneluver=u-bootdc=yjobs=1./make_android.shxxx/xxx$(DEAL_STDOUT_MODULE)编模块块的路路径::Android目录开开始一一直到到包含含Android.mk的那个个目录录,./mksp8810gaupdateandroidpackages/apps/Phone/out/target/product/hsdroid/system/app/Phone.apk,out/target/product/hsdroid/data/app/PhoneAppTests.apk./mksp8810gaupdateandroidframeworks/base/out/target/product/hsdroid/system/framework/framework.jar./mksp8810gaupdateandroidexternal/sprd/nvitemdout/target/product/hsdroid/system/bin/nvitemd./mksp8810gaupdateandroidframeworks/base/services/audioflinger/out/target/product/hsdroid/system/lib/libaudioflinger.so./mksp8810gaupdateandroidhardware/sprd/hsdroid/libsensors/out/target/product/hsdroid/system/lib/hw/sensors.sprdbp.so[由于脚本问问题,某些些早期版本本得到的so是来自于二二进制库]./ducts.shhelpapuser@xqianubt:~/source/1206/idh.code/customize/shell$./ducts.sh––h==============================[productslist]==============================00).openphone-sc881001).Sp8810gaExample:*1*./ducts.shsp8810ga2jobs=16./ducts.shsp8810ga3./ducts.shsp8810ga[subcmd]4TARGET_BUILD_VARIANT=userDISABLE_DEXPREOPT=true./ducts.shsp8810ga[createusermodeimages]5dc=y./ducts.shsp8810ga[delete.configbeforecompilekernel]6dc=n./ducts.shsp8810ga[notdelete.configbeforecompilekernel]7./ducts.sh-h[forhelp]./ducts.shhelp2apuser@xqianubt:~/source/1206/idh.code/customize/shell$./ducts.sh––h++++++++++++++++++++++++++subcmdlist++++++++++++++++++++++++++prebuild[dirname]--编译android工程时脚本本会将第3方chip的修改动态态patch到android工程中prebuild2--快速建立android标准环境,执行之后,即可用make-j4标准方法编编译androidlbuild[dirname][clean]--调用第3方build.sh脚本中的functionmy_local_build函数(主要用来编编译ko)nbuild--只编译标准准androidfprebuild--快速build需要的前提提配置自动动设置,同时完成一一次彻底编编译(建议使用)fbuild--快速build,不编译3rdparty下的ko(一旦reposync,务必重新执执行fprebuild)fbuild2--快速build,在fbuild基础上,再额外编译译3rdparty下的文件(建议使用)clean--清除第3方对android的所有修改改,恢复到原始始的android版本,可以认为是是unpatch.diff[dirname]--比较第3方代码和android标准代码的的差异,即生成patchdiff2[dirname]--用beyondcompare比较第3方代码和和android标准代码码的差异异install[dirname]--将第3方编译结结果安装装到out/target/product/xxxx/system/sps*目录install2[outdir]--将product产品编译译结果安安装到outdir目录(用来在批批量编译译产品时时完成自自动拷贝贝)ramdisk--编译product产品对应应的ramdisk.img,将init.3rdparty.rc修改内容容添加到到ramdisk.imgrecovery--编译product产品对应应的ramdisk-recovery.img和recovery.imgsystem--重新打包包system文件夹生生成system.imguserdata--重新打包包data文件夹生生成userdata.imgbootimage--生成boot.img和linux.bin内核文件件bootimage2--先删除.config,然后编译译整个内内核,最后生成成boot.img和linux.bin内核文件件update_image--发布boot.img,linux.bin,ramdisk.img,system,system.img和userdata.img等文件sdk--编译sdkforknew_board--基于本平平台fork一个名为为new_board的新产品品到3rdparty/products/new_board目录idhb--拷贝IDH专用binaryIdh--生成IDH或用-p打patch,xxx代表具体厂商商./ducts.shAnalysiscustomize/customer_cfg/sp8810ga/res/build.shstep1,echo"SH_INFO:chip_path($chip_path)">&2step2,source${ANDROID_CUSTOMIZE_BASE}/shell/mon.shstep3,$(product_copy"${PRODUCT_COPY_FILES}"$@)step4,source${ANDROID_CUSTOMIZE_BASE}/shell/mon.shstep5,$(sprd_build_3rdparty_all_chips"${CHIP_PATH_LISTS}""${CHIP_PATH_LISTS_EXT}"$@)$(sprd_build_3rdparty$args0$args1$args2$args3$args4$args5)$(sprd_3rdparty_make_android${ANDROID_3RDPARTY_TARGET_PRODUCT}${ANDROID_3RDPARTY_TARGET_BUILD_VARIANT}$@)customize/shell/build.3mon.shstep1,setallkindsofvariables,includingstep2,$(android_3rdparty_kernel_build)#buildkernelfirstifneededstep3,Implementallkindsoffunctionsheadedsprd_3rdparty_*,whichwillbecalledifneed.chip_path="/mediaserver/mediaserver_listener/lsensor/AL3006/cmcc/CMCC/cmmb/IF238/uboot/uboot/wifi/UNIFI6030/firewall/yeezone/gsensor/lis3dh/msensor/akm8975/bluetooth/BC6888/gps/gsd4t/audio/snd_dummy_alsa_audio/headset/headset-soc/fm/kt0812G/tp/PIXCIR/tools/iperf-2.0.4/tools/wireless_tools.29/tools/tools-binary/tools/testjar/anim/poweranim/gpu/malicustomize/shell/ducts.shstep1,source./mon.shstep2,[$do_build]&&{$ANDROID_3RDPARTY_PRODUCTS_PATH/$selected_product/res/build.sh$subcmd${ll_args[@]};}./mon.shAnalysiscustomize/shell/mon.shfunctionsprd_build_3rdparty_all_chips()“idhb””:do_idhb_release${args[@]}>&2“idh””:do_idh_release${args[@]}>&2“clean””:$(sprd_android_clean);sprd_hotcopy_clean;sprd_product_clean…"fbuild“,"prebuild2““,"fbuild2“:$(android_3rdparty_kernel_build_common)"fbuild“,"fbuild2““,"nbuild““:${ANDROID_3RDPARTY_BASE}/${CHIPNAMEPATH}/special/build.shfbuild_clean$num#1.addchip"all““,"3““,"prebuild“,"prebuild2“:$(sprd_3rdparty_add,$(my_local_copy),${CHIPNAMEPATH}/special/build.shprebuild$num"bootimage““:ANDROID_3RDPARTY_CMD=bootimage,$(sprd_prebuild_3rdparty)#2.localbuildtogeneratechipselfkodriver"all““,"3““,"lbuild“,"prebuild2“,"fbuild2“:$(my_local_build$margs1),/${CHIPNAMEPATH}/special/build.shlbuild$margs1#3.buildalladdedchip"${is_build_android}““,"fbuild“,"fbuild2“,"prebuild2“,"fprebuild2““:$(sprd_build_3rdparty$args0$args1$args2$args3$args4$args5)#4.copychiprelatedfile"all,"3,"install,"install2,"fbuild,"fbuild2”:$(my_local_install),${ANDROID_3RDPARTY_BASE}/${CHIPNAMEPATH}/special/build.shinstall"install““:out/host/linux-x86/bin/mkyaffs2image-f${ANDROID_OUT}/system${ANDROID_3RDPARTY_ANDROID_OUT}/system.imgout/host/linux-x86/bin/mkyaffs2image-f${ANDROID_OUT}/data${ANDROID_3RDPARTY_ANDROID_OUT}/userdata.img$(sprd_3rdparty_make_bootimage)#5.clean“fbuild“,"fbuild2”:ANDROID_3RDPARTY_CMD=clean,$(sprd_build_3rdparty)#6.normalbuildandroid"all““,"normal":ANDROID_3RDPARTY_CMD=nbuild,$(sprd_build_3rdparty)#7.copynormalrelatedfiles"all““,"normal““,"install2“:${ANDROID_3RDPARTY_BASE}/${CHIPNAMEPATH}/special/build.shinstall2"ramdisk":$(sprd_3rdparty_make_ramdisk"recovery“:$(sprd_3rdparty_make_recovery"system":$(sprd_3rdparty_make_system"userdata“:$(sprd_3rdparty_make_userdata"bootimage“,"bootimage2““:$(sprd_3rdparty_make_bootimage$args0$args1$args2$args3$args4$args5)./mon.shAnalysiscustomize/shell/build.3mon.shfunctionsprd_build_3rdparty()"${ANDROID_3RDPARTY_CMD"#a.update_image"update_image"]&&$(sprd_3rdparty_update_image$1)#-.Diff"diff“:$(sprd_3rdparty_diff${MYCHIP_BASE})"diff2":$(sprd_3rdparty_diff${MYCHIP_BASE}2)#0.preclean"ramdisk“,"bootimage":$(sprd_clean_3rdparty)#1.prebuild$(sprd_prebuild_3rdparty),[${?}-eq1]&&exportANDROID_3RDPARTY_BUILD_RAMDISK=y#2.build&clean"build","lbuild","nbuild“,"fbuild“,"fbuild2","prebuild2","fprebuild2":$(sprd_3rdparty_make_android${ANDROID_3RDPARTY_TARGET_PRODUCT}${ANDROID_3RDPARTY_TARGET_BUILD_VARIANT}$@)#3.install"install":$(my_local_install),["${ANDROID_3RDPARTY_BUILTIN}"]&&$(sprd_3rdparty_link_create"${my_local_link_files}")"install2":SHELLINFOecho"SH_INFO:sprd_build_3

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论