Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!

Difference between revisions of "How to create a bitbake recipe for dummies"

From Openembedded.org
Jump to: navigation, search
(cat+)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Outdated}}
 +
 
== Introduction ==
 
== Introduction ==
  
Line 29: Line 31:
 
   S = "${WORKDIR}/CHANGEME-${PV}"
 
   S = "${WORKDIR}/CHANGEME-${PV}"
 
   do_configure () {
 
   do_configure () {
     ./configure
+
     ./configure --prefix=${prefix}
 
   }
 
   }
 
   do_compile () {
 
   do_compile () {
     oe_runmake
+
     make
 
   }
 
   }
 
   do_install () {
 
   do_install () {
     oe_runmake install
+
     DESTDIR=${D} oe_runmake install
 
   }
 
   }
  
Line 59: Line 61:
 
   S = "${WORKDIR}/node-v${PV}"
 
   S = "${WORKDIR}/node-v${PV}"
 
   do_configure () {
 
   do_configure () {
     ./configure --without-snapshot
+
     ./configure --prefix=${prefix} --without-snapshot
 
   }
 
   }
 
   do_compile () {
 
   do_compile () {
Line 65: Line 67:
 
   }
 
   }
 
   do_install () {
 
   do_install () {
     #oe_runmake install # doesn't install to correct location
+
     DESTDIR=${D} oe_runmake install
 
+
    # This works
+
    install -d ${D}${bindir}/
+
    install -m 0755 ${S}/build/default/node ${D}${bindir}/
+
    install -m 0755 ${S}/bin/node-waf ${D}${bindir}/
+
    install -m 0755 ${S}/bin/node-repl ${D}${bindir}/
+
 
   }
 
   }
  FILES_${PN} = "${bindir}/node ${bindir}/node-repl ${bindir}/node-waf"
 
  
 
=== make ===
 
=== make ===

Latest revision as of 16:35, 3 November 2012

NOTE: This page has been identified as having content that is significantly out-of-date, usually because it refers to OpenEmbedded-Classic - for new projects, you should use OpenEmbedded-Core.

See OpenEmbedded Wiki Update Project for more details.

Contents

[edit] Introduction

Currently only limited documentation is available on how to create a bitbake recipe. This article is a stub.

[edit] Recipe Template

Every recipe should start like this (pretend the package name is CHANGME:

 DESCRIPTION = ""
 HOMEPAGE = ""
 LICENSE = ""
 DEPENDS = ""
 SRC_URI = " \
 "
 # SRC_URI could also point to a git repository, eg:
 # SRC_URI = " git://host:port/path/to/repo.git;branch=win;protocol=ssh;user=username"
 
 # any .patch files included here will be auto-magically applied, increasing the -p level until it sticks.
 # SRC_URI = "file://omap_ctrl_readl.patch"
 
 PR = "r0"  # Package Revision, Update this whenever you change the recipe.
 
 # For tarball packages (as opposed to git / svn which include the commit in the URI)
 SRC_URI[md5sum] = ""
 SRC_URI[sha256sum] = ""
 S = "${WORKDIR}/CHANGEME-${PV}"
 do_configure () {
   ./configure --prefix=${prefix}
 }
 do_compile () {
   make
 }
 do_install () {
   DESTDIR=${D} oe_runmake install
 }
  • PV refers to the revision. I.E. PV=0.2.1 for nodejs_0.2.1.bb

[edit] Examples

[edit] wrapped with make

This example shows waf wrapped in make

 DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
 HOMEPAGE = "http://nodejs.org"
 LICENSE = "MIT"
 DEPENDS = "openssl"
 SRC_URI = " \
   http://nodejs.org/dist/node-v${PV}.tar.gz \
   file://libev-cross-cc.patch \
   file://node-cross-cc.patch \
 "
 SRC_URI[md5sum] = "c6051dd216817bf0f95bea80c42cf262"
 SRC_URI[sha256sum] = "5bb7d084b2138ce43fcb34739ed894379c450a1dd569a1c710405bc39d2861c2"
 S = "${WORKDIR}/node-v${PV}"
 do_configure () {
   ./configure --prefix=${prefix} --without-snapshot
 }
 do_compile () {
   make
 }
 do_install () {
   DESTDIR=${D} oe_runmake install
 }

[edit] make

TODO

[edit] autotools

TODO

[edit] scons

TODO

[edit] waf

Personal tools
Namespaces

Variants
Actions
Navigation
Categories
OE services
Toolbox