我已将基于makefile的项目集成到yocto中的自定义配方中,但是存在一个问题:do_rootfs失败。
请找到库源代码,我尝试将此库集成到oe-core:http://libiec61850.com/libiec61850/wp-content/uploads/2016/02/libiec61850-0.9.0.2.tgz
.bb文件:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "simple Hello World program" PR = "r0" LICENSE = "CLOSED"
S = "${WORKDIR}"
DEPEND = "libpthread-stubs libiec61883 libraw1394" SRC_URI += " \
file://config \
file://demos \
file://dotnet \
file://examples \
file://make \
file://Makefile \
file://src \
file://third_party \
file://tools \
"
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
do_compile() {
oe_runmake ${S}/make } do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
INCLUDEDIR=${includedir}
install -d ${D}${includedir}/libiec61850/
install -d ${D}${localedir}
for f in ${S}/.install/include/*.h; do
install -m 0644 $f ${D}${includedir}/libiec61850/
done
install -m 0644 ${S}/.install/lib/* ${D}${localedir}/ }
错误如下:
Configuring volatile-binds.
Configuring libxcb-xkb1.
Configuring libxkbcommon.
Configuring libidn11.
Configuring libattr1.
Configuring libacl1.
Configuring libz1.
Configuring libkmod2.
Configuring udev.
Configuring kmod.
Configuring iptables.
Configuring libcap2.
Configuring liblzma5.
Configuring util-linux-fsck.
Configuring systemd-compat-units.
Configuring systemd-serialgetty.
Configuring angstrom-version.
Configuring udev-hwdb.
Configuring libe2p2.
Configuring libext2fs2.
Configuring e2fsprogs-e2fsck.
Configuring systemd.
Configuring kernel-image-4.1.15-v2.5b3+ge6d111c.
Configuring angstrom-feed-configs.
Configuring netbase.
Configuring packagegroup-core-boot.
Collected errors:
* opkg_install_cmd: Cannot install package libiec61850.
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /media/kanji/edb1a7c2-288e-488e-abce-24d478f6cd46/workspace/kanji/oe-core/build/out-glibc/work/colibri_vf-angstrom-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.8560
ERROR: Task 7 (/media/kanji/edb1a7c2-288e-488e-abce-24d478f6cd46/workspace/kanji/oe-core/build/../stuff/openembedded-core/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1865 tasks of which 1864 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
No currently running tasks (1864 of 1866)
Summary: 1 task failed:
/media/kanji/edb1a7c2-288e-488e-abce-24d478f6cd46/workspace/kanji/oe-core/build/../stuff/openembedded-core/meta/recipes-core/images/core-image-minimal.bb, do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
答案 0 :(得分:4)
这里很难提供一个确切的答案,因为有些事情可能是错误的或者至少是有问题的。所以让我们倒退:
Collected errors: * opkg_install_cmd: Cannot install package libiec61850.
这意味着在安装软件包列表时无法找到文字的libiec61850文件。我假设您创建了libiec61850_0.9.0.2.bb,这就是上面的bb文件内容所代表的内容。除了我假设的空白问题是由于复制/粘贴到这里,它看起来还不错。但是请查看log.do_compile和log.do_install为了更容易看到构建该软件包是否存在任何问题,请执行以下操作:
bitbake -c cleansstate libiec61850
bitbake libiec61850
并查看它是否抱怨空包裹。
接下来,您可能遇到食谱名称问题 - >二进制输出重命名。做:
ls tmp/deploy/ipk/*/*iec61850*
看看结果如何。如果您想检查特定ipk文件的内容,它们只是'ar'存档,因此您可以提取它们:
mkdir temp
cd temp
ar -x ../foo.ipk
tar zxf data.tar.gz
答案 1 :(得分:1)
我找到了上述问题的解决方案:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "libiec61850 library support added"
PR = "r0"
LICENSE = "CLOSED"
S = "${WORKDIR}"
SRC_URI += " \
file://config \
file://demos \
file://dotnet \
file://examples \
file://make \
file://Makefile \
file://src \
file://third_party \
file://tools \
"
DEPEND = "libpthread-stubs"
RDEPENDS_${PN} += " \
update-alternatives-opkg \
opkg-arch-config \
run-postinsts \
"
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
do_compile() {
oe_runmake ${S}/make
}
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
INCLUDEDIR=${includedir}
install -d ${D}${includedir}/libiec61850/
install -d ${D}${libdir}/
for f in ${S}/.install/include/*.h; do
install -m 0644 $f ${D}${includedir}/libiec61850/
done
install -m 0644 ${S}/.install/lib/* ${D}${libdir}/
}
FILES_${PN} += "${includedir}/libiec61850/* ${libdir}/*"
PACKAGES = "${PN}"