英文:
Use yocto image output as file on another yocto image
问题
我有一个 Yocto 配方,用于构建树莓派镜像。我们称之为 主镜像。它的输出是 main-image.wic.bz2 文件。我想要构建另一个树莓派镜像,用于从 USB 闪存进行恢复。我们称之为 恢复镜像。我知道如何从 USB 闪存启动此镜像,但现在我需要以某种方式将 main-image.wic.bz2 文件获取到恢复镜像中。我在 Yocto 中仍然很新手,所以我想知道,实现这一目标的最佳方法是什么。感谢您的建议。
英文:
I have yocto recipe, which builds raspberry pi image. Lets call it main image. It's output is main-image.wic.bz2 file. I would like to build another RPi image, used for recovery from USB flash. Lets call it recovery image. I know, how to achieve boot of this image from USB flash, but now I need to somehow get main-image.wic.bz2 as file in recovery image. I'm still pretty new in yocto, so I would like to know, what is best way to achieve this.
Thanks for your advice.
答案1
得分: 1
以下是已翻译的内容:
我找到了它。其实相当简单,有一个名为${DEPLOY_DIR_IMAGE}的变量,指向build/tmp/deploy/images/raspberrypi4。所以这就是我的解决方案。
SUMMARY = "恢复数据包"
DESCRIPTION = ""
HOMEPAGE = ""
LICENSE = "封闭"
EXTRA_IMAGEDEPENDS = "main-image"
do_install() {
install -d ${D}/usr/static
install ${DEPLOY_DIR_IMAGE}/main-image-raspberrypi4.wic.bz2 ${D}/usr/static
}
FILES:${PN} += "/usr/static"
英文:
Well, I have found it. It's actually pretty easy, there is ${DEPLOY_DIR_IMAGE} variable, which points to build/tmp/deploy/images/raspberrypi4. So there is my solution.
SUMMARY = "Recovery data package"
DESCRIPTION = ""
HOMEPAGE = ""
LICENSE = "CLOSED"
EXTRA_IMAGEDEPENDS = "main-image"
do_install() {
install -d ${D}/usr/static
install ${DEPLOY_DIR_IMAGE}/main-image-raspberrypi4.wic.bz2 ${D}/usr/static
}
FILES:${PN} += "/usr/static"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论