我正在尝试编写一个简单的bitbake配方,它将一些脚本安装到目标根文件系统中.我必须遗漏一些东西,因为我觉得我设置正确,但我不断收到错误消息:
ERROR: Function failed: do_install (see /home/mike/ULF/ulf/build-ulf/out/work/armv7ahf-vfp-neon-linux-gnueabihf/ttt/1.0-r0/temp/log.do_install.493 for further information) ERROR: Logfile of failure stored in: /home/mike/ULF/ulf/build-ulf/out/work/armv7ahf-vfp-neon-linux-gnueabihf/ttt/1.0-r0/temp/log.do_install.493 Log data follows: | DEBUG: Executing shell function do_install | install: cannot stat `uim2svc.sh': No such file or directory | ERROR: Function failed: do_install (see /home/mike/ULF/ulf/build-ulf/out/work/armv7ahf-vfp-neon-linux-gnueabihf/ttt/1.0-r0/temp/log.do_install.493 for further information) ERROR: Task 2 (/home/mike/ULF/ulf/oe-ghmi/recipes/images/ttt.bb, do_install) failed with exit code '1'
现在我已经阅读了local-file-fetcher上的bitbake文档,它说:
此子模块处理以file://开头的URL.您在URL中指定的文件名可以是文件的绝对路径或相对路径.如果文件名是相对的,则使用PATESPATH变量的内容的方式与使用PATH查找可执行文件的方式相同.
所以我在我的文件名,SRC_URI
本地files
目录中的脚本,我已经检查了构建的输出和路径指向我的脚本目录... 所以为什么我仍然得到这个错误?任何人都有关于我可能做错的想法?
这是我的完整bitbake食谱(ttt.bb):
LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" SRC_URI = "file://uim2svc.sh" do_install() { install -d ${IMAGE_ROOTFS}/etc install -d -m 0755 ${IMAGE_ROOTFS}/etc/init.d install -m 0755 uim2svc.sh ${IMAGE_ROOTFS}/etc/init.d/ }
这是树(从/ home/mike/ULF/ulf开始),显示文件的位置:
oe-ghmi/ ??? classes ??? conf ??? recipes ? ??? images ? ??? files ? ? ??? uim2svc.sh ? ??? global-hmi-image.bb ? ??? ttt.bb
并且(截断的)输出来自bitbake -e ttt
:
FILESPATH ="...:/ home/mike/ULF/ulf/oe-ghmi/recipes/images/files/armv7a:/ home/mike/ULF/ulf/oe-ghmi/recipes/images/files/ghmi:/ home/mike/ULF/ulf/oe-ghmi /食谱/图像/文件/ "
Marco Guerri.. 6
根据OpenEmbedded手册,第9.13节:
When source code is specified as a part of SRC_URI it is unpacked into the work directory, ${WORKDIR}.
因此,您的脚本会被bitbake检测到并部署在其中${WORKDIR}
.该方法do_install()
应该引用相对于的文件${WORKDIR}
.第9.13.2节的手册中有一个例子.file:用于修补程序和其他文件:
Non-patch files are copied to the work directory, ${WORKDIR}. You can access these files from within a recipe by referring to them relative to the work directory. The following example, from the quagga recipe, shows the above init script being included in the package by copying it during the install task
并提供的代码显示了如何执行此操作:
do_install () { # Install init script and default settings install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d ${D}${sysconfdir}/ install -m 0644 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga ...
也许值得注意的是文件不是直接复制到${IMAGE_ROOTFS}
,而是复制到$ {D}.来自部分7.4 Tasks
:
install The install task is responsible for actually installing everything. This needs to install the software into the destination directory, D. This directory won’t actually be a part of the final package though. In other words if you install something into ${D}/bin then it will end up in the /bin directory in the package and therefore on the target.
完成后do_install
,${D}
将打包目录,然后${IMAGE_ROOTFS}
按rootfs_ipkg
类安装到最终的ROOTFS目录中(由您正在构建的映像的recepie调用).来自部分9.10 rootfs_ipkg class
:
The rootf_ipk class is used to create a root filesystem for the target device from a set of .ipkg packages.
执行的任务包括:
4. Configures ipkg to allow it to be used locally to install into the root filesystem ${IMAGE_ROOTFS}; 5. Installs locale related .ipkg packages;
从${IMAGE_ROOTFS}
最终的文件系统最终创建.