I am not being able to get my recipe to copy some files into my target device.
Currently the layers of my yocto project looks like this:
layer path priority
==========================================================================
meta /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta 5
meta-tegra /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra 5
contrib /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra/contrib 4
meta-oe /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-oe 6
meta-python /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-python 7
meta-networking /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-networking 5
meta-filesystems /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-filesystems 6
meta-virtualization /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-virtualization 8
meta-tegra-community /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-community 20
meta-tegra-support /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-support 40
meta-demo-ci /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-demo-ci 40
meta-tegrademo /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegrademo 50
workspace /home/juanpablo/work/yocto/tegra-demo-distro/build/workspace 99
meta-mine /home/juanpablo/work/yocto/meta-kwali 6
The meta-mine layer is the layer I created with a recipe to copy files inside the image I am then flashing to the sd card of a jetson-nano-devkit.
The recipe log-generators_0.1.bb has the following content:
DESCRIPTON = "A template recipe to copy files from host directory to target. \
The example is written with docker-compose files"
LICENSE = "CLOSED"
SRC_URI = "file://.env \
file://docker-compose.yml \
"
FILES_${PN} += "/test"
inherit allarch
do_install() {
install -d ${D}/test
install -m 0755 ${WORKDIR}/.env ${D}/test/
install -m 0755 ${WORKDIR}/docker-compose.yml ${D}/test/
}
I have tried following the wiki's cookbook recipe and also 2 or 3 answers for similar questions posted in SO (e.g also defining ${S} = ${WORKDIR}, not using inherit allaarch, etc).
Any suggestions or help is welcome.
I tried your exact recipe on my setup and it seems to work correctly.
bitbake log-generators
produces log-generators{,-dbg,-dev}_0.1-r0_all.ipk
(I happen to use ipk) packages within build/tmp/deploy/ipk/all/
directory.
While inspecting log-generators_0.1-r0_all.ipk
, I can see the correct files in /test inside.
If you don't see the files in your target image, my best guess is that you need to reference the package in the image's install list. The simplest way is to add this to your local.conf
:
IMAGE_INSTALL_append = " log-generators "