I'm having some problem creating a simple recipe for yocto which make and install a library .so file to rootFS, possibily in /usr/lib or /lib.
DESCRIPTION = "Personal Libwakeup Library"
LICENSE = "CLOSED"
SRC_URI = "gitsm://xxxx.git;protocol=https;branch=master"
# Last revision in branch master.
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
# out-of-tree building doesn't appear to work for this package.
B = "${S}"
PACKAGECONFIG ??= ""
FILES:${PN} += " \
${libdir}/libwakeup_handling.so \
${libdir}/libwakeup_handling.so \
/lib/libwakeup/libwakeup_handling.so \
"
TARGET_CC_ARCH += "${LDFLAGS}"
INSANE_SKIP:${PN} = "ldflags"
INSANE_SKIP:${PN}-dev = "ldflags"
EXTRA_OEMAKE = "all"
do_compile:prepend() {
(cd ${S}/Debug && oe_runmake)
}
do_install:append() {
# Here I have to put "--target-directory=${D}${libdir}/libwakeup" instead of --target-directory=${D}${libdir} otherwise doesn't works.
install -Dm 0644 --target-directory=${D}${libdir}/libwakeup ${B}/Debug/libwakeup_handling.so
# To resove QA issue...
cd ${D}/usr/lib && ln -s -f libwakeup_handling.so.1.0.0 libwakeup_handling.so
cd ${D}/usr/lib && ln -s -f libwakeup_handling.so.1.0.0 libwakeup_handling.so.1
}
So seems I can't place a library .so directly in /lib or /usr/lib. Moreover the file I found in /usr/lib/libwakeup folder is only 9.5kB instead of 150kB of the library Yocto make during do_compile() phase.
Your target directory does not line up w/ what is in
FILES_PN
. Should be${libdir}/libwakeup/libwakeup_handling.so
instead of/lib/libwakeup/libwakeup_handling.so
.Furthermore, your symlink changing is not going to work, because
libwakeup_handling.so
is in${libdir}/libwakeup
not${libdir}
.