如何将多个内核版本添加到本地repo清单

时间:2016-08-02 01:41:06

标签: android git repo android-kernel

我按照这个link创建了一个本地清单来下载特定版本的android内核,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <remote  name="aosp"
           fetch=".."
           review="https://android-review.googlesource.com/" />
  <default revision="master"
           remote="aosp"
           sync-j="4" />

   <project path="kernel/common" name="kernel/common" revision="android-4.4"/>
</manifest>

使用repo sync kernel/common

同步

我应该如何继续同步多个内核版本。

1 个答案:

答案 0 :(得分:1)

根据repo document

When you run repo sync, this is what happens:
If the project has never been synchronized, then repo sync is 
equivalent to git clone. All branches in the remote repository
are copied to the local project directory.If the project has 
already been synchronized once, then repo sync is equivalent to:
   git remote update
   git rebase origin/<BRANCH>

如果您运行repo sync,只有清单中指定的修订版本将被结帐,但您可以输入kernel / common文件夹来运行git命令,例如git pullgit checkout以获得您想要的版本

如果你只想使用repo命令,你可以用不同的文件夹签出内核,即在清单中指定不同版本的多项目如下。

<project path="kernel/common4.2" name="kernel/common" revision="android-4.2"/>  
<project path="kernel/common4.3" name="kernel/common" revision="android-4.3"/>
<project path="kernel/common4.4" name="kernel/common" revision="android-4.4"/>