http://openmoko.org/index.php?title=User:CesarB/Using_a_local_overlay&feed=atom&action=historyUser:CesarB/Using a local overlay - Revision history2024-03-28T17:50:51ZRevision history for this page on the wikiMediaWiki 1.19.24http://openmoko.org/index.php?title=User:CesarB/Using_a_local_overlay&diff=17801&oldid=prevCesarB: /* Using a local overlay */ add explanation for the FAQ on changing the contents of the rootfs; see also http://blog.haerwu.biz/2007/08/23/why-using-of-distromachine-variables-in-localconf-is-wrong/2007-08-26T05:08:42Z<p><span dir="auto"><span class="autocomment">Using a local overlay: </span> add explanation for the FAQ on changing the contents of the rootfs; see also http://blog.haerwu.biz/2007/08/23/why-using-of-distromachine-variables-in-localconf-is-wrong/</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 05:08, 26 August 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 49:</td>
<td colspan="2" class="diff-lineno">Line 49:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>You can add a new package (or a recipe for a new version of a package) to the overlay tree simply by creating it on the overlay tree.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>You can add a new package (or a recipe for a new version of a package) to the overlay tree simply by creating it on the overlay tree.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">=== Changing what's included on the build ===</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">This is a special case of [[#Changing packages|Changing packages]] above. The recipe to copy and modify is <code>packages/images/openmoko-image.bb</code>, and you should also symlink <code>packages/images/openmoko-devel-image.bb</code> and <code>packages/images/openmoko-sdk-image.bb</code>. To add a new package, add it to <code>PACKAGE_INSTALL</code>.</ins></div></td></tr>
</table>CesarBhttp://openmoko.org/index.php?title=User:CesarB/Using_a_local_overlay&diff=17800&oldid=prevCesarB: /* Creating a local overlay */ typo2007-08-26T04:53:18Z<p><span dir="auto"><span class="autocomment">Creating a local overlay: </span> typo</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 04:53, 26 August 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 20:</td>
<td colspan="2" class="diff-lineno">Line 20:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  BBFILE_PATTERN_local = "^${OMDIR}/local/packages/"</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  BBFILE_PATTERN_local = "^${OMDIR}/local/packages/"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  BBFILE_PRIORITY_upstream = "5"</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  BBFILE_PRIORITY_upstream = "5"</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  <del class="diffchange diffchange-inline">BBFILE_PRIORIRY_local </del>= "10"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  <ins class="diffchange diffchange-inline">BBFILE_PRIORITY_local </ins>= "10"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <code>BBFILE_PRIORITY_local</code> value should be greater than the <code>BBFILE_PRIORITY_upstream</code> value.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <code>BBFILE_PRIORITY_local</code> value should be greater than the <code>BBFILE_PRIORITY_upstream</code> value.</div></td></tr>
</table>CesarBhttp://openmoko.org/index.php?title=User:CesarB/Using_a_local_overlay&diff=17798&oldid=prevCesarB: Updated for 2007.2; not tested yet2007-08-26T04:52:12Z<p>Updated for 2007.2; not tested yet</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 04:52, 26 August 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>A local overlay is a way to add your own bitbake recipes (or override the ones from openembedded <del class="diffchange diffchange-inline">and openmoko</del>) without having them clobbered when you update these trees.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>A local overlay is a way to add your own bitbake recipes (or override the ones from openembedded) without having them clobbered when you update these trees.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Creating a local overlay ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Creating a local overlay ==</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 11:</td>
<td colspan="2" class="diff-lineno">Line 11:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Copy <code>site.conf</code> from the openmoko tree to <code>local/conf</code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Copy <code>site.conf</code> from the openmoko tree to <code>local/conf</code></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  cp <del class="diffchange diffchange-inline">oe</del>/conf/site.conf local/conf/site.conf</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  cp <ins class="diffchange diffchange-inline">build</ins>/conf/site.conf local/conf/site.conf</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>* Edit the local.conf you copied to add the new tree as a source for bitbake recipes. You must change the <code>BBFILES</code> and <code>BBFILE_COLLECTIONS</code> <del class="diffchange diffchange-inline">variables and add new </del><code><del class="diffchange diffchange-inline">BBFILE_PATTERN</del></code> and <code><del class="diffchange diffchange-inline">BBFILE_PRIORITY</del></code> variables<del class="diffchange diffchange-inline">.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>* Edit the local.conf you copied to add the new tree as a source for bitbake recipes. You must change the <code>BBFILES</code> <ins class="diffchange diffchange-inline">variable, </ins>and <ins class="diffchange diffchange-inline">add the </ins><code>BBFILE_COLLECTIONS</code><ins class="diffchange diffchange-inline">, </ins><code><ins class="diffchange diffchange-inline">BBFILE_PATTERN_*</ins></code> and <code><ins class="diffchange diffchange-inline">BBFILE_PRIORITY_*</ins></code> variables<ins class="diffchange diffchange-inline">:</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  BBFILES := "${OMDIR}/openembedded<del class="diffchange diffchange-inline">/packages/*/*.bb ${OMDIR}/oe</del>/packages/*/*.bb ${OMDIR}/local/packages/*/*.bb"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  BBFILES := "${OMDIR}/openembedded/packages/*/*.bb ${OMDIR}/local/packages/*/*.bb"</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  BBFILE_COLLECTIONS = "upstream local <del class="diffchange diffchange-inline">overlay</del>"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  BBFILE_COLLECTIONS = "upstream local"</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  <del class="diffchange diffchange-inline">BBFILE_PATTERN_overlay </del>= "^${OMDIR}/local/"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  <ins class="diffchange diffchange-inline">BBFILE_PATTERN_upstream = "^${OMDIR}/openembedded/packages/"</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  <del class="diffchange diffchange-inline">BBFILE_PRIORITY_overlay </del>= "<del class="diffchange diffchange-inline">20</del>"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> BBFILE_PATTERN_local </ins>= "^${OMDIR}/local/<ins class="diffchange diffchange-inline">packages/"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> BBFILE_PRIORITY_upstream = "5</ins>"</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  <ins class="diffchange diffchange-inline">BBFILE_PRIORIRY_local </ins>= "<ins class="diffchange diffchange-inline">10</ins>"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>The <code><del class="diffchange diffchange-inline">BBFILE_PRIORITY</del></code> should be greater than <del class="diffchange diffchange-inline">all </del>the <del class="diffchange diffchange-inline">other </del><code><del class="diffchange diffchange-inline">BBFILE_PRIORITY</del></code> <del class="diffchange diffchange-inline">variables on </del>the <del class="diffchange diffchange-inline">same file</del>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>The <code><ins class="diffchange diffchange-inline">BBFILE_PRIORITY_local</ins></code> <ins class="diffchange diffchange-inline">value </ins>should be greater than the <code><ins class="diffchange diffchange-inline">BBFILE_PRIORITY_upstream</ins></code> <ins class="diffchange diffchange-inline">value.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">While you are at it, you could change </ins>the <ins class="diffchange diffchange-inline"><code>SOURCEFORGE_MIRROR</code> variable to a nearby mirror</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Change your <code>BBPATH</code> environment variable to add the new tree ''before'' the two others (for [[MokoMakefile]], the variable is on the <code>setup-env</code> file).</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Change your <code>BBPATH</code> environment variable to add the new tree ''before'' the two others (for [[MokoMakefile]], the variable is on the <code>setup-env</code> file).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  export BBPATH="<del class="diffchange diffchange-inline">${OMDIR}/build:</del>${OMDIR}/local:${OMDIR}/<del class="diffchange diffchange-inline">oe</del>:${OMDIR}/openembedded"</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  export BBPATH="${OMDIR}/local:${OMDIR}/<ins class="diffchange diffchange-inline">build</ins>:${OMDIR}/openembedded"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Using a local overlay ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Using a local overlay ==</div></td></tr>
</table>CesarBhttp://openmoko.org/index.php?title=User:CesarB/Using_a_local_overlay&diff=13652&oldid=prevCesarB: New page on how to use a local overlay. Feel free to move to the main namespace if it's good enough.2007-07-22T16:57:13Z<p>New page on how to use a local overlay. Feel free to move to the main namespace if it's good enough.</p>
<p><b>New page</b></p><div>A local overlay is a way to add your own bitbake recipes (or override the ones from openembedded and openmoko) without having them clobbered when you update these trees.<br />
<br />
== Creating a local overlay ==<br />
<br />
To create a local overlay:<br />
<br />
* Create a directory for it and its subdirectories<br />
<br />
mkdir local local/conf local/classes local/packages<br />
<br />
* Copy <code>site.conf</code> from the openmoko tree to <code>local/conf</code><br />
<br />
cp oe/conf/site.conf local/conf/site.conf<br />
<br />
* Edit the local.conf you copied to add the new tree as a source for bitbake recipes. You must change the <code>BBFILES</code> and <code>BBFILE_COLLECTIONS</code> variables and add new <code>BBFILE_PATTERN</code> and <code>BBFILE_PRIORITY</code> variables.<br />
<br />
BBFILES := "${OMDIR}/openembedded/packages/*/*.bb ${OMDIR}/oe/packages/*/*.bb ${OMDIR}/local/packages/*/*.bb"<br />
BBFILE_COLLECTIONS = "upstream local overlay"<br />
BBFILE_PATTERN_overlay = "^${OMDIR}/local/"<br />
BBFILE_PRIORITY_overlay = "20"<br />
<br />
The <code>BBFILE_PRIORITY</code> should be greater than all the other <code>BBFILE_PRIORITY</code> variables on the same file.<br />
<br />
* Change your <code>BBPATH</code> environment variable to add the new tree ''before'' the two others (for [[MokoMakefile]], the variable is on the <code>setup-env</code> file).<br />
<br />
export BBPATH="${OMDIR}/build:${OMDIR}/local:${OMDIR}/oe:${OMDIR}/openembedded"<br />
<br />
== Using a local overlay ==<br />
<br />
How you use the local overlay depends on which part of the tree you want to affect.<br />
<br />
=== Changing files in conf/ ===<br />
<br />
To change a file in conf/, just copy the file to the overlay tree (preserving the directory structure) and edit it.<br />
<br />
=== Changing files in classes/ ===<br />
<br />
To change a file in classes/, just copy the file to the overlay tree and edit it.<br />
<br />
=== Changing packages ===<br />
<br />
Changing a package's recipe is a bit more complex. You have to copy over (or symlink) not only the .bb file for the package, but also ''all'' the files it includes with <code>require</code>, and the <code>FILESDIR</code> directories (all directories referred to by <code>FILESDIR</code>, usually named either ''package''-''version'' or <code>files</code>). If you forget one of them, the build will give an error (either when parsing the recipe in the case of <code>require</code>, or when trying to build in the case of the <code>FILESDIR</code> directories).<br />
<br />
=== Adding a new package ===<br />
<br />
You can add a new package (or a recipe for a new version of a package) to the overlay tree simply by creating it on the overlay tree.</div>CesarB