<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.elphel.com/index.php?action=history&amp;feed=atom&amp;title=Adding_systemwide_library_to_BitBake_layer</id>
	<title>Adding systemwide library to BitBake layer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.elphel.com/index.php?action=history&amp;feed=atom&amp;title=Adding_systemwide_library_to_BitBake_layer"/>
	<link rel="alternate" type="text/html" href="https://wiki.elphel.com/index.php?title=Adding_systemwide_library_to_BitBake_layer&amp;action=history"/>
	<updated>2026-08-03T15:13:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.elphel.com/index.php?title=Adding_systemwide_library_to_BitBake_layer&amp;diff=13193&amp;oldid=prev</id>
		<title>Mikhail: Created page with &quot;=== Adding system-wide library to BitBake layer ===  System-wide library can be added to BitBake layer through several simple steps. &#039;&#039;libogg&#039;&#039; will be used here as an example. T...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.elphel.com/index.php?title=Adding_systemwide_library_to_BitBake_layer&amp;diff=13193&amp;oldid=prev"/>
		<updated>2016-05-05T19:17:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Adding system-wide library to BitBake layer ===  System-wide library can be added to BitBake layer through several simple steps. &amp;#039;&amp;#039;libogg&amp;#039;&amp;#039; will be used here as an example. T...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Adding system-wide library to BitBake layer ===&lt;br /&gt;
&lt;br /&gt;
System-wide library can be added to BitBake layer through several simple steps. &amp;#039;&amp;#039;libogg&amp;#039;&amp;#039; will be used here as an example. This library will be added to &amp;#039;&amp;#039;meta-elphel393&amp;#039;&amp;#039; layer and we will apply a couple of patches to it.&lt;br /&gt;
&lt;br /&gt;
The recipe for &amp;#039;&amp;#039;libogg&amp;#039;&amp;#039; is already included into &amp;#039;&amp;#039;poky/meta/recipes-multimedia&amp;#039;&amp;#039;, but we need to apply some patches. There is no need to copy original recipe for this library as we can add special recipe into custom layer which will append Metadata to original recipe. Such recipes are called append files and they use &amp;#039;&amp;#039;.bbappend&amp;#039;&amp;#039; file type suffix. Append file must have the same name as its corresponding recipe. All we need to do is create &amp;#039;&amp;#039;libogg_1.3.2.bbappend&amp;#039;&amp;#039; file in &amp;#039;&amp;#039;meta/meta-elphel393/recipes-multimedia/libogg&amp;#039;&amp;#039; directory and add the following lines to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FILESEXTRAPATHS_prepend := &amp;quot;${THISDIR}/files:&amp;quot; &lt;br /&gt;
&lt;br /&gt;
SRC_URI_append +=   &amp;quot;file://framing.c.patch \&lt;br /&gt;
                    file://ogg.h.patch&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file extends the locations so that BitBake could find patches and adds these patches to original recipe. &amp;#039;&amp;#039;1.3.2&amp;#039;&amp;#039; in the name is the library version and it should match in append file. If corresponding recipe is renamed to update to a newer library version, this &amp;#039;&amp;#039;.bbappend&amp;#039;&amp;#039; must be renamed as well.&lt;br /&gt;
&lt;br /&gt;
Next step is appending &amp;#039;&amp;#039;libogg&amp;#039;&amp;#039; package to the list of packages in &amp;#039;&amp;#039;core-image-elphel393&amp;#039;&amp;#039; recipe which resides in &amp;#039;&amp;#039;meta-elphel393/recipes-core/images&amp;#039;&amp;#039; directory. Append library package to &amp;#039;&amp;#039;IMAGE_INSTALL_append&amp;#039;&amp;#039; variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IMAGE_INSTALL_append += &amp;quot; python-core \&lt;br /&gt;
                         libogg \&lt;br /&gt;
                         ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the library&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitabke libogg -c compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and add it to roofs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake libogg -c populate_sysroot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or just launch &amp;#039;&amp;#039;bitbake libogg&amp;#039;&amp;#039; and BitBake will compile, package and copy this library to &amp;#039;&amp;#039;sysroots&amp;#039;&amp;#039;. The library now can be used in cross-compiled user space application.&lt;/div&gt;</summary>
		<author><name>Mikhail</name></author>
	</entry>
</feed>