This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
library:rk3568:openharmony [2023/08/15 17:26] lhaosen [获取Firefly补丁源码] |
library:rk3568:openharmony [2023/08/15 17:57] (current) lhaosen [4. 源码编译] |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== - 安装依赖包 ===== | ===== - 安装依赖包 ===== | ||
sudo apt-get update | sudo apt-get update | ||
- | sudo apt-get install binutils git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby repo | + | sudo apt-get install binutils git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby repo docker.io |
| | ||
Line 39: | Line 39: | ||
| | ||
===== - 获取docker ===== | ===== - 获取docker ===== | ||
+ | |||
+ | |||
+ | ==== 设置docker权限(如必要) ==== | ||
+ | sudo groupadd docker | ||
+ | sudo gpasswd -a ${USER} docker | ||
+ | newgrp docker | ||
+ | |||
==== 获取Docker镜像 ==== | ==== 获取Docker镜像 ==== | ||
Line 55: | Line 62: | ||
进入docker进行编译 | 进入docker进行编译 | ||
- | 进入docker | + | # 进入docker |
docker exec -it openharmony /bin/bash | docker exec -it openharmony /bin/bash | ||
- | | + | # 下载工具链(首次编译必须) |
- | | + | |
bash build/ | bash build/ | ||
- | # | + | # 编译 |
./build.sh --product-name rk3568 --ccache | ./build.sh --product-name rk3568 --ccache | ||
编译完成之后,镜像在 out/ | 编译完成之后,镜像在 out/ | ||