Repo, Bitbake
Repo
Repo complements Git by simplifying work across multiple repositories.
From https://source.android.com/docs/setup/create/repo
基本语法
repo <command options>
| content | command |
|---|---|
| Help | Repo help |
| Command Help | Repo <command> --help |
| init | Repo init -u url [options] |
| sync | Repo sync <project-list> |
| upload | Repo upload <project-list> |
| Check diff | Repo diff |
| download | Repo download <target change> |
| forall | Repo forall <project-list> -c command |
| check all repos status | repo status |
sync
- 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 been synchronized before, then repo sync is equivalent to:
git remote update
git rebase origin/branch
sync
repo sync -c -j$(nproc) && repo forall -c "git-lfs pull"
clean
repo forall -c "git reset --hard HEAD && git clean -df"; repo sync -d -j$(nproc); repo forall -c "git lfs pull"
如果sync不完整,或者之前的code残留一些patch,可能会出现lunch的时候报错no such devices or directory,重复执行sync和clean的步骤即可
报错no such devices or directory还有一种很大的可能的lunch target写错了,检查一下,尤其是_和-
如何根据现有的manifest sync
- 将manifest下载到.repo/manifests下面
- repo sync -m <yourmanifets>,不需要指定路径
- 正常repo sync, source, lunch, make即可
为什么git log可能日期更早的反而在上面
因为在lunch这一步打了以前的patch
repo报错
repo: reusing existing repo client checkout in xxx manifests: fatal: couldn't find remote ref refs/heads/master manifests: sleeping 4.0 seconds before retrying fatal: cannot obtain manifest xxxxx ================================================================================ Repo command failed: UpdateManifestError Unable to sync manifest default.xml
后来发现这个连接可以打开,但是没有master只有main分支,就在repo init后加上-b main即可,因为默认是master
Bitbake
If you ever get yourself into trouble, or find that a particular recipe is in a bad state, check out the bitbake cleanstate <recipe> and bitbake cleanall <recipe> commands.

浙公网安备 33010602011771号