yocto 项目 runqemu:找不到命令
我正在设置我的 yocto 项目,为此我遵循了以下步骤:
下载 Poky 源代码(ubuntu:
/yocto/source
)$ git clone git://git.yoctoproject.org/poky
查看最新的分支/版本 (zeus)
$ git checkout zeus
第 3 步:准备构建环境(ubuntu:
/yocto/source/poky
)$ 源 oe-init-build-env ../../build
上面的脚本将移动到构建文件夹中,并在conf文件夹内的conf文件夹中创建两个文件(
local.conf
,bblayers.conf
)构建Linux发行版(unbuntu:
/yocto/build
)$ bitbake core-image-minimal
检查
runqemu
(ubuntu:/yocto/source/poky/scripts
)$ ls runqemu // 它就在那里
在qemu中运行生成的图像(ubuntu:
/yocto/build)
$ runqemu qemux86-64 core-image-minimal
为 qemu 打开其他窗口,并且图像运行良好。
问题
第一次使用后,当我关闭终端,并通过在 /yocto/build
中运行 runqemu qemux86-64 core-image-minimal
再次使用它时,会弹出错误
runqemu:找不到命令
,如果我在 poky 目录中写入 bitbake
,则会弹出相同的错误
bitbake:未找到命令。
注意:我已重复整个过程 3 次,以检查安装是否不正确,但我这边一切都做得很好。
yocto 项目层次结构:
I am setting up my yocto project, for that I have followed these below steps:
download the Poky Source code (ubuntu:
/yocto/source
)$ git clone git://git.yoctoproject.org/poky
Checkout the latest branch/release (zeus)
$ git checkout zeus
Step 3: Prepare the build environment (ubuntu:
/yocto/source/poky
)$ source oe-init-build-env ../../build
The above script will move in a build folder and create two files in conf folder (
local.conf
,bblayers.conf
) inside conf folderBuilding Linux Distribution (unbuntu:
/yocto/build
)$ bitbake core-image-minimal
Checking the
runqemu
(ubuntu:/yocto/source/poky/scripts
)$ ls runqemu // and it is there
Run generated image in qemu (ubuntu:
/yocto/build
)$ runqemu qemux86-64 core-image-minimal
other window open for qemu and image runs well.
Problem
After using the first time when I close the terminal, and use it again by running runqemu qemux86-64 core-image-minimal
in /yocto/build
the error pops up
runqemu: command not found
and if I write bitbake
in poky directory the same error pops up
bitbake: command not found.
NOTE: I have repeat this whole process 3 times to check if the installation is not correct but i have done everything fine from my side.
yocto project hierarchy:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您关闭了狭小的环境终端,您始终
必须
重新source
环境。poky 的 oe-init-build-env 会为您设置所有命令,例如:
poky/scripts 中存在的
runqemu*
命令。该脚本还从
poky/bitbake/bin
导出bitbake*
命令。负责该操作的行位于:
因此,如果您打开新终端,则始终:
编辑
如果您已经有构建文件夹,请确保为该文件夹提供到 oe-init-build-env 脚本的正确路径。
如果您提供不存在文件夹的新路径,则脚本将为您创建另一个版本。
编辑2
根据您的路径获取狭隘环境:
规则
如果
存在,则,poky 将获取现有的构建环境。如果
不存在,poky 将以相同的名称和路径创建新的构建。If you close your poky environment terminal you always
MUST
re-source
the environment.The poky's
oe-init-build-env
setups up all commands for you, for instance:runqemu*
commands which are present inpoky/scripts
.The script also export
bitbake*
commands frompoky/bitbake/bin
.The line responsible for that is in:
So, always if you open new terminal:
EDIT
If you already have a build folder, make sure to provide the right path for that folder to the
oe-init-build-env
script.If you provide new path to non-existing folder, than the script will create another build for you.
EDIT2
To source poky environment according to your path:
THE RULE
If
<path/to/build/folder>
exists then, poky will source the existing build environment.If
<path/to/build/folder>
does not exist, poky will create new build under the same name and path.