Search code examples
beagleboneblacktcpdumpyoctorecipe

Add tcpdump in yocto build (Beaglebone Black)


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.


Solution

  • 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.