美文网首页
代码环境搭建

代码环境搭建

作者: 大大世界 | 来源:发表于2015-10-13 12:22 被阅读1129次

    一.编译环境部署

    1: Installing the JDK

    Android5.0 编译需要Open Java7版本
    $ sudo apt-get update
    $ sudo apt-get install openjdk-7-jdk
    
    Android4.4编译需要Sun Java6版本
    $ sudo add-apt-repository ppa:webupd8team/java
    $ sudo apt-get update
    $ sudo apt-get install oracle-java6-set-default
    
    切换Java的方式
    $ sudo update-alternatives --config java
    $ sudo update-alternatives --config javac
    

    2: Installing required packages (Ubuntu 14.04)

    $ sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zip
    

    3: Installing Repo

    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
    $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
    

    二.下载源代码

    配置ssh

    1: 通过ssh-keygen生成publickey
    $ ssh-keygen
    

    运行后生成 ~/.ssh/id_rsa.pub 文件

    2: 然后创建~/.ssh/config 文件内容如下
    $ vim ~/.ssh/config
    
    #Gerrit SSH Config
    host gerrit.rom.sunmi.com
    hostname gerrit.rom.sunmi.com
    user 自己的用户名(例如: gank)
    port 29418
    
    4: 登陆Gerrit

    浏览器登录 http://gerrit.rom.sunmi.com:8080
    用户名: 默认邮件名
    密码: 123456

    login.png
    5: 注册邮箱

    注册邮箱后注意接收邮件并激活账号, 设置显示名称


    email.png
    6: 添加public key

    Key的内容是之前生成的SSH Key: ~/.ssh/id_rsa.pub
    获取Key

    $ cat ~/.ssh/id_rsa.pub
    
    publickey.png
    7: 测试 SSH 账号
    $ ssh gerrit.rom.sunmi.com
    
      ****    Welcome to Gerrit Code Review    ****
    
      Hi Gerrit, you have successfully connected over SSH.
    
      Unfortunately, interactive shells are disabled.
      To clone a hosted Git repository, use:
    
      git clone ssh://gerrit@woyouwaimai.ufycb.com:29418/REPOSITORY_NAME.git
    
      Connection to gerrit.rom.sunmi.comclosed.
    

    Download SourceCode

    V1源码:

    $ git clone ssh://gerrit.rom.sunmi.com/mtk/alps -b sunmi

    T1源码:

    $ git clone ssh://gerrit.rom.sunmi.com/qcom/t1

    P1源码:

    $ git clone ssh://gerrit.rom.sunmi.com/mtk/xc -b master

    P2源码:

    $ repo init -u ssh://gerrit.rom.sunmi.com/sunmi/manifest -b P2_Sunmi_Dev

    下载
    $ repo sync
    
    S2源码:

    $ repo init -u ssh://gerrit.rom.sunmi.com/sunmi/manifest -b S2_Sunmi_Dev

    下载
    $ repo sync
    

    三.编译源代码

    V1编译

    $ . build/envsetup.sh
    $ copyproject SWY_W5900_A01 
    $ choosecombo release full_lcsh6580_weg_sh_l eng
    $ make -j4
    

    M1编译

    $ . build/envsetup.sh
    $ copyproject SWY_W5910_A01 
    $ choosecombo release full_lcsh6580_weg_sh_l eng
    $ make -j4
    

    相关文章

      网友评论

          本文标题:代码环境搭建

          本文链接:https://www.haomeiwen.com/subject/mzsocttx.html