版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
.1TDDivSpreadtrumAndroid------文件編譯流程v1.0.0上?!け本ど钲凇なサ辍ろn國·印度課程名稱: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,F(xiàn)DL1:初始化SDRAM,與PC通信下載FDL2到SDRAM,并運行FDL2。2,F(xiàn)DL2:初始化NAND控制器,與PC通信下載其他Image到NANDflash。[客戶可自行編譯,一般情況下無需改變]3,u-boot-spl-16k.bin:第一級bootloader,在IRAM執(zhí)行,初始化CPU,SDRAM等,引導UBOOT分區(qū)到SDRAM中。[客戶可自行編譯,一般情況下無需改變]4,u-boot.bin:真正的bootloader,初始化部分設備,負責將虛擬機,ThreadX分區(qū),Linux分區(qū)從NAND注入SDRAM。[客戶可自行編譯,關注LCD,Key以及其它的一些改變]5,vmjaluna.img:虛擬機執(zhí)行代碼。管理和調度兩個OS。6,Modem.bin:ThreadX執(zhí)行代碼,Modem通信協(xié)議的實現(xiàn)。7,DSP_DM_G2.bin:Modem的DSP代碼實現(xiàn)。8,nvitem.bin:FixedNV數(shù)據(jù),射頻,網(wǎng)絡等信息。[客戶可使用Nveditor工具生成bin,主要關注RF數(shù)據(jù)的變化]------要注意不同射頻器件對應的不同的DSP和Nvitem文件。9,boot.img:Cmdline+LinuxKernel+Ramdisk。[客戶可自行編譯,關注外設驅動的變化]10,System.img:Android代碼。[客戶可自行編譯,關注裝載驅動模塊,HAL,frameworks,Application的變化]11,Userdata.img:Android數(shù)據(jù)。[客戶可自行編譯,關注初始數(shù)據(jù)]代碼架構—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:用來檢查客戶戶編譯環(huán)境。。2.cleanall.pl:用來恢復至客客戶編譯前環(huán)環(huán)境。3.filebk.pl:用來在客戶化化代碼生成過過程中備份必必要文件。4.fileR.pl:用來在cleanall時恢復備份文文件。5.linksp.pl:用來在3rdparty文件夾下相應應模塊和Customize文件夾下相應應模塊建立鏈鏈接。后續(xù)在3rdparty完成歷史使命命后,此文件件也就失去作作用。6.listP.pl:用來列出所有有在customize/make文件夾下客戶戶工程。7.main.pl:用來對客戶輸輸入編譯命令令行解析。8.mk:此文件同時也也會存在與客客戶工程根目目錄下,是所所有編譯動作作的最初調用用腳本。9.prebuild.pl:此文件會根據(jù)據(jù)customize/make中客戶化配置置文件在kernel/frameworks等目錄下產(chǎn)生生客戶化配置置代碼,同時時也會自動修修改或生成相相對應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:各腳本通通用函數(shù)數(shù)列表。。./mksp8810ganew流程1Customize/perl/mail.pl1,parsecustomerinput取得輸入入?yún)?shù)項項目$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的話創(chuàng)建make.ini然后read。gen_makeini(\@acts);創(chuàng)建建的的make.ini文件件內內容容::project=sp8810gamode=sim=6,precompileconditionprepare編譯譯前前條條件件準準備備,生成成mOpts數(shù)組組,,若是是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,執(zhí)行行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的修改動態(tài)態(tài)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后不帶參參數(shù)。./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的修改改動態(tài)態(tài)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函數(shù)(主要用來來編譯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函數(shù)(主要用來編譯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的修改動態(tài)態(tài)patch到android工程中prebuild2--快速建立android標準環(huán)境,執(zhí)行之后,即可用make-j4標準方法編編譯androidlbuild[dirname][clean]--調用第3方build.sh腳本中的functionmy_local_build函數(shù)(主要用來編編譯ko)nbuild--只編譯標準準androidfprebuild--快速build需要的前提提配置自動動設置,同時完成一一次徹底編編譯(建議使用)fbuild--快速build,不編譯3rdparty下的ko(一旦reposync,務必重新執(zhí)執(zhí)行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產(chǎn)品編譯譯結果安安裝到outdir目錄(用來在批批量編譯譯產(chǎn)品時時完成自自動拷貝貝)ramdisk--編譯product產(chǎn)品對應應的ramdisk.img,將init.3rdparty.rc修改內容容添加到到ramdisk.imgrecovery--編譯product產(chǎn)品對應應的ramdisk-recovery.img和recovery.imgsystem--重新打包包system文件夾生生成system.imguserdata--重新打包包data文件夾生生成userdata.imgbootimage--生成boot.img和linux.bin內核文件件bootimage2--先刪除.config,然后編譯譯整個內內核,最后生成成boot.img和linux.bin內核文件件update_image--發(fā)布boot.img,linux.bin,ramdisk.img,system,system.img和userdata.img等文件sdk--編譯sdkforknew_board--基于本平平臺fork一個名為為new_board的新產(chǎn)品品到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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度設施農業(yè)種植與銷售合同3篇
- 2025農村自建房綠色建材采購與應用合同
- 二零二五年度兼職業(yè)務員客戶滿意度調查合同3篇
- 2025年度公司解除與因自然災害影響員工勞動合同證明3篇
- 二零二五年度環(huán)保材料研發(fā)與應用股東合伙人協(xié)議3篇
- 2025技術培訓合同范本
- 2025年度創(chuàng)意產(chǎn)業(yè)園區(qū)商鋪租賃管理協(xié)議3篇
- 2025年度礦山礦產(chǎn)資源勘查與開發(fā)利用合作協(xié)議3篇
- 二零二五年度地質勘探駕駛員聘用合同協(xié)議書3篇
- 二零二五年度市政工程機械租賃與施工合同3篇
- 蘇州市2022-2023學年七年級上學期期末數(shù)學試題【帶答案】
- 工行人工智能風控
- 簡易呼吸器使用及檢測評分表
- 康復科進修匯報
- 2024-2030年中國水培蔬菜行業(yè)發(fā)展分析及投資前景預測研究報告
- 2023風電機組預應力混凝土塔筒與基礎結構設計標準
- 3D打印技術在醫(yī)療領域的應用
- 人員招聘的程序與信息發(fā)布
- 倉庫班長年終總結
- 2024-2029年中國IP授權行業(yè)市場現(xiàn)狀分析及競爭格局與投資發(fā)展研究報告
- 北京市海淀區(qū)2023-2024學年四年級上學期期末英語試題
評論
0/150
提交評論