<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://developerwiki.proventusnova.com/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_custom_yocto_recipe</id>
	<title>How to create a custom yocto recipe - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://developerwiki.proventusnova.com/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_custom_yocto_recipe"/>
	<link rel="alternate" type="text/html" href="https://developerwiki.proventusnova.com/index.php?title=How_to_create_a_custom_yocto_recipe&amp;action=history"/>
	<updated>2026-04-18T07:57:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://developerwiki.proventusnova.com/index.php?title=How_to_create_a_custom_yocto_recipe&amp;diff=100&amp;oldid=prev</id>
		<title>Sonni: Create How to create a custom recipe page</title>
		<link rel="alternate" type="text/html" href="https://developerwiki.proventusnova.com/index.php?title=How_to_create_a_custom_yocto_recipe&amp;diff=100&amp;oldid=prev"/>
		<updated>2025-03-26T03:18:19Z</updated>

		<summary type="html">&lt;p&gt;Create How to create a custom recipe page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=About=&lt;br /&gt;
This document shows how to create a custom Yocto recipe, a .bb file (bitbake file), from scratch. &amp;lt;br&amp;gt;&lt;br /&gt;
If you want to create a custom Yocto recipe automatically, see [[How to create a custom yocto meta layer|Create custom yocto meta layer]] page under &amp;#039;&amp;#039;&amp;#039;Create layer via bitbake&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Create a custom Yocto recipe=&lt;br /&gt;
Follow these steps to create a custom Yocto recipe.&lt;br /&gt;
&lt;br /&gt;
==Step 1. Setup Yocto Environemnt==&lt;br /&gt;
Make sure to setup Yocto first.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd &amp;lt;your yocto folder&amp;gt;&lt;br /&gt;
source oe-init-build-env &amp;lt;your build directory&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
After setting up Yocto, you can add your own custom layer. To create a custom layer, see [[How to create a custom yocto meta layer|Create custom yocto meta layer]] page.&lt;br /&gt;
&lt;br /&gt;
==Step 2. Create the recipe==&lt;br /&gt;
After setting up Yocto, you can now create a custom recipe.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd &amp;lt;layer folder&amp;gt;&lt;br /&gt;
#If you want to create a new recipe folder&lt;br /&gt;
mkdir &amp;lt;recipe folder name&amp;gt;&lt;br /&gt;
#e.g. mkdir recipe-software&lt;br /&gt;
#If you want to create a recipe in an existing folder&lt;br /&gt;
cd &amp;lt;recipe folder name&amp;gt;&lt;br /&gt;
#create the recipe&lt;br /&gt;
touch proventusNova_1.0.bb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
After creating the .bb file, we can now edit the recipe. &amp;lt;br&amp;gt;&lt;br /&gt;
You can use your preferred text editor to edit the file. Below is an example of what a recipe may contain.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
DESCRIPTION = &amp;quot;ProventusNova Recipe&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;CLOSED&amp;quot;&lt;br /&gt;
SRC_URI = &amp;quot;file://helloworld.c&amp;quot;&lt;br /&gt;
&lt;br /&gt;
inherit core-image&lt;br /&gt;
&lt;br /&gt;
IMAGE_FEATURES += &amp;quot;ssh-server-openssh debug-tweaks&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CORE_IMAGE_BASE_INSTALL += &amp;quot;systemd&amp;quot;&lt;br /&gt;
TOOLCHAIN_HOST_TASK += &amp;quot;nativesdk-packagegroup-cuda-sdk-host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
inherit nopackages&lt;br /&gt;
&lt;br /&gt;
do_install() {&lt;br /&gt;
    install -d ${D}${bindir}&lt;br /&gt;
    install -m 0755 &amp;lt;application&amp;gt; ${D}${bindir}/&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
do_compile() {&lt;br /&gt;
    ${CC} helloworld.c -o helloworld&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Step 3. Test the recipe==&lt;br /&gt;
After creating the recipe, test the recipe by running the command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bitbake -c fetch proventusNova&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This tests the recipe if the files are downloaded correctly.&lt;br /&gt;
&lt;br /&gt;
==Step 4. Build the recipe==&lt;br /&gt;
To build the recipe, run the command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bitbake proventusNova&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Footer}}&lt;/div&gt;</summary>
		<author><name>Sonni</name></author>
	</entry>
</feed>