1,输入repo init时提示
/usr/bin/env: ‘python’: No such file or directory
解决:
五花八门,如果是Ubuntu自带Python3都版本,可以直接链接Python3 到Python指令解决
sudo ln -s /usr/bin/python3 /usr/bin/python
如果没有预装的,就安装一个Python吧
2,repo 了清华源,提示
fatal: unable to access 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/': server certificate verification failed. CAfile: none CRLfile: none
解决:
把源的https改成http……
3,编译报错
error: conflictiong types for 'fd_set'
……
fd_set
解决:
编译链工具版本过高,改回gcc-arm-none-eabi-10-2020-q4-major版本。。
linux x86_64:
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
Windows
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.exe
linux ARM64
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-aarch64-linux.tar.bz2
MAC OS X
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-mac.pkg
4,命令报错
hb: command not found
到 xr806-dev\build目录下
执行
pip3 install --user build/lite
编译鸿蒙的hb工具(hb是HarmonyOS2.0里新增加的编译构建命令行工具。需要Python 3.7.4及以上版本的支持)
5,命令报错
[OHOS ERROR] clang not found, install it please
鸿蒙依赖的llvm
https://repo.huaweicloud.com/harmonyos/compiler/clang/latest/linux/llvm.tar.gz
解压后将bin添加到你的PATH
6,命令报错
[OHOS ERROR] gn not found, install it please
鸿蒙依赖的gn
下载ninja
https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.10.1/linux/ninja-linux-x86-1.10.1.tar.gz
下载gn
https://repo.huaweicloud.com/harmonyos/compiler/gn/latest/linux/gn-linux-x86-1717.tar.gz
解压后添加到你的PATH
然后基本就能愉快的编译了。
7,编译后镜像输出的目录:
xr806-dev\device\xradio\xr806\xr_skylark\out
然后就是装串口驱动,烧录……enjoy~