初始化 openvela 仓库时出现以下错误:
repo init --partial-clone -u git@gitee.com:open-vela/manifests.git -b dev -m openvela.xml --git-lfs
未正确设置 SSH 公钥,导致无法通过 SSH 协议访问 Gitee 或 GitHub 远程仓库。
参考官方文档完成 SSH 公钥的生成和配置:
运行 repo 初始化命令时,出现以下错误:
fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connect to gerrit.googlesource.com
网络限制、镜像源区域限制或 DNS 解析问题导致无法访问 Google 的代码仓库。
永久修改 repo 源:
# 查找repo脚本路径
which repo
# 例如执行结果为 /usr/bin/repo
# 切换清华源, /usr/bin/repo 换为实际文件路径
sed -i 's#https://gerrit.googlesource.com/git-repo#https://mirrors.tuna.tsinghua.edu.cn/git/git-repo#' /usr/bin/repo
# 或切换到中科大源(备用,如果清华源出现不稳定情况可以替换),/usr/bin/repo 换为实际文件路径
sed -i 's#https://gerrit.googlesource.com/git-repo#https://mirrors.ustc.edu.cn/aosp/git-repo#' /usr/bin/repo
临时修改 repo 源:
# 清华源
repo init xxxxxx --repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
# 中科大源(备用)
repo init xxxxxx --repo-url=https://mirrors.ustc.edu.cn/aosp/git-repo
执行 repo sync
命令时中断,出现 fatal: early EOF 错误。
切换为 HTTPS 协议进行下载。
Github:
repo init --partial-clone -u https://github.com/open-vela/manifests.git -b dev -m openvela.xml --git-lfs
# Install Git LFS (Large File Storage) for managing large files
sudo apt install git-lfs
cd .repo/manifests
git lfs install
git lfs --version
cd ../../
Gitee:
repo init --partial-clone -u https://gitee.com/open-vela/manifests.git -b dev -m openvela.xml --git-lfs
# Install Git LFS (Large File Storage) for managing large files
sudo apt install git-lfs
cd .repo/manifests
git lfs install
git lfs --version
cd ../../
代码同步过程中终端被终止,查看 /var/log/syslog
发现 OOM 相关日志。
在 Ubuntu 22.04 及以上版本中,当内存使用率超过 50% 且持续 20 秒以上,且该内存无法被回收时,systemd-oomd
进程会终止占用大量内存的进程。
物理内存低于 16GB。
暂时关闭 systemd-oomd 守护进程:
sudo systemctl stop systemd-oomd systemd-oomd.socket
sudo systemctl status systemd-oomd
下载完成后重新启用守护进程:
sudo systemctl start systemd-oomd systemd-oomd.socket
sudo systemctl status systemd-oomd
首次编译时出现大文件相关错误:
该问题通常由 Git 大文件存储(Git LFS)文件未正确下载导致,可能由以下原因引起:
检查 repo 版本:
repo --version
确认 repo 版本兼容性:
版本号 | 发布日期 | 支持情况 |
---|---|---|
v2.4 | 2021-01 | 实验性支持,部分功能不稳定 |
v2.10 | 2022-03 | 正式支持 |
v2.22 | 2023-至今 | 默认启用,功能稳定 |
版本过低时更新 repo:
如果版本低于 v2.22,建议参考准备开发环境重新安装 repo 命令。
运行模拟器时出现以下错误:
./emulator.sh vela
错误提示:
No Qt platform plugin could be initialized
源代码路径中包含中文字符,导致工具无法正确解析路径。
将源码移动到不包含中文字符的目录路径中。
以 qemu-armv7a:nsh 为例,提供两种编译方式:
使用 build.sh
脚本进行编译:
# 使用改进的 build.sh 脚本
./build.sh qemu-armv7a:nsh -j12
使用 configure.sh
脚本进行编译:
# 使用 NuttX 自带的配置脚本
./tools/configure.sh -l qemu-armv7a:nsh
make -j12
build.sh
脚本对编译流程进行了优化,操作更简便,建议优先使用。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。