Hello,
I am trying to use Yocto to copy some files to my rootfs, and I managed successfully to do it.
The next step was to try to copy a file.tar.gz and have it extracted to my roofs, and I am having problems with.
This is the recipe I am using:
DESCRIPTION = “Copying files to the /work dir on target”
LICENSE = “CLOSED”
PR = “r0”
FILESEXTRAPATHS_prepend := “${THISDIR}/misa-files:”
SRC_URI += “file://test \
file://nico.tar.gz”
inherit bin_package
do_install() {
install -d ${D}/work
install -m 0755 ${WORKDIR}/test ${D}/work
install -m 0755 ${WORKDIR}/nico.tar.gz ${D}/work
}
FILES_${PN} += “/work”
The “test” file is copied successfully into the rootfs (under the folder /work) on my target, but the file nico.tar.gz gives me a problem: bitbake says the following error message:
Log data follows:
| DEBUG: Executing shell function do_install
| install: cannot stat ‘/work/apalis/oe-core-misa/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/misa-files/1.0.1-r0/nico.tar.gz’: No such file or directory
If on the above recipe I specify not to unpack the file nico.tar.gz by setting:
SRC_URI += “file://test \
file://nico.tar.gz;unpack=0”
then the file is copied to the rootfs correctly.
Without “unpack=0” I was expecting bitbake to extract the tar.gz to the ${WORKDIR} and have the extracted file into my rootfs, but apparently it can’t find the nico.tar.gz file into the ${WORKDIR}.
Am I missing something ?
Thanks for your help.
Nicola