|
@@ -1,87 +1,99 @@
|
|
|
-# 1 Overview
|
|
|
+# Overview
|
|
|
|
|
|
This article describes how to download and compile the TH1520 Linux SDK using the Linux Yocto build environment. The Linux SDK contains source code and binary files, which support users to develop Linux applications and build a complete image running on the evt development board.
|
|
|
|
|
|
- SDK code repository: https://gitee.com/thead-yocto
|
|
|
-- SDK code repository tag: **Linux_SDK_V1.0.3**
|
|
|
+- SDK code repository tag: **Linux_SDK_V1.1.2**
|
|
|
|
|
|
-# 2 Build the Compilation Environment
|
|
|
+# Build the Compilation Environment
|
|
|
|
|
|
The Linux SDK uses Yocto to build images. The Yocto compilation environment uses Ubuntu 18.04. It is recommended to use Linux + docker for deployment. You can also build a compilation environment directly on the Ubuntu system. For the specific method of setting up the environment, please check the document: "[T-Head_Yeying1520_Yocto_User_Guide.pdf](https://gitee.com/thead-yocto/documents/blob/master/en/user_guide/T-Head_Yeying1520_Yocto_User_Guide.pdf)".
|
|
|
|
|
|
-# 3 Download
|
|
|
-
|
|
|
-1. Download the Yocto buildpack (without SDK source code):
|
|
|
-
|
|
|
- ```
|
|
|
- git clone https://gitee.com/thead-yocto/xuantie-yocto.git -b Linux_SDK_V1.0.3
|
|
|
- ```
|
|
|
+# Download
|
|
|
|
|
|
+0. Download open source software packages (only download when you get the SDK for the first time):
|
|
|
|
|
|
+ Open source software packages are downloaded from the network when building. The download time varies greatly depending on different networks and network speeds. Some open source software is located in GitHub repositories, and download may fail due to the domestic network environment. To speed up the process, you can go to gitee to download offline open source packages:
|
|
|
|
|
|
-2. Download open source software packages (only download when you get the SDK for the first time):
|
|
|
+ ```
|
|
|
+ cd ~
|
|
|
+ git clone https://gitee.com/thead-yocto/yocto-downloads.git
|
|
|
+ ```
|
|
|
|
|
|
- Open source software packages are downloaded from the network when building. The download time varies greatly depending on different networks and network speeds. Some open source software is located in GitHub repositories, and download may fail due to the domestic network environment. To speed up the process, you can go to gitee to download offline open source packages:
|
|
|
+1. Download the Yocto buildpack (without SDK source code):
|
|
|
|
|
|
```
|
|
|
- git clone https://gitee.com/thead-yocto/yocto-downloads.git
|
|
|
+ git clone https://gitee.com/thead-yocto/xuantie-yocto.git -b Linux_SDK_V1.1.2
|
|
|
```
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-3. Load the configuration file of the target device and load the environment variables:
|
|
|
+2. Load the configuration file of the target device and load the environment variables:
|
|
|
|
|
|
```
|
|
|
cd xuantie-yocto
|
|
|
-
|
|
|
- source openembedded-core/oe-init-build-env build/light-fm
|
|
|
+ source openembedded-core/oe-init-build-env thead-build/light-fm
|
|
|
```
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-4. Soft link the open source packages downloaded earlier to the SDK directory by sharing the downloads directory (assuming yocto-downloads is downloaded to the root directory):
|
|
|
+3. Soft link the open source packages downloaded earlier to the SDK directory by sharing the downloads directory (assuming yocto-downloads is downloaded to the root directory):
|
|
|
|
|
|
```
|
|
|
ln -s /yocto-downloads ../downloads
|
|
|
```
|
|
|
|
|
|
-# 4 Build the Firmware
|
|
|
+# Machine/Target List
|
|
|
|
|
|
-The build command is as follows:
|
|
|
+After setting the configuration file, you can see the following logs:
|
|
|
|
|
|
```
|
|
|
-MACHINE=light-a-public-release bitbake light-fm-image-linux
|
|
|
-```
|
|
|
+### Shell environment set up for builds. ###
|
|
|
|
|
|
-Supported MACHINE list:
|
|
|
+You can now run 'bitbake <target>'
|
|
|
|
|
|
-* light-a-public-release: TH1520 light-a board
|
|
|
-* light-b-public: TH1520 light-b board
|
|
|
-* light-beagle: beagle-board
|
|
|
+Common targets are:
|
|
|
+ thead-image-linux
|
|
|
+ thead-image-multimedia
|
|
|
+ thead-image-gui
|
|
|
|
|
|
-# 5 Manually Clear the Data Partition
|
|
|
+machines:
|
|
|
+ light-beagle
|
|
|
+ light-b-product
|
|
|
+ light-a-val
|
|
|
+ light-lpi4a
|
|
|
+```
|
|
|
|
|
|
-The current version introduces the overlay mechanism of the root partition and the data partition -- if the root partition and the data partition have files with the same name, the system preferentially selects the file in data partition. In order to avoid the influence of the data partition, please use the following command to manually clear the data partition in u-boot mode after fastboot is burned:
|
|
|
+Among them, 'targets' indicates the image list supported by the SDK, and 'machines' indicates the board configuration supported by the SDK. Board configurations and images are listed as follows:
|
|
|
|
|
|
-```
|
|
|
-part start mmc 0 data start_blk
|
|
|
-part size mmc 0 data size_blk
|
|
|
-mmc erase ${start_blk} ${size_blk}
|
|
|
-```
|
|
|
+<u>target:</u>
|
|
|
|
|
|
-# 6 deb Package Installation
|
|
|
+| Name | Description |
|
|
|
+| ---------------------- | ------------------------------------------------------------ |
|
|
|
+| thead-image-linux | 典型linux系统配置,最小系统加上必要的相关基础组件 |
|
|
|
+| thead-image-multimedia | 典型linux系统+视频视觉配置,加上视频子系统的组件(Gstreamer等) |
|
|
|
+| thead-image-gui | 加上GUI相关组件的完整配置版本,包括Gnome桌面、weston、QT等应用组件等等 |
|
|
|
|
|
|
-The default utility application is not compiled into the image and is provided as a deb package. The deb package will be generated in the compiled image directory: build/light-fm/tmp-glibc/deploy/deb.
|
|
|
+<u>machine:</u>
|
|
|
|
|
|
-When installing the deb package, you need to first copy the deb package (through adb or network) to the board, and then use the following command:
|
|
|
+| Name | Description |
|
|
|
+| --------------- | ------------------- |
|
|
|
+| light-a-val | TH1520-A EVB板 |
|
|
|
+| light-b-product | TH1520-B EVB板 |
|
|
|
+| light-beagle | beagleV-Ahead开发板 |
|
|
|
+| light-lpi4a | Lichee Pi 4A开发板 |
|
|
|
+
|
|
|
+# Build the Firmware
|
|
|
+
|
|
|
+The build command is as follows:
|
|
|
|
|
|
```
|
|
|
-dpkg -i "package_name"
|
|
|
+MACHINE={machine} bitbake {target}
|
|
|
```
|
|
|
|
|
|
-If the package depends on other packages, please install them in sequence according to the prompts.
|
|
|
+Replace {machine} and {target} with the real names from the supported list in the previous section. For example, to compile a typical Linux system image and run it on TH1520-A EVB development board, the compilation command is as follows:
|
|
|
+
|
|
|
+```
|
|
|
+MACHINE=light-a-val bitbake thead-image-linux
|
|
|
+```
|
|
|
|
|
|
-# 7 Other
|
|
|
+# Other
|
|
|
|
|
|
***light_deploy_images repository:***
|
|
|
|