[yocto] How to share files between recipes?
Maciej Pijanowski
maciej.pijanowski at 3mdeb.com
Thu Sep 19 06:45:15 PDT 2019
On 19.09.2019 15:39, Patrick Doyle wrote:
> I have a set of data files (cryptographic keys) that I would like to
> share among several recipes in my build. They won't go into the
> rootfs, but they will be used by multiple recipes that construct the
> rootfs. So, to the best of my understanding, it seems like I should
> put them in sysroot and somehow access them from there.
>
> I constructed the following recipe:
> SUMMARY = "Development keys used by my image"
> DESCRIPTION = "Install the development keys in the sysroot so that they \
> can be referenced by other recipes."
>
> LICENSE = "Proprietary"
> LIC_FILES_CHKSUM =
> "file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
>
> SRC_URI = "file://keys"
>
> do_install() {
> install -d ${D}/${datadir}
> install -m 755 -d ${WORKDIR}/keys ${D}/${datadir}
> }
>
> FILES_${PN} += "${datadir}/keys/"
>
> But when I attempt to bitbake this recipe, I get the following error:
> ERROR: development-keys-1.0-r0 do_package: QA Issue: development-keys:
> Files/directories were installed but not shipped in any package:
> /usr
> /usr/share
>
> Ummm.... I don't put anything in /usr or /usr/share.
> I don't inherit from anything (other than base.bbclass) that puts
> anything in /usr or /usr/share.
You do. datadir is /usr/share.
>
> Does base.bbclass put anything in /usr or /usr/share?
> Why?
> I suppose I could follow the advice given in the error message and
>
> rm -rf ${D}/usr
>
> in my do_install() task, but I'd like to understand why and how those
> directories are being created in the first place?
>
> --wpd
--
Maciej Pijanowski
Embedded Systems Engineer
https://3mdeb.com | @3mdeb_com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190919/f8f71ac6/attachment.pgp>
More information about the yocto
mailing list