All of lore.kernel.org
 help / color / mirror / Atom feed
* The BitBake equivalent of "Hello, World!"
@ 2012-10-03 22:30 Patrick Turley
  2012-10-03 22:56 ` Patrick Turley
  0 siblings, 1 reply; 21+ messages in thread
From: Patrick Turley @ 2012-10-03 22:30 UTC (permalink / raw)
  To: yocto

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.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-10-11 21:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-03 22:30 The BitBake equivalent of "Hello, World!" Patrick Turley
2012-10-03 22:56 ` 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

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.