TipsAndTricks/CliBuildsInToasterBuilddir: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:
<br>
<br>
A couple of caveats:
A couple of caveats:
* You <strong>must</strong> start from a new shell, otherwise the environment variables the Toaster startup sets will cause issues.
* You <strong>must</strong> 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 <code> . <path>/poky/oe-init-build-env;  bitbake -R conf/toaster.conf <target></code>
* 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 <code> . <path>/poky/oe-init-build-env;  bitbake -R conf/toaster.conf <target></code>
** If you just run <code> . <path>/poky/oe-init-build-env;  bitbake <target></code> it will still work but will not use the previous downloads or sstate.
** If you just run <code> . <path>/poky/oe-init-build-env;  bitbake <target></code> 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.
* 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...
** 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...

Revision as of 22:54, 25 January 2017

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 couple of toaster projects. 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-1 is a "master" project, build-toaster-2 is a "local" project, and build-toaster-3 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...