Installing Apache via Yocto

Hello all,

Is there an established way of adding Apache to an (Colibri iMX6) image via the Yocto/OE build system?

I’m guessing I need to add a layer/recipe for this?

Regards,
Richard.

You can use the IMAGE_INSTALL_append variable in local.conf.

First, edit ‘conf/bblayers.conf’ to add the meta-webserver layer:

BBLAYERS ?= " \
  .....
  ${TOPDIR}/../layers/meta-openembedded/meta-webserver \
  .....
"

Then, in ‘conf/local.conf’, add:

IMAGE_INSTALL_append = " apache2"

Finally, use bitbake to rebuild the image.

Great, thanks, I shall give that a try this evening!

I’ve hit an error already, any idea how I might resolve this?

Parsing recipes: 100% |##########################################################| Time: 00:04:55
Parsing of 2475 .bb files complete (0 cached, 2475 parsed). 3072 targets, 173 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES ‘apache2’ (but /home/richard/workspace/bsp-toradex-v2.6.1-lxde/build/…/layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target ‘apache2’ is unbuildable, removing…
Missing or unbuildable dependency chain was: [‘apache2’]
ERROR: Required build target ‘angstrom-lxde-image’ has no buildable providers.
Missing or unbuildable dependency chain was: [‘angstrom-lxde-image’, ‘apache2’]

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

@riph72 I apologize, I may have been wrong about meta-webserver being configured by default in our build system. Edit bblayers.conf, and add the following to BASELAYERS:

${TOPDIR}/../stuff/meta-openembedded/meta-webserver \

I will update the answer accordingly.

Seems happy now, thanks. Note though, I modified your answer slightly and used this:

BBLAYERS = …
${TOPDIR}/…/layers/meta-openembedded/meta-webserver \

(I think your answer might be related to an older setup?)

Yes, you are correct, I’ve updated the answer accordingly. Thanks for the follow up.