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
- Register code cloud gitee account。
- Register Code Cloud SSH public key, please refer to Code Cloud Help Center。
- Install the git client and git-lfs and configure the user information。
git config --global user.name "yourname"
git config --global user.email "your-email-address"
git config --global credential.helper store
- To install the code cloud repo tool, you can execute the following command。
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 >
/usr/local/bin/repo
/*
If you don’t have permission, you can download it to another directory and configure it in the environment variable.
*/
chmod a+x /usr/local/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
- Steps to get the source code
repo init -u https://gitee.com/youyeetoo/yy3568-openharmony -b master
repo sync -c
repo forall -c 'git lfs pull'
- Install compiler and binary tools
bash build/prebuilts_download.sh
- Compile the code
./build.sh --product-name yy3568 –ccache
- Compilation results
youyeetoo@youyeetoo:~/yy3568/code$ ./build.sh --product-name yy3568 –ccache
++++++++++++++++++++++++++++++++++++++++
The system shell is bash 5.0.17(1)-release
++++++++++++++++++++++++++++++++++++++++
2023-06-07 14:17:17
--product-name yy3568 –ccache
gcc-arm-linux-gnueabi is not installed. please install it.
......
[OHOS INFO] c overall build overlap rate: 1.06
[OHOS INFO]
[OHOS INFO]
[OHOS INFO] yy3568 build success
[OHOS INFO] cost time: 0:05:30
=====build successful=====
2023-06-07 14:22:47
++++++++++++++++++++++++++++++++++++++++
- After compilation, the firmware is generated to the directory:
youyeetoo@youyeetoo:~/yy3568/code/out/yy3568/packages/phone/images$ ls
boot_linux.img config.cfg parameter.txt resource.img system.img updater.img vendor.img
chip_prod.img MiniLoaderAll.bin ramdisk.img sys_prod.img uboot.img userdata.img
youyeetoo@youyeetoo:~/yy3568/code/out/yy3568/packages/phone/images$