31,515
社区成员




安装ubuntu
rice@rice:~$ sudo apt-get autoremove open-vm-tools
rice@rice:~$ sudo apt-get install open-vm-tools-desktop
安装git
rice@rice:~$ sudo apt-get install git
...
rice@rice:~$ git config --global user.email "you@example.com"
rice@rice:~$ git config --global user.name "Your Name"
安装python3.8
rice@rice:~$ sudo apt-get install python3.8
rice@rice:~$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
rice@rice:~$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
sudo cp apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
安装docker
rice@rice:~/xr806$ sudo apt install docker.io
环境搭建完成
创建xr806
rice@rice:~$ mkdir xr806
rice@rice:~$ cd xr806
下载的repo文件
rice@rice:~/xr806$ git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
rice@rice:~/xr806$ vim git-repo/repo
rice@rice:~/xr806/$ sudo cp git-repo/repo /usr/bin/
下载系统源码
rice@rice:~/xr806$ mkdir code
rice@rice:~/xr806$ cd code
rice@rice:~/xr806/code$ repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony_1.0.1_release --no-repo-verify
rice@rice:~/xr806/code$ repo sync -c
rice@rice:~/xr806/code$ repo forall -c 'git lfs pull'
下载xr806源码
rice@rice:~/xr806/code$ cd device/
rice@rice:~/xr806/code/device$ git clone https://gitee.com/moldy-potato-chips/devboard_device_allwinner_xr806.git
rice@rice:~/xr806/code/device$ mv devboard_device_allwinner_xr806/ xradio
rice@rice:~/xr806/code/device$ cd ../
rice@rice:~/xr806/code$ cd vendor/
rice@rice:~/xr806/code/vendor$ git clone https://gitee.com/moldy-potato-chips/devboard_vendor_allwinner_xr806.git
rice@rice:~/xr806/code/vendor$ mv devboard_vendor_allwinner_xr806/ xradio
交叉编译工具
rice@rice:~/xr806$ mkdir tool
rice@rice:~/xr806$ cd tool
rice@rice:~/xr806/tool$ wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
rice@rice:~/xr806/tool$ tar -jxvf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
下载Open鸿蒙的适配好的docker
rice@rice:~/xr806$ docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
rice@rice:~/xr806$ sudo docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
修改交叉编译工具
root@c2aa13139a52:/home/openharmony# cd code/device/xradio/xr806/liteos_m
root@c2aa13139a52:/home/openharmony/code/device/xradio/xr806/liteos_m# vim config.gni
root@c2aa13139a52:/home/openharmony# cd code/device/xradio/xr806/xr_skylark
SDK配置
root@c2aa13139a52:/home/openharmony/code/device/xradio/xr806/xr_skylark# make menuconfig
root@c2aa13139a52:/home/openharmony/code/device/xradio/xr806/xr_skylark# apt-get install libncurses5-dev
make build_clean
make lib -j
系统源码编译
root@c2aa13139a52:/home/openharmony/code#
烧录代码
运行效果
关注微信公众号『Rice嵌入式开发技术分享』,后台回复“微信”添加作者微信,备注”入群“,便可邀请进入技术交流群。
写的非常好,受益匪浅