user8257918
user8257918

Reputation: 55

How to manage a git repository of Yocto project

I am new to Yocto project and also git. I would like to manage source code by git (GUI). However, the yocto directory has too many files and the size is too big (more than 50GB). Therefore the git client (GitEye) cannot read files and be freezed.

In yocto directory, there are source, downloads, and build directories. I want to push only source and build/conf directories.

I tried to create a new git repository to yocto directory, but the git client was freezed. I just want to exclude downloads and build directories before the git client reads them so as not to be freezed.

Are there any good idea to manage yocto souce by git?

$ Environment

Upvotes: 2

Views: 4128

Answers (2)

yoctotutor.com
yoctotutor.com

Reputation: 5511

  1. Inside your sources directory every layer has the git repos so you have to go each layer create git patches and commits and push your git commits to git.
  1. change your modifications and track them using git status
  2. add modifications using git add --all .
  3. commit added things using git commit -m " support added for .." -s
  4. add url for remote repository using git remote add origin remote repository URL
  5. Push the changes using git push origin master
    for more information click: adding existing project to github

2.If you want to push build/conf/local.conf add those changes in sources/your-meta-layer/conf.

Upvotes: 1

pmod
pmod

Reputation: 11007

You don't need to push all files, the main idea is to push only additions - your own recipes and appends to already existing recipes, and configurations.

The already existing layers you should reference through repo manifest, for your additions it's better to create own layer (e.g. meta-mycooldevice, just don't forget to add it to bblayer.conf so that yocto knows that it exists). Your additions are your new recipes (<recipe name>.bb files) and modifications of already existing (<recipe name>_%.bbappend files). Just before writing new recipe, it's better to check if it's already exists in own of the layers you can reference and use: list of Yocto repos.

To better understand It's better to look at good examples. Here is some project that introduces own working layer, references some required meta repos, have own templates for local.conf and bblayers.conf and has own simple build script.

Upvotes: 0

Related Questions