I'm sorry to hear that. I think your installation line is still
incorrect, and should probably be ${S}/bb-example or
${WORKDIR}/bb-example
I'm not sure what is in the source archive you are using
'bb-example.tar.bz2' though, but you're specifying make in your
recipe so I imagine you are attempting to build something? Perhaps
that's not working?
If the compile is failing you should see some errors in the log
files we discussed.
If you upload bb-example.tar.bz2 somewhere for me I will take a look
at it for you.
install -m 0755 bb-example ${D}${bindir}
That said, I don't want to overcomplicate things for you, but I'm
assuming you're trying to understand how the build system works so
it might be worth us taking a step back here and looking at some
simple examples that do work to understand the process.
This will build an executable called bbexample with a dependency on
a shared library. It'll print out a couple of Hello World messages.
Building on the host for test
========================
You can check this all works on your build PC - independently of the
Yocto environment - with something like the following:
(Note that I've taken the hyphen out of the name of the executable
as it was causing me trouble with autotools configuration)
At the end of this process you will have an executable 'bbexample'
in your build directory
If you run it with:
./bbexample
You will see
Hello Yocto World...
Hello World (from a shared library!)
So we know this builds and works on your host.
Building and Packaging from a Git Commit
=====================================
Next we can create a recipe that makes use of this project within
Yocto to cross-compile, package the bbexample executable and the
shared library it depends upon.
I've created an example layer, using the yocto-layer command, that
contains a recipe to build the bbexample project.
(a) You can git clone and add this layer to your conf/bblayer.conf
file
Note that if you look in the recipe you'll see I am redefining the
source directory to be appropriate for the structure of the
downloaded tarball.
This is _critical_ as otherwise bitbake won't find the files...
# Make sure our source directory (for the build) matches the
directory structure in the tarball
# A tagged tarball from github contains a folder which includes the
github tag, so deal with it here
S = "${WORKDIR}/bbexample-bbexample-v${PV}"
You can check if your source directory is set correctly for the
tarball you are trying to build by running bitbake -c devshell
recipename
If you drop into a directory that is more or less empty (perhaps
apart from patches) then this is a good indicator ${S} is incorrect.
I usually
cd .. up one level and can then usually see another folder which
does contain the correct sources, and it is this folder name you
need to set
the source directory to in the recipe with ${S} =
"${WORKDIR}/correctfoldername"
Building and Packaging from a local release tarball
============================================
Lastly we can do the same thing with a local tarball using the
bbexample-lt recipe I've provided. I've put a copy of the tarball we
used in bbexample-rt into the bbexample-1.0 folder in the bbexample
recipe folder. I've also added a search path into the recipe so the
bbexample-lt recipe finds the file there
(You'll probably get some warnings during these builds as each
recipe is building the same target files and thus overwriting shared
files generated by the other recipes. You can ignore these)
If we look at the resulting package(s) we should see the appropriate
files