[英]How to put an extra file in the kernel image by yocto
我无法通过yocto将initramfs.cpio放入内核映像中。
我有两个bb文件,一个用于构建initramfs,另一个用于构建fitimage。 我成功地构建了与initramfs映像捆绑在一起的fitimage。 但是,始终无法构建在fitImage的/ usr目录中具有initramfs.cpio.gz的fitImage。 (我的意思是,当我使用fitImage引导到控制台时,我想在/ usr中看到一个名为initramfs.cpio的文件)
================================================== ==================这是我的错误信息。
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: QA Issue: linux-mine: Files/directories were installed but not shipped in any package:
/usr
/usr/initramfs-mine-qemu.cpio
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
linux-mine: 2 installed and not shipped files. [installed-vs-shipped]
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: Fatal QA errors found, failing task.
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/paul/projects/Test/yocto/build/tmp/work/mine-poky-linux-gnueabi/linux-mine/1_4.9.27+gitAUTOINC+d87116e608-r0/temp/log.do_package.26149
ERROR: Task (/home/paul/projects/Test/yocto/yocto-2.2/poky/../meta-mine/recipes-kernel/linux/linux-mine_4.9.bb:do_package) failed with exit code '1'
================================================== ==================这是我的内核映像bb文件
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "4.9.27"
SRCREV = "d87116e608e94ad684b5e94d46c892e33b9e2d78"
SRC_URI = "git://local/kernel;protocol=ssh;branch=master"
#FILES_${PN} += "/usr /usr/initramfs-mine-${MACHINE_ARCH}.cpio"
#FILES_${PN}-${PV} += "/usr /usr/initramfs-mine-${MACHINE_ARCH}.cpio"
#IMAGE_INSTALL = "initramfs-mine"
do_install_append () {
echo "WangPaul : S=[${S}]"
echo "WangPaul : B=[${B}]"
echo "WangPaul : D=[${D}]"
install -d ${D}/usr/
install -m 0444 ${B}/usr/initramfs-mine-${MACHINE_ARCH}.cpio ${D}/usr/
}
================================================== ==================这是我的initramfs bb文件
LICENSE = "GPLv2"
PACKAGE_INSTALL = "initramfs-live-boot ${VIRTUAL-RUNTIME_base-utils} udev ${ROOTFS_BOOTSTRAP_INSTALL}"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
================================================== =================我发现了类似的问题: 在内核模块配方中提供额外的文件,以及使用FILES _ $ {PN}的示例
以上讨论中的方式行不通...
任何信息将不胜感激! 谢谢 !!
该错误似乎在质量检查问题中表示它意味着源已编译但未添加到rootfs。 kernel-image.bb
添加到您的kernel-image.bb
。 它将解决问题。
FILES_${PN} += "${exec_prefix}/*"
注意:可能是您的kernel.bb
文件中的格式错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.