5

I want to add tcpdump into yocto build

I found that I need to add meta-networking into bblayers.conf. meta-networking is apart of meta-openembedded

Following are the steps I followed :

  1. Downloaded complete meta-openembedded : git clone git@github.com:openembedded/meta-openembedded.git
  2. Checked out to jethro branch and confirmed that meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb is present
  3. Added meta-networking and its dependent packages into bblayers.conf

BBLAYERS

/home/linux/work/yocto/poky/meta-openembedded/meta-oe \
/home/linux/work/yocto/poky/meta-openembedded/meta-networking \
/home/linux/work/yocto/poky/meta-openembedded/meta-python \
  1. Triggered full build and copied the images onto sdcard.

I am still unable to see tcpdump binary after booting up BBB(Beaglebone black). I am pretty sure I am missing something. I am new to yocto. Any guidance will be very helpful.

Sandeep
  • 18,356
  • 16
  • 68
  • 108

1 Answers1

9

You need to add tcpdump to your image recipe. For a quick test, you add the following line to your conf/local.conf:

IMAGE_INSTALL_append = " tcpdump"

(Note the leading space in the assignment). Just adding a layer won't add anything to your image.

Update: In order to do do it correctly, you should add tcpdump to IMAGE_INSTALL in your own image recipe. Eg.

IMAGE_INSTALL += "tcpdump"

If you don't have your own image, you could add a <image-name>.bbappend file to your own layer, with the line above.

Anders
  • 8,541
  • 1
  • 27
  • 34
  • Thanks. It works. To do it in a standard way, Can the same line be added to tcpdump_4.7.4.bb? – Sandeep Jun 29 '16 at 11:36
  • 1
    I've just updated my answer with instructions on how to do this long-term. Just an additional note, no, the tcpdump recipe can't add itself to any image; a recipe can't influence any other recipe. – Anders Jun 29 '16 at 12:32