Compiling a simple command

Paul D. DeRocco

I've tried to add a single small executable to my image, based on what it
says in 5.3.1. of the Project Development Manual, and while the image gets
built with no error messages, it never compiles my executable. I'm not doing
_exactly_ what it says, so I assume some difference is accounting for this
failure. What I'm doing different:

1) Since I'm only adding one tiny little program to an otherwise default
image, I'm not creating a separate .bb file for it, but placing it in the
top-level .bb file that I invoke with the bitbake command.

2) Since I only have one .bb file, I'm sticking it in the layer directory,
not two levels down, and adding ${LAYERDIR}/*.bb to BBFILES.

It's finding the recipe okay, because the image is being built, but it's
never executing do_compile or do_install. The recipe looks like this:

require recipes-core/images/

DESCRIPTION = "A basic image with a realtime kernel."
DEPENDS = "linux-yocto-rt"
PR = "r0"

SRC_URI = "file://fastuart.cpp"

S = "${WORKDIR}"

do_compile() {
${CC} fastuart.cpp -o fastuart

do_install() {
install -d ${D}${bindir}
install -m 0755 fastuart ${D}${bindir}

The source is one level down from the recipe file, in files/fastuart.cpp. Is
there some reason that one can't do a compilation from a top-level recipe
that makes an image? Or is it because of the location of the .bb file in the
tree? Or am I doing something else wrong?


Ciao, Paul D. DeRocco
Paul mailto:pderocco@...

Join { to automatically receive all group messages.