https://www.openembedded.org/api.php?action=feedcontributions&user=137.219.45.196&feedformat=atom
Openembedded.org - User contributions [en]
2024-03-29T15:01:22Z
User contributions
MediaWiki 1.29.0
https://www.openembedded.org/index.php?title=How_to_create_a_bitbake_recipe_for_dummies&diff=2650
How to create a bitbake recipe for dummies
2010-09-16T05:01:44Z
<p>137.219.45.196: /* Recipe Template */</p>
<hr />
<div>== Introduction ==<br />
<br />
Currently only limited documentation is available on how to create a bitbake recipe. This article is a stub.<br />
<br />
* [http://www.gumstix.net/Setup-and-Programming/view/Build-system-overview/Hello-world-tutorial/111.html Gumstix Hello world tutorial]<br />
* [http://www.google.com/search?hl=en&q=bitbake+recipe+site:lists.linuxtogo.org/pipermail/openembedded-devel/ OpenEmbedded Mailing List Archives ]<br />
<br />
== Recipe Template ==<br />
<br />
Every recipe should start like this (pretend the package name is CHANGME:<br />
<br />
DESCRIPTION = ""<br />
HOMEPAGE = ""<br />
LICENSE = ""<br />
DEPENDS = ""<br />
SRC_URI = " \<br />
"<br />
# SRC_URI could also point to a git repository, eg:<br />
# SRC_URI = " git://host:port/path/to/repo.git;branch=win;protocol=ssh;user=username"<br />
<br />
# any .patch files included here will be auto-magically applied, increasing the -p level until it sticks.<br />
# SRC_URI = "file://omap_ctrl_readl.patch"<br />
<br />
PR = "r0" # Package Revision, Update this whenever you change the recipe.<br />
<br />
# For tarball packages (as opposed to git / svn which include the commit in the URI)<br />
SRC_URI[md5sum] = ""<br />
SRC_URI[sha256sum] = ""<br />
S = "${WORKDIR}/CHANGEME-${PV}"<br />
do_configure () {<br />
./configure<br />
}<br />
do_compile () {<br />
oe_runmake<br />
}<br />
do_install () {<br />
oe_runmake install<br />
}<br />
<br />
* '''PV''' refers to the revision. I.E. PV=0.2.1 for nodejs_0.2.1.bb<br />
<br />
== Examples ==<br />
<br />
=== wrapped with make ===<br />
<br />
This example shows waf wrapped in make<br />
<br />
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"<br />
HOMEPAGE = "http://nodejs.org"<br />
LICENSE = "MIT"<br />
DEPENDS = "openssl"<br />
SRC_URI = " \<br />
http://nodejs.org/dist/node-v${PV}.tar.gz \<br />
file://libev-cross-cc.patch \<br />
file://node-cross-cc.patch \<br />
"<br />
SRC_URI[md5sum] = "c6051dd216817bf0f95bea80c42cf262"<br />
SRC_URI[sha256sum] = "5bb7d084b2138ce43fcb34739ed894379c450a1dd569a1c710405bc39d2861c2"<br />
S = "${WORKDIR}/node-v${PV}"<br />
do_configure () {<br />
./configure --without-snapshot<br />
}<br />
do_compile () {<br />
make<br />
}<br />
do_install () {<br />
#oe_runmake install # doesn't install to correct location<br />
<br />
# This works<br />
install -d ${D}${bindir}/<br />
install -m 0755 ${S}/build/default/node ${D}${bindir}/<br />
install -m 0755 ${S}/bin/node-waf ${D}${bindir}/<br />
install -m 0755 ${S}/bin/node-repl ${D}${bindir}/<br />
}<br />
FILES_${PN} = "${bindir}/node ${bindir}/node-repl ${bindir}/node-waf"<br />
<br />
=== make ===<br />
<br />
TODO<br />
<br />
=== autotools ===<br />
<br />
TODO<br />
<br />
=== scons ===<br />
<br />
TODO<br />
<br />
=== waf ===</div>
137.219.45.196