我正在开发一个较新版本的 Linux(我们在一个古老的 buildroot 系统上运行 3.14)并尝试添加一个较旧版本的 mplayer 作为解决方法,直到我们的应用程序可以更新以使用更新/替代视频播放器。我添加了一个新配方,并将该配方添加到我的构建中,但我似乎无法获得有效的 do_install。
只是为了获取一些背景信息,我正在运行 Poky 的 Pyro 版本。目标是 i.MX6。
这是我写的原始食谱。
DESCRIPTION = "Load an older version of mplayer as a workaround until a new media player can be used."
PRIORITY = "optional"
LICENSE = "CLOSED"
FILES_${PN} += "/usr/bin/mplayer \
/usr/lib/libbz2.so.1.0.6 \
/usr/lib/libfribidi.so.0.3.5"
SRC_URI = "file://mplayer \
file://libbz2.so.1.0.6 \
file://libfribidi.so.0.3.5"
do_install() {
ln -s /usr/lib/libbz2.so.1.0.6 ${D}/usr/lib/libbz2.so
ln -s /usr/lib/libfribidi.so.0.3.5 ${D}/usr/lib/libfribidi.so
}
我还尝试了一个精简版本,它只复制了旧的 mplayer 可执行文件。请注意,我没有使用 install ,因为这会提示“QA 问题:已剥离”错误,即使将“INSANE_SKIP_qwt_append = “already-stripped” 添加到我的 local.conf 也无法解决该问题。
DESCRIPTION = "Load an older version of mplayer as a workaround until a new media player can be used."
PRIORITY = "optional"
LICENSE = "CLOSED"
FILES_${PN} += "/usr/bin/mplayer"
SRC_URI = "file://mplayer"
do_install() {
cp ${WORKDIR}/mplayer ${D}${base_bindir}/mplayer
}
在原始配方中,我看到它无法创建链接。将其更改为相对路径(添加 -r)没有任何区别。
| ln: failed to create symbolic link '/home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/work/armv7ahf-neon-poky-linux-gnueabi/temp-mplayer/1.0-r0/image/usr/lib/libbz2.so': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/work/armv7ahf-neon-poky-linux-gnueabi/temp-mplayer/1.0-r0/temp/log.do_install.31008)
ERROR: Task (/home/gen-ccm-root/workdir/tools/poky/meta-markem-imaje-private-bsp/recipes-core/temp-mplayer/temp-mplayer_1.0.bb:do_install) failed with exit code '1'
在精简版中,我看到以下内容:
| DEBUG: Executing shell function do_install
| cp: cannot create regular file '/home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/work/armv7ahf-neon-poky-linux-gnueabi/temp-mplayer/1.0-r0/image/bin/mplayer': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/work/armv7ahf-neon-poky-linux-gnueabi/temp-mplayer/1.0-r0/temp/log.do_install.30663)
ERROR: Task (/home/gen-ccm-root/workdir/tools/poky/meta-markem-imaje-private-bsp/recipes-core/temp-mplayer/temp-mplayer_1.0.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2721 tasks of which 2718 didn't need to be rerun and 1 failed.
我不太担心添加 ldconfig 调用(另一天的另一个问题),但至少希望文件出现在 RootFS 中,或者至少成功创建映像。如果我删除这个配方,我可以构建一个可用的图像,我可以将它刻录到 SD 卡中,所以我很确定这个问题在这个配方中。
我见过这个问题:Bitbake not installed my file in the rootfs image and used it as the basis for build this recipe,但我显然错过了一些东西。