TipsAndTricks/CliBuildsInToasterBuilddir

From Yocto Project
Revision as of 22:51, 25 January 2017 by Bavery (talk | contribs) (Created page with "= How to Take Over a Toaster Build Dir from the Command Line = Suppose you have used toaster to add layers and do some builds in a toaster project. This results in a director...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

How to Take Over a Toaster Build Dir from the Command Line

Suppose you have used toaster to add layers and do some builds in a toaster project. This results in a directory structure that could look something like:


build  
build-toaster-1  
build-toaster-2  
build-toaster-3  
downloads  
sstate-cache  
_toaster_clones

In this example, we'll assume that build-toaster-2 is a "master" project, build-toaster-3 is a "local" project, and build-toaster-4 is a "morty" project. Let's assume you've used the Toaster web ui to configure the layers and their dependencies to have what you'd like in them, but would now like to continue to do your work by hand. If you start a new shell that does not have the env variable pollution of the shell from which you started Toaster, you can do a command line build in the build-toaster-XX directory just as you normally would.
A couple of caveats:

* You must start from a new shell, otherwise the environment variables the Toaster startup sets will cause issues.
* If you would like your command line build in build-toaster-XX to share the sstate and downloads from the Toaster builds you've done proeviously, you need to run bitbake like  . <path>/poky/oe-init-build-env;  bitbake -R conf/toaster.conf <target>
** If you just run  . <path>/poky/oe-init-build-env;  bitbake <target> it will still work but will not use the previous downloads or sstate.

* If you made a project type other than local you may run into issues since the command line build will be using the same bitbake that you started toaster from (the definition of a local project) , but if you made a past release project, this command line approach would be trying to use those layers targeted to an older release from a newer bitbake; which may or may not work.
** For example, building a morty project from a master at 2.3 M2 did not work.  If I wanted to set up  a Morty project from toaster, I would need to start with a Morty Toaster...