本文來源電子發(fā)燒友社區(qū),作者:胡智元, 帖子地址:https://bbs.elecfans.com/jishu_2306394_1_1.html
接下來主要給大家分享一下,如何在Ubuntu下進(jìn)行環(huán)境的搭建,并且后期所有的操作全部在Ubuntu下運(yùn)行。本人使用的Ubuntu是18.04版本
第一:系統(tǒng)要求
- Windows系統(tǒng)要求:Windows10 64位系統(tǒng)。
2、 Ubuntu系統(tǒng)要求:Ubuntu18.04~21.10版本,內(nèi)存推薦16 GB及以上
第二:安裝必要的庫和開發(fā)工具
編譯OpenHarmony需要一些庫和工具,可以進(jìn)行在線安裝。
- 輸入命令為:
sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 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 genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev
- 部分命令運(yùn)行效果如下
3、python 3.8版本設(shè)置
查看python3.8的位置
命令如下:which python3.8
sudo update-alternatives --install /usr/bin/python python {python3.8 路徑} 1 #{python3.8 路徑}為上一步查看的python3.8的位置
sudo update-alternatives --install /usr/bin/python3 python3 {python3.8 路徑} 1 #{python3.8 路徑}為上一步查看的python3.8的位置
4、將Ubuntu的 shell環(huán)境修改為bash
輸入命令: ls –l /bin/sh
打開終端,執(zhí)行如下命令,輸入密碼,選擇No
輸入命令:sudo dpkg-reconfigure dash
第三:源碼獲取方法
- 更新軟件源
命令:sudo apt-get update
- 通過以下命令安裝
命令:sudo apt-get install git git-lfs
- 配置用戶信息
git config --global user.name "yourname"
git config --global user.email "your-email-address"
git config --global credential.helper store
- 執(zhí)行如下命令安裝repo工具
mkdir ~/bin
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ~/bin/repo
chmod a+x ~/bin/repo
pip3 install -ihttps://repo.huaweicloud.com/repository/pypi/simplerequests
- 將repo添加到環(huán)境變量
vim ~/.bashrc # 編輯環(huán)境變量
export PATH=~/bin:$PATH # 在環(huán)境變量的最后添加一行repo路徑信息
source ~/.bashrc # 應(yīng)用環(huán)境變量
- 獲取源碼
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
或者使用repo+https下載
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
最終:需要在源碼目錄下執(zhí)行prebuilts腳本,安裝編譯器及二進(jìn)制工具
bash build/prebuilts_download.sh
附上詳細(xì)DAYU200體驗(yàn)視頻,具體看作者原帖子內(nèi)容。
-
dayu200
+關(guān)注
關(guān)注
1文章
26瀏覽量
1280 -
潤和軟件
+關(guān)注
關(guān)注
1文章
283瀏覽量
958
發(fā)布評論請先 登錄
相關(guān)推薦
發(fā)布|CAE1200+FPGA開發(fā)板

【ELF 2學(xué)習(xí)板試用】ELF2開發(fā)板開箱體驗(yàn)及基本使用環(huán)境搭建
【貝啟科技BQ3568HM開源鴻蒙開發(fā)板深度試用報(bào)告】開箱帖
dayu200 rk3568 openharmony5.0 sim卡 通話服務(wù)
【敏矽微ME32G070開發(fā)板免費(fèi)體驗(yàn)】開箱及環(huán)境搭建
【RA-Eco-RA4E2-64PIN-V1.0開發(fā)板試用】1、開發(fā)板開箱與環(huán)境搭建
使用Dockerfile搭建潤和WS63E的開發(fā)環(huán)境
【RA-Eco-RA0E1-32PIN-V1.0開發(fā)板試用】開箱+環(huán)境搭建 終于會用HAL框架了,環(huán)境搭建玩成了!
盤古200 pro開發(fā)板
【RA-Eco-RA2E1-48PIN-V1.0開發(fā)板試用】1、開箱+環(huán)境搭建
【RA-Eco-RA0E1-32PIN-V1.0開發(fā)板試用】開箱+環(huán)境搭建
ElfBoard技術(shù)貼|如何在ELF 1開發(fā)板上搭建流媒體服務(wù)器

潤開鴻“龍芯+OpenHarmony”開發(fā)平臺DAYU431先鋒派新品發(fā)布

盤古200K開發(fā)板,紫光同創(chuàng)PG2L200H,Logos2系列,資源豐富,功能強(qiáng)大
【鴻蒙】OpenHarmony運(yùn)行docker詳細(xì)步驟

評論