高通Android源码下载

电脑环境: Ubuntu17.04

高通开源源码网站:https://wiki.codeaurora.org/xwiki/bin/QAEP/release

  • 安装git &repo
  1. sudo apt install git
  2. sudo apt install repo
  • 修改repo 
    • sudo vim /usr/bin/repo  
    • #REPO_URL = 'https://gerrit.googlesource.com/git-repo'
    • REPO_URL = 'https://gerrit-google.tuna.tsinghua.edu.cn/git-repo'
  • 下载Android源码
    1. 创建源码目录  
      1. mkdir android-msm8996
    2. 进入源码目录,初始化repo
      1. cd android-msm8996
      2. repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.6.5.r1-02500-8x96.0.xml
    3. 同步代码
      1. repo sync -j4
  • 编译Android源码
    1. 安装JDK
      1. sudo apt install openjdk-7-jdk 
    2. 编译
      1. 进入源码目录
        1. cd android-msm8996
      2. 配置环境变量
        1. source build/envsetup.sh
      3. 选择产品
        1. lunch
        2. 27
      4. 执行命令启动编译
        1. make
        2. 或者 make -j4 showcommands dist

        参数说明:

            -j4, 开启4个线程;

            showcommands, 显示编译过程中执行的命令[38];

            dist, 将编译后产生的发布文件拷贝到out/dist目录中[38];

      5. 编译内核
        1. make bootimage
      6. 编译其他模块
        1. make sdk - build the tools that are part of an SDK (adb, fastboot, etc.)  
        2. make snod - build the system image from the current software binaries  
        3. make services  
        4. make runtime  
        5. make droid - make droid is the normal build.  
        6. make all - make everything, whether it is included in the product definition or not  
        7. make clean - remove all built files (prepare for a new build). Same as rm -rf out/<configuration>/  
        8. make modules - shows a list of submodules that can be built (List of all LOCAL_MODULE definitions)  
        9. make <local_module> - make a specific module (note that this is not the same as directory name. It is the LOCAL_MODULE definition in the Android.mk file)  
        10. make clean-<local_module> - clean a specific module  
        11. make bootimage TARGET_PREBUILT_KERNEL=/path/to/bzImage - create a new boot image with custom bzImage  



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值