无法在 yocto 中将文件复制到我的目标设备
Can't copy files to my target device in yocto
我无法获取将一些文件复制到目标设备的方法。
目前我的 yocto 项目的图层如下所示:
layer path priority
==========================================================================
meta /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta 5
meta-tegra /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra 5
contrib /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra/contrib 4
meta-oe /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-oe 6
meta-python /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-python 7
meta-networking /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-networking 5
meta-filesystems /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-filesystems 6
meta-virtualization /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-virtualization 8
meta-tegra-community /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-community 20
meta-tegra-support /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-support 40
meta-demo-ci /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-demo-ci 40
meta-tegrademo /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegrademo 50
workspace /home/juanpablo/work/yocto/tegra-demo-distro/build/workspace 99
meta-mine /home/juanpablo/work/yocto/meta-kwali 6
meta-mine 层是我用一个配方创建的层,用于复制图像中的文件,然后我将闪存到 jetson-nano-devkit 的 sd 卡。
配方log-generators_0.1.bb有以下内容:
DESCRIPTON = "A template recipe to copy files from host directory to target. \
The example is written with docker-compose files"
LICENSE = "CLOSED"
SRC_URI = "file://.env \
file://docker-compose.yml \
"
FILES_${PN} += "/test"
inherit allarch
do_install() {
install -d ${D}/test
install -m 0755 ${WORKDIR}/.env ${D}/test/
install -m 0755 ${WORKDIR}/docker-compose.yml ${D}/test/
}
我已经尝试按照 wiki 的食谱食谱以及 SO 中发布的类似问题的 2 或 3 个答案(例如还定义 ${S} = ${WORKDIR},不使用 inherit allaarch 等)。
欢迎任何建议或帮助。
我在我的设置中尝试了你的确切配方,它似乎工作正常。
bitbake log-generators
在 build/tmp/deploy/ipk/all/
目录中生成 log-generators{,-dbg,-dev}_0.1-r0_all.ipk
(我碰巧使用 ipk)包。
在检查 log-generators_0.1-r0_all.ipk
时,我可以在 /test 中看到正确的文件。
如果您没有在目标映像中看到这些文件,我的最佳猜测是您需要在映像的安装列表中引用该包。最简单的方法是将其添加到您的 local.conf
:
IMAGE_INSTALL_append = " log-generators "
我无法获取将一些文件复制到目标设备的方法。
目前我的 yocto 项目的图层如下所示:
layer path priority
==========================================================================
meta /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta 5
meta-tegra /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra 5
contrib /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra/contrib 4
meta-oe /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-oe 6
meta-python /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-python 7
meta-networking /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-networking 5
meta-filesystems /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-filesystems 6
meta-virtualization /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-virtualization 8
meta-tegra-community /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-community 20
meta-tegra-support /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegra-support 40
meta-demo-ci /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-demo-ci 40
meta-tegrademo /home/juanpablo/work/yocto/tegra-demo-distro/layers/meta-tegrademo 50
workspace /home/juanpablo/work/yocto/tegra-demo-distro/build/workspace 99
meta-mine /home/juanpablo/work/yocto/meta-kwali 6
meta-mine 层是我用一个配方创建的层,用于复制图像中的文件,然后我将闪存到 jetson-nano-devkit 的 sd 卡。
配方log-generators_0.1.bb有以下内容:
DESCRIPTON = "A template recipe to copy files from host directory to target. \
The example is written with docker-compose files"
LICENSE = "CLOSED"
SRC_URI = "file://.env \
file://docker-compose.yml \
"
FILES_${PN} += "/test"
inherit allarch
do_install() {
install -d ${D}/test
install -m 0755 ${WORKDIR}/.env ${D}/test/
install -m 0755 ${WORKDIR}/docker-compose.yml ${D}/test/
}
我已经尝试按照 wiki 的食谱食谱以及 SO 中发布的类似问题的 2 或 3 个答案(例如还定义 ${S} = ${WORKDIR},不使用 inherit allaarch 等)。
欢迎任何建议或帮助。
我在我的设置中尝试了你的确切配方,它似乎工作正常。
bitbake log-generators
在 build/tmp/deploy/ipk/all/
目录中生成 log-generators{,-dbg,-dev}_0.1-r0_all.ipk
(我碰巧使用 ipk)包。
在检查 log-generators_0.1-r0_all.ipk
时,我可以在 /test 中看到正确的文件。
如果您没有在目标映像中看到这些文件,我的最佳猜测是您需要在映像的安装列表中引用该包。最简单的方法是将其添加到您的 local.conf
:
IMAGE_INSTALL_append = " log-generators "