'How to add a new recipe in yocto?

I am trying to add a new recipe to install new packages in my image. I need the next packages libnfc5 libnfc-bin libnfc-examples, I have found these packages in this page: http://ftp.de.debian.org/debian/pool/main/libn/libnfc/, so I am using the next commands to install the packages:

I am not sure if is necessary modify the .bb file generate: libnfc5_1.7.1-4+b1.bb, and one time that I execute deploy-target which is necessary to do in my device, Do I need to install the library?



Solution 1:[1]

https://medium.com/@lokeshsharma596/yocto-lab-02-creating-custom-layer-and-writing-recipe-for-hello-world-f4438311bbfc

this is a very good article on recipe.

Solution 2:[2]

libnfc is already exist in meta-openembedded/meta-oe/recipes-core/libnfc.

Make sure meta-oe is in your bblayers.conf and bitbake it.

Then, you can deploy it with devtool deploy-target.

Also, for nfc test tool you can check this github project pcsc-tools.

Here is a recipe if you want to integrate it to your image:

  • meta-custom/recipes-tools/pcsc/pcsc_git.bb
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENCE;md5=94d55d512a9ba36caa9b7df079bae19f"

SRC_URI = "git://github.com/LudovicRousseau/pcsc-tools;protocol=https"

PV = "1.5.7+git${SRCPV}"
SRCREV = "691ae06a6925b7a0e283016c8a05725959beebb3"

S = "${WORKDIR}/git"

DEPENDS = "pcsc-lite"

inherit pkgconfig autotools

You can then add it to your image:

IMAGE_INSTALL_append = " pcsc"

or, you can deploy it using devtool as well.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 balu
Solution 2 Talel BELHADJSALEM