About
This document shows how to create a custom Yocto recipe, a .bb file (bitbake file), from scratch.
If you want to create a custom Yocto recipe automatically, see Create custom yocto meta layer page under Create layer via bitbake.
Create a custom Yocto recipe
Follow these steps to create a custom Yocto recipe.
Step 1. Setup Yocto Environemnt
Make sure to setup Yocto first.
cd <your yocto folder>
source oe-init-build-env <your build directory>
After setting up Yocto, you can add your own custom layer. To create a custom layer, see Create custom yocto meta layer page.
Step 2. Create the recipe
After setting up Yocto, you can now create a custom recipe.
cd <layer folder>
#If you want to create a new recipe folder
mkdir <recipe folder name>
#e.g. mkdir recipe-software
#If you want to create a recipe in an existing folder
cd <recipe folder name>
#create the recipe
touch proventusNova_1.0.bb
After creating the .bb file, we can now edit the recipe.
You can use your preferred text editor to edit the file. Below is an example of what a recipe may contain.
DESCRIPTION = "ProventusNova Recipe"
LICENSE = "CLOSED"
SRC_URI = "file://helloworld.c"
inherit core-image
IMAGE_FEATURES += "ssh-server-openssh debug-tweaks"
CORE_IMAGE_BASE_INSTALL += "systemd"
TOOLCHAIN_HOST_TASK += "nativesdk-packagegroup-cuda-sdk-host"
inherit nopackages
do_install() {
install -d ${D}${bindir}
install -m 0755 <application> ${D}${bindir}/
}
do_compile() {
${CC} helloworld.c -o helloworld
}
Step 3. Test the recipe
After creating the recipe, test the recipe by running the command:
bitbake -c fetch proventusNova
This tests the recipe if the files are downloaded correctly.
Step 4. Build the recipe
To build the recipe, run the command:
bitbake proventusNova
Need Further Support?
📞 Book Consultation Call: Show Calendar!
📩 Contact Via Email: support@proventusnova.com
🌐 Visit Our Website: ProventusNova.com