From: Patrick Turley <PatrickTurley@gamestop.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: The BitBake equivalent of "Hello, World!"
Date: Wed, 3 Oct 2012 22:30:27 +0000 [thread overview]
Message-ID: <CC9226B2.365%PatrickTurley@gamestop.com> (raw)
I'll start with my question (so you can decide whether you care to read
the rest):
What is the BitBake equivalent of "Hello, World!?"
Specifically, what is the minimum project structure that
correctly describes a single layer and a single recipe?
--------------------------------------------------
I'm trying to understand Yocto and BitBake thoroughly. As a start, I tried
to construct a "minimal" BitBake project, with no Yocto content.
I began by running BitBake in an empty directory and fixing each error in
turn. Eventually, I was able run BitBake without errors -- even though it
didn't actually *do* anything (which was fine).
After that, I created a single layer, and that worked fine.
Most recently, I tried to create a single recipe within my one layer. I'm
having problems I don't know how to solve.
At the bottom of this message, I show the full structure of my tree and
the contents of all the files. Since the project is "minimal," there isn't
much to show.
From within the "build" directory of my project, I ran BitBake like this:
$ ../BitBake/bin/bitbake
Nothing to do. Use 'bitbake world' to build everything,
or run 'bitbake --help' for usage information.
That's what I expected. Then, I tried to examine the layers:
$ ../BitBake/bin/bitbake-layers show-layers
layer path priority
=========================================================
LayerA /home/pturley/Workspace/woohoo/LayerA 0
That's also what I expected. Things went wrong when I tried to examine the
recipes:
$ ../BitBake/bin/bitbake-layers show-recipes
Parsing recipes..$
That's wrong. I expected something like this:
Parsing recipes..done.
=== Available recipes: ===
a:
LayerA 1
At first, "base.bbclass" was empty so, on a hunch, I added this:
do_hello() {
echo Hello
}
addtask hello
That changed the output to this:
$ ../BitBake/bin/bitbake-layers show-recipes
Parsing recipes..done.
=== Available recipes: ===
a:
? 1
This is still wrong, but better (though I can't explain why).
At this point I thought it best to look for experts. I don't need
hand-holding - but I *do* need substantive, accurate hints. If you have
any, I'd be grateful.
--------------------------------------------------
Here is the tree of files in my "minimal" project, along with the contents
of those file:
/home/pturley/Workspace/woohoo
|
+-- build
| |
| +-- classes
| | |
| | +-- base.bbclass
| |
| | +-------------------------------------------
| | | do_hello() {
| | | echo Hello
| | | }
| | |
| | | addtask hello
| | +-------------------------------------------
| |
| +-- conf
| |
| +-- bblayers.conf
| |
| | +-------------------------------------------
| | | BBLAYERS ?= " \
| | | /home/pturley/Workspace/woohoo/LayerA \
| | | "
| | +-------------------------------------------
| |
| +-- bitbake.conf
|
| +-------------------------------------------
| | CACHE = "${TOPDIR}/cache"
| +-------------------------------------------
|
+-- LayerA
| |
| +-- a.bb
| |
| | +-------------------------------------------
| | | PN = 'a'
| | | PV = '1'
| | +-------------------------------------------
| |
| +-- conf
| |
| +-- layer.conf
|
| +-------------------------------------------
| | BBPATH .= ":${LAYERDIR}"
| | BBFILES += "${LAYERDIR}/*.bb"
| +-------------------------------------------
|
+-- BitBake ...
The BitBake directory origin is:
http://git.openembedded.org/bitbake/
I have the 1.15.2 tag checked out, which is what
Yocto denzil uses.
next reply other threads:[~2012-10-03 22:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 22:30 Patrick Turley [this message]
2012-10-03 22:56 ` The BitBake equivalent of "Hello, World!" Patrick Turley
2012-10-03 23:03 ` Rudolf Streif
2012-10-04 16:50 ` Patrick Turley
2012-10-04 18:58 ` Rudolf Streif
2012-10-04 21:26 ` Evade Flow
2012-10-05 0:47 ` Patrick Turley
2012-10-05 0:58 ` Patrick Turley
2012-10-05 3:02 ` Rudolf Streif
2012-10-05 3:06 ` Rudolf Streif
2012-10-05 3:00 ` Rudolf Streif
2012-10-05 9:46 ` Richard Purdie
2012-10-05 9:54 ` Tomas Frydrych
2012-10-09 0:30 ` Patrick Turley
2012-10-09 2:23 ` Rudolf Streif
2012-10-09 22:31 ` Patrick Turley
2012-10-09 22:56 ` McClintock Matthew-B29882
2012-10-09 23:40 ` Patrick Turley
2012-10-11 21:12 ` Patrick Turley
2012-10-10 15:45 ` Evade Flow
2012-10-10 15:56 ` Evade Flow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CC9226B2.365%PatrickTurley@gamestop.com \
--to=patrickturley@gamestop.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.