RK3568-OpenHarmony(1) : OpenHarmony 5.1的编译
概述:
本文主要描述了,如何在ubuntu-20.04操作系统上,编译RK3568平台的OpenHarmony 5.1版本。
搭建编译环境
a. 安装软件包
sudo apt-get install git-lfs ruby genext2fs build-essential git curl libncurses5-dev libncursesw5-dev openjdk-11-jdk python3 python3-pip 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 u-boot-tools mtd-utils scons default-jdk
b. 更改系统的shell环境为bash
sudo dpkg-reconfigure dash 选择no 然后保存
同步源码
mkdir RK3568_Harmony
cd RK3568_Harmony
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > repo
chmod a+x repo
./repo init -u OpenHarmony/manifest -b OpenHarmony-5.1.0-Release --no-repo-verify
./repo sync -c -j16
./repo forall -c 'git lfs pull'
编译
1. 执行prebuilts
#在源码根目录下执行脚本,安装编译器及二进制工具
cd RK3568_Harmony
./build/prebuilts_download.sh
2. 执行编译
./build.sh --product-name rk3568
编译完成后,会有如下显示:
build system image successful.
=====build RK3568 successful.
生成的固件保存在out/rk3568/packages/phone/images目录下,生成的文件有