Hongmeng source download and compile

Chapter 1 Download the source code and compile

1.1 Install development environment in Ubuntu

If you read the documentation from the beginning and follow the documentation, then you have downloaded and ran this script according to "5.2 Installing Ubuntu Software": Configuring_ubuntu.sh. If you read the document halfway, please follow "5.2 Install Ubuntu Software" once.

This script was updated after the release of Hongmeng. For our old students, we also need to download and execute it again.

Let's analyze this script.

First, it will do some checks, and then list a menu for you to choose from:
Insert picture description here
in this menu, you can choose one of these three items:
Insert picture description here
in fact, the first item contains the second item, whether you are developing Hongmeng or Linux, both The first item can be selected.

Assuming you choose the first item, the script will execute the following functions:
Insert picture description here
You can know from the name of each function in the above figure, it will do these things: set Ubuntu software source, install general software (such as GCC, manual manual) , Install Linux development software (such as NFS, SAMBA), install Hongmeng development software (such as llvm).

1.2 Download and compile Hongmeng kernel Liteos-a

The things to do in this section are: configure GIT, install repo (repo is used to manage multiple git repositories), download source code, and compile.

1.2.1 Configure GIT

需要在ubuntu下执行如下命令来配置GIT客户端的用户信息,比如(下面命令的用户名、邮箱可以随便写):
git config --global user.name "100ask"
git config --global user.email "[email protected]"
git config --global credential.helper store

Insert picture description here

1.2.2 Install repo

The repo tool is a command used to manage multiple GIT repositories, execute the following command to install:

curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > repo
sudo cp repo  /usr/local/bin/repo && sudo chmod a+x /usr/local/bin/repo
sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests

Insert picture description here
Insert picture description here

1.2.3 Download source code

Execute the following command to download:

cd /home/book
mkdir  openharmony
cd  openharmony
repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-1.0
repo sync -c -j8

Note: Hongmeng kernel is frequently updated, we must lock a certain version when we lecture. As Hongmeng pioneers, we currently use the first "OpenHarmony-1.0". Don't be misled by "1.0", the branch version of its kernel in GITEE belongs to "Hongmeng 2.0".
Insert picture description here
Prompt after synchronization is complete
Insert picture description here

1.2.4 Compile the official version

We first compile Liteos-a for the official board hi3518ev300 to make sure that the environment is not problematic. Then apply the IMX6ULL patch to compile Hongmeng for IMX6ULL.
Enter the root directory of the source code and execute the following command:

cd  /home/book/openharmony
python build.py ipcamera_hi3518ev300 -b debug

After waiting for a while, the result is as follows:
Insert picture description here
We do not plan to use hi3518ev300, the above command is just to make sure that the development environment is OK.

And there are many libraries in rootfs.tar, such as libfreetype.so, which can be used directly in the future.

Full text download
Technical Exchange Group (
Hongmeng Development/Linux/Embedded/Driver/Data Download) QQ Group: 869222007

Guess you like

Origin blog.csdn.net/thisway_diy/article/details/108666219