简体   繁体   中英

Using the Yocto Git Workflow with an existing Git repository

Yocto suggests two workflows for generating patches for existing source code. The Quilt workflow and the Git workflow ( http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#using-a-git-workflow ).

Unfortunately the Git workflow they recommend assumes that the source a) doesn't already come from Git and b) doesn't have any extra patches applied.

The component I'd like to modify came from a Git repo and has a few patches applied to it during the build process. As a result, if I run git status from the 'git' subdirectory, I see there are already a number of changes (from the patches).

Because of this the Git workflow they recommend doesn't really work.

I'd like to work in the source tree and then generate a patch using git. How should I do this?

Should I just start with a git commit (this would obviously just be a local commit) or would that mess up the Yocto build?

Another option might be to clone the git repo I'm trying to modify and work in that. But that doesn't seem like the way Yocto wants things done.

I believe all you need to do is commit the currently applied patches.

git add -A
git commit -m "Successful patches"

This is equivalent to their $ git commit -m "initial revision" in step 3. Now you can make your own changes following the recommended workflow.

I don't think you need to care about any commits except the latest one, since this git repo lives in the $S directory, so its going to be lost next time the recipe cleans (or is ignored for the next temporary build directory, if you update your $PV variable)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM