RK3568 OH5.1 搭建环境及源码获取

张开发
2026/6/2 4:16:35 15 分钟阅读
RK3568 OH5.1 搭建环境及源码获取
安装编译所需的库和工具集sudo apt-get update; sudo apt-get install binutils; sudo apt-get install binutils-dev; sudo apt-get install git; sudo apt-get install git-lfs; sudo apt-get install gnupg; sudo apt-get install flex; sudo apt-get install bison; sudo apt-get install gperf; sudo apt-get install build-essential; sudo apt-get install zip; sudo apt-get install curl; sudo apt-get install zlib1g-dev; sudo apt-get install gcc-multilib; sudo apt-get install g-multilib; sudo apt-get install gcc-arm-linux-gnueabi; sudo apt-get install libc6-dev-i386; sudo apt-get install libc6-dev-amd64; sudo apt-get install lib32ncurses5-dev; sudo apt-get install x11proto-core-dev; sudo apt-get install libx11-dev; sudo apt-get install lib32z1-dev; sudo apt-get install ccache; sudo apt-get install libgl1-mesa-dev; sudo apt-get install libxml2-utils; sudo apt-get install xsltproc; sudo apt-get install unzip; sudo apt-get install m4; sudo apt-get install bc; sudo apt-get install gnutls-bin; sudo apt-get install python3.9; sudo apt-get install python3-pip; sudo apt-get install ruby; sudo apt-get install genext2fs; sudo apt-get install device-tree-compilersudo apt-get install make; sudo apt-get install libffi-dev; sudo apt-get install e2fsprogs; sudo apt-get install pkg-config; sudo apt-get install perl; sudo apt-get install openssl; sudo apt-get install libssl-dev; sudo apt-get install libelf-dev; sudo apt-get install libdwarf-dev; sudo apt-get install u-boot-tools; sudo apt-get install mtd-utils; sudo apt-get install cpio; sudo apt-get install doxygen; sudo apt-get install liblz4-tool; sudo apt-get install openjdk-8-jre; sudo apt-get install gcc; sudo apt-get install g; sudo apt-get install texinfo; sudo apt-get install dosfstools; sudo apt-get install mtools; sudo apt-get install default-jre; sudo apt-get install default-jdk; sudo apt-get install libncurses5; sudo apt-get install apt-utils; sudo apt-get install wget; sudo apt-get install scons; sudo apt-get install python3.9-distutils; sudo apt-get install tar; sudo apt-get install rsync; sudo apt-get install git-core; sudo apt-get install libxml2-dev; sudo apt-get install lib32z-dev; sudo apt-get install grsync; sudo apt-get install xxd; sudo apt-get install libglib2.0-dev; sudo apt-get install libpixman-1-dev; sudo apt-get install kmod; sudo apt-get install jfsutils; sudo apt-get install reiserfsprogs; sudo apt-get install xfsprogs; sudo apt-get install squashfs-tools; sudo apt-get install pcmciautils; sudo apt-get install quota; sudo apt-get install ppp; sudo apt-get install libtinfo-dev; sudo apt-get install libtinfo5; sudo apt-get install libncurses5-dev; sudo apt-get install libncursesw5; sudo apt-get install libstdc6; sudo apt-get install gcc-arm-none-eabi; sudo apt-get install vim; sudo apt-get install ssh; sudo apt-get install locales; sudo apt-get install libxinerama-dev; sudo apt-get install libxcursor-dev; sudo apt-get install libxrandr-dev; sudo apt-get install libxi-dev以上安装命令适用于Ubuntu18.04其他版本请根据安装包名称采用对应的安装命令。其中Python要求安装Python 3.8及以上版本此处以Python 3.8为例。Java要求java8及以上版本此处以java8为例。若您使用的是Ubuntu20及以上版本由于gcc-multilib和gcc-arm-linux-gnueabi互斥请勿安装gcc-arm-linux-gnueabi。执行过程中需要多次点击回车以确认安装所需的库和工具修改默认shellOH编译需要用到bash。执行下列命令查看系统默认shellls -l /bin/sh如果/bin/sh软链接指向bash则不需要修改。如果不是执行下列命令然后选择否NOsudo dpkg-reconfigure dash源码获取前提条件注册码云gitee帐号。注册码云SSH公钥请参考码云帮助中心。安装git客户端和git-lfs并配置用户信息。sudo apt install git git-lfsgit config --global user.name yourname git config --global user.email your-email-address git config --global credential.helper store安装码云repo工具可以执行如下命令。mkdir oh5.1 cd oh5.1 curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 repo chmod ax repo pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests通过repo获取方式一推荐通过repo ssh 下载需注册公钥请参考码云帮助中心。从版本分支获取源码。可获取该版本分支的最新源码包括版本发布后在该分支的合入。repo init -u gitgitee.com:openharmony/manifest.git -b OpenHarmony-5.1.0-Release --no-repo-verify repo sync -c repo forall -c git lfs pull从版本发布Tag节点获取源码。可获取与版本发布时完全一致的源码。repo init -u gitgitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v5.1.0-Release --no-repo-verify repo sync -c repo forall -c git lfs pull方式二通过repo https 下载。从版本分支获取源码。可获取该版本分支的最新源码包括版本发布后在该分支的合入。repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-5.1.0-Release --no-repo-verify repo sync -c repo forall -c git lfs pull从版本发布Tag节点获取源码。可获取与版本发布时完全一致的源码。repo init -u https://gitee.com/openharmony/manifest -b refs/tags/OpenHarmony-v5.1.0-Release --no-repo-verify repo sync -c repo forall -c git lfs pull从镜像站点获取表1获取源码路径版本源码版本信息下载站点SHA256校验码软件包容量全量代码标准、轻量和小型系统5.1.0 Release站点SHA256校验码49.1 GBHi3861解决方案二进制5.1.0 Release站点SHA256校验码28.4 MBHi3516解决方案-LiteOS二进制5.1.0 Release站点SHA256校验码350.0 MBHi3516解决方案-Linux二进制5.1.0 Release站点SHA256校验码223.6 MBRK3568标准系统解决方案二进制5.1.0 Release站点SHA256校验码9.7 GB标准系统Public SDK包Mac5.1.0.107站点SHA256校验码1.3 GB标准系统Public SDK包Mac-M15.1.0.107站点SHA256校验码1.2 GB标准系统Public SDK包Windows/Linux5.1.0.107站点SHA256校验码3.2 GB官方说推荐repossh方式下载源码我个人推荐站点下载repo方式下载断断续续下载源码过程老是出现各种错误啥用站点方式下载只要复制下载链接然后wget 链接下载。

更多文章