记录harmony代码下载与编译学习过程,只记录一些重点常用信息
harmony资料
https://gitee.com/openharmony/docs/tree/master/zh-cn
代码下载
我用ssh方式,http方式我就不记了,参考gitee网站
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c ‘git lfs pull’
这里git lfs pull问题搞了很多事,后续另外记录吧
编译环境
安装docker
sudo apt-get install docker.io
给各用户加入docker组群,不要用root运行docker
sudo usermod -a -G docker userName
id userName就能看到Group中包含了docker
把该用户所有打开的终端窗口,关闭重开,使用docker version就能看到实现支持使用了
获取docker镜像
参考gitee网站
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8
在harmony的代码根目录运行docker
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8
编译Harmony
在docker环境下执行以下命令
bash build/prebuilts_download.sh
./build.sh --product-name Hi3516DV300 --ccache | tee build_hi3516dv300.log