可能所有 yocto 人都知道 yocto rocko 2.4+ 中更改了 sysrootfs 策略。所以我有以下问题:我尝试使用 makefile 为共享库制作配方。配方如下(我不声称它是完整的。我根本无法通过构建阶段):
#==================
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${THISDIR}/files/LICENSE;md5=5959e502cb44bafc53b2cc9400e3d4cd"
PR = "r0"
##### First try from my local repo and then we will use the big one
SRC_URI = "git:///home/w23698/projects/anybus/Generic;branch=anybus-lib-0.0.1"
SRCREV = "2fe4ce39a651d71f3f8de1c751dff2581de2c526"
S = "${WORKDIR}/git"
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"
#####The only dependency
RDEPENDS_${PN} = "libgpiod"
RDEPENDS_${PN}-dev = "libgpiod"
RDEPENDS_${PN}-dbg = "libgpiod"
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${libdir}
install -m 0644 ${PN}-m40 ${D}${libdir}
}
当它失败时让我惊讶的是:
ww.c:6:10: fatal error: gpiod.h: No such file or directory
| #include "gpiod.h"
| ^~~~~~~~~
| compilation terminated.
然后我注意到命令行是:
arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/<full path>/recipe-sysroot -L/usr/lib -g -Wall -fpic .....
我查看recipe-sysroot/usr/lib/
并发现了一组最小的库,而 libgpiod 不存在。头文件都没有包含在...
有什么建议么?