In the Yocto Project, writing a BitBake recipe (.bb) from scratch involves specifying source checksums, license hashes, and build dependencies. The official recipetool create CLI utility inspects source tarballs or Git repositories to generate starter recipes automatically.

recipetool Command Reference

BitBake recipetool Commandsbash
# Source Yocto environment script
source poky/oe-init-build-env
 
# Automatically create recipe from remote Git repo or HTTP tarball
recipetool create -o meta-custom/recipes-example/myapp/myapp_1.0.bb https://example.com/myapp-1.0.tar.gz
 
# Build newly created recipe using bitbake
bitbake myapp