README.md
1# hispark\_taurus<a name="EN-US_TOPIC_0000001142448981"></a>
2
3- [Introduction](#section11660541593)
4- [Directory Structure](#section161941989596)
5- [Constraints](#section119744591305)
6- [Compilation and Building](#section137768191623)
7- [hispark\_taurus License Agreement](#section1312121216216)
8 - [third\_party License Notice](#section129654513264)
9
10- [Repositories Involved](#section1371113476307)
11
12## Introduction<a name="section11660541593"></a>
13
14The **hispark\_taurus** repository provides drivers for the Hi3516D V300 chip and provides basic multimedia capabilities for the Multimedia and Graphics subsystems. including audio/video collection, audio/video encoding and decoding, audio/video output, video pre-processing, encapsulation, decapsulation, file management, storage management, and log system. The following figure shows the architecture of the Multimedia subsystem.
15
16**Figure 1** Multimedia subsystem architecture<a name="fig4460722185514"></a>
17
18
19
20
21## Directory Structure<a name="section161941989596"></a>
22
23```
24/device/hisilicon/hispark_taurus/sdk_liteos
25├── config # Hi3516D V300 device configuration information
26├── mpp
27│ ├── lib # Media library files and license files of Hi3516D V300
28│ └── module_init # Libraries and license files of corresponding media module drivers of Hi3516D V300
29└── uboot
30 ├── out # U-Boot compiled using third_party\uboot\u-boot-2020.01
31 ├── reg # U-Boot configuration files and license files
32 ├── secureboot_ohos # Compilation scripts for securely booting OpenHarmony
33 └── secureboot_release # Source code and license files for generating secure U-Boot files
34
35/device/hisilicon/hispark_taurus/sdk_linux/soc
36├── ko # Kernel module loading script for the Hi3516D V300 chip
37├── lib # Media and graphics library files and license files for the Hi3516D V300 chip
38└── src # Linux kernel driver module source code and license files for the Hi3516D V300 chip
39 ├── interdrv # Peripheral modules
40 │ ├── common # Common modules for all chips
41 │ │ ├── cipher # Encryption/Decryption module
42 │ │ ├── hi_adc # ADC bus controller
43 │ │ ├── hi_ir # IR controller
44 │ │ ├── hi_irq # IRQ management module of the user-space driver
45 │ │ ├── hi_proc # Debugging information management module
46 │ │ └── wtdg # Watchdog
47 │ └── hi3516cv500 # Chip-specific modules
48 │ ├── mipi_rx # RX direction of the MIPI protocol
49 │ ├── mipi_tx # TX direction of the MIPI protocol
50 │ └── sysconfig # System configurations
51 ├── mpp # Graphics and multimedia modules
52 │ ├── cbb
53 │ │ ├── based # Logging functions
54 │ │ ├── sysd # Basic system module that provides memory and module binding functions
55 │ │ └── vo # video output
56 │ └── component
57 │ ├── hdmi # HDMI output
58 │ ├── hifb # Frame buffer management
59 │ └── tde # Two Dimensional Engine
60 └── osal # Operating system abstraction layer, which shields system differences and provides unified interfaces
61```
62
63## Constraints<a name="section119744591305"></a>
64
65Currently, the Hi3516D V300 chip is supported.
66
67## Compilation and Building<a name="section137768191623"></a>
68
69- Compiling U-Boot
70
711. Download the GCC toolchain from [https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads). Currently, the toolchain version for compiling U-Boot is **gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2**. You can also select other GCC versions.
722. Copy the GCC toolchain to the **prebuilts** directory and decompress it.
733. Go to the **hispark\_taurus\\uboot\\out\\boot** directory and modify the path of the toolchain defined by **OSDRV\_CROSS** in the **makefile** of the directory.
744. Run the **make clean;make all;** command to compile the U-Boot.
75
76The generated U-Boot is stored in the **hispark\_taurus\\uboot\\out\\boot** directory.
77
78Note: **prebuilts\\mkimage** is generated by the U-Boot source code.
79
80## hispark\_taurus License Agreement <a name="section1312121216216"></a>
81
82- The **hispark\_taurus\\sdk\_linux\\soc\\lib** directory stores the HiSilicon-developed libraries, which comply with the license of HiSilicon \(Shanghai\). You can see the following license and copyright information in the license file stored in this directory:
83
84 ```
85 / *End User License Agreement ... Copyright (C) 2021 HiSilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
86 ```
87
88- The **hispark\_taurus\\sdk\_linux\\soc\\src** directory stores the HiSilicon-developed code, which complies with the HiSilicon \(Shanghai\) copyright statement based on GPL. You can see the following license and copyright information at the beginning of the license file stored in this directory:
89
90 ```
91 / *Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
92 *
93 * This program is free software; you can redistribute it and/or modify it
94 * under the terms of the GNU General Public License as published by the
95 * Free Software Foundation; either version 2 of the License, or (at your
96 * option) any later version.
97 * ... * /
98 ```
99
100- The **hispark\_taurus\\prebuilts** directory stores the tools generated using the boot source code that is stored in the **device\\hisilicon\\third\_party\\uboot\\u-boot-2020.01** directory. prebuilts uses the Hisilicon \(Shanghai\) copyright statement based on the end-user license agreement. You can see the following license and copyright information in the license file stored in the **hispark\_taurus\\prebuilts** directory:
101
102 ```
103 / *End User License Agreement ... Copyright (C) 2021 HiSilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
104 ```
105
106- The **hispark\_taurus\\sdk\_linux\\uboot\\reg** directory stores the HiSilicon-developed code, which complies with the HiSilicon \(Shanghai\) copyright statement based on the end-user license agreement. You can see the following license and copyright information in the license file stored in this directory:
107
108 ```
109 / *End User License Agreement ... Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
110 ```
111
112- The **hispark\_taurus\\sdk\_liteos\\mpp\\module\_init\\lib** and **hispark\_taurus\\sdk\_liteos\\mpp\\lib** directories store the HiSilicon-developed libraries, which comply with the license of HiSilicon \(Shanghai\). You can see the following license and copyright information at the end of license files that are stored in the two directories:
113
114 ```
115 Copyright (C) 2020 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
116 ```
117
118- The **hispark\_taurus\\sdk\_liteos\\mpp\\module\_init\\src** directory stores the HiSilicon-developed code, which complies with the HiSilicon \(Shanghai\) copyright statement based on the Apache License Version 2.0. You can see the following license and copyright information at the beginning of the license file that is stored in this directory:
119
120 ```
121 / *Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. Licensed under the Apache License,* ... * /
122 ```
123
124- The **hispark\_taurus\\sdk\_liteos\\uboot\\reg** directory stores a binary file, which complies with the license of HiSilicon \(Shanghai\). You can see the following copyright information at the end of a license file that is stored in this directory:
125
126 ```
127 Copyright (C) 2020 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
128 ```
129
130- The **hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot** directory stores a binary U-Boot file compiled using **u-boot-2020.01** and **reg\_info\_hi3518ev300.bin** and following the **u-boot-2020.01** protocol. For details, see the readme files in the **third\_party\\uboot\\u-boot-2020.01\\Licenses** directory.
131- The **hispark\_aries\\sdk\_liteos\\uboot\\secureboot\_release** directory stores the open-source code of secure U-Boot, in which the HiSilicon-developed code complies with the HiSilicon \(Shanghai\) copyright statement based on the GPL license. You can see the following license and copyright information at the beginning of the license file that is stored in this directory:
132
133 ```
134 / *Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
135 *
136 * This program is free software; you can redistribute it and/or modify it
137 * under the terms of the GNU General Public License as published by the
138 * Free Software Foundation; either version 2 of the License, or (at your
139 * option) any later version.
140 * ... * /
141 ```
142
143- The notice file stored in the **hispark\_taurus\\NOTICE** directory describes three open-source software, namely **Das U-Boot 2020.01**, **mbed TLS 2.16.6**, and **fdk-aac v2.0.1**.
144
145### third\_party License Notice<a name="section129654513264"></a>
146
147The **third\_party\\ffmpeg\\ffmpeg-y** directory stores the open-source code of **ffmpeg**, in which the code complies with the open-source license notice of its own software version. For details, see the readme files in the **third\_party\\ffmpeg\\ffmpeg-y** directory.
148
149The **third\_party\\uboot\\u-boot-2020.01** directory stores the open-source code of U-Boot, which complies with the open-source license notice of its own software version. For details, see the readme files in the **third\_party\\uboot\\u-boot-2020.01\\Licenses** directory.
150
151## Repositories Involved<a name="section1371113476307"></a>
152
153device/hisilicon/build
154
155device/hisilicon/drivers
156
157device/hisilicon/hardware
158
159**device/hisilicon/hispark\_taurus**
160
161device/hisilicon/modules
162
163device/hisilicon/third\_party/ffmpeg
164
165device/hisilicon/third\_party/uboot
166
167vendor/hisilicon
168
169
README_zh.md
1# HiSpark\_taurus介绍<a name="ZH-CN_TOPIC_0000001142448981"></a>
2
3- [简介](#section11660541593)
4- [目录](#section161941989596)
5- [约束](#section119744591305)
6- [编译构建](#section137768191623)
7- [hispark\_taurus协议说明](#section1312121216216)
8 - [third\_party许可说明](#section129654513264)
9
10- [相关仓](#section1371113476307)
11
12## 简介<a name="section11660541593"></a>
13
14hispark\_taurus仓为hi3516dv300芯片的底层处理驱动,为“媒体/图形子系统”提供基础的多媒体处理功能。主要功能有:音视频采集、音视频编解码、音视频输出、视频前处理、封装、解封装、文件管理、存储管理、日志系统等。如图1所示。
15
16**图 1** 多媒体子系统架构图<a name="fig4460722185514"></a>
17
18
19
20
21## 目录<a name="section161941989596"></a>
22
23```
24/device/hisilicon/hispark_taurus/sdk_liteos
25├── config # Hi3516DV300设备配置信息
26├── mpp
27│ ├── lib # Hi3516DV300芯片的媒体库文件、LICENSE文件
28│ └── module_init # Hi3516DV300芯片媒体各模块驱动对应的库、LICENSE文件
29└── uboot
30 ├── out # 采用third_party\uboot\u-boot-2020.01编译成的U-Boot
31 ├── reg # U-Boot配置文件、LICENSE文件
32 ├── secureboot_ohos # 安全启动相关的编译脚本
33 └── secureboot_release # 生成安全U-Boot的源代码、License目录
34
35/device/hisilicon/hispark_taurus/sdk_linux/soc
36├── ko # Hi3516DV300芯片的内核模块加载脚本
37├── lib # Hi3516DV300芯片的媒体图形库文件、LICENSE文件
38└── src # Hi3516DV300芯片的linux内核驱动模块源码、LICENSE文件
39 ├── interdrv # 外设模块
40 │ ├── common # 各芯片通用模块
41 │ │ ├── cipher # 加解密模块
42 │ │ ├── hi_adc # adc总线控制器
43 │ │ ├── hi_ir # 红外控制器
44 │ │ ├── hi_irq # 用户态驱动中断注册管理模块
45 │ │ ├── hi_proc # 调试信息管理模块
46 │ │ └── wtdg # 看门狗
47 │ └── hi3516cv500 # 芯片相关模块
48 │ ├── mipi_rx # mipi协议rx方向
49 │ ├── mipi_tx # mipi协议tx方向
50 │ └── sysconfig # 系统管脚配置相关配置
51 ├── mpp # 图形媒体相关模块
52 │ ├── cbb
53 │ │ ├── based # 日志相关功能
54 │ │ ├── sysd # 系统基础模块,提供内存、模块绑定等功能
55 │ │ └── vo # video output
56 │ └── component
57 │ ├── hdmi # HDMI接口输出
58 │ ├── hifb # frame buffer管理
59 │ └── tde # Two Dimensional Engine
60 └── osal # 驱动适配层,用于屏蔽系统差异,提供统一接口
61```
62
63## 约束<a name="section119744591305"></a>
64
65当前支持Hi3516DV300芯片。
66
67## 编译构建<a name="section137768191623"></a>
68
69- 编译uboot
70
711. 从开源社区\(https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads\)下载GCC工具链,当前用于编译uboot的工具链版本为gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2,也可以选择其他的GCC版本。
722. 将GCC工具链拷贝到prebuilts目录,并解压。
733. 进入hispark\_taurus\\uboot\\out\\boot目录,修改该目录下的Makefile中的OSDRV\_CROSS所定义的工具链的路径。
744. 编译U-Boot,命令:make clean;make all;
75
76生成的U-Boot存放在hispark\_taurus\\uboot\\out\\boot目录下。
77
78备注:prebuilts\\mkimage由uboot源码生成。
79
80## hispark\_taurus协议说明<a name="section1312121216216"></a>
81
82- hispark\_taurus\\sdk\_linux\\soc\\lib里面为上海海思的自研库,遵循上海海思的LICENSE,这个目录下有LICENSE文件,LICENSE文件中可以看到版权信息:
83
84 ```
85 / *End User License Agreement ... Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
86 ```
87
88- hispark\_taurus\\sdk\_linux\\soc\\src目录下为上海海思自研代码,使用基于GPL许可的Hisilicon \(Shanghai\) 版权声明,在该目录下有License目录,许可信息和版权信息通常可以在文件开头看到:
89
90 ```
91 / *Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
92 *
93 * This program is free software; you can redistribute it and/or modify it
94 * under the terms of the GNU General Public License as published by the
95 * Free Software Foundation; either version 2 of the License, or (at your
96 * option) any later version.
97 * ... * /
98 ```
99
100- hispark\_taurus\\prebuilts目录下为boot源码编译出的工具,源码在device\\hisilicon\\third\_party\\uboot\\u-boot-2020.01路径下,prebuilts使用基于End User License Agreement许可的Hisilicon \(Shanghai\) 版权声明,在该目录下有End User License Agreement 的LICENSE文件,许可信息和版权信息通常可以在文件中看到:
101
102 ```
103 / *End User License Agreement ... Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
104 ```
105
106- hispark\_taurus\\sdk\_linux\\uboot\\reg目录为上海海思自研代码,使用基于End User License Agreement许可的Hisilicon \(Shanghai\) 版权声明,在该目录下有End User License Agreement的LICENSE文件,许可信息和版权信息通常可以在文件中看到:
107
108 ```
109 / *End User License Agreement ... Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
110 ```
111
112- hispark\_taurus\\sdk\_liteos\\mpp\\module\_init\\lib和hispark\_taurus\\sdk\_liteos\\mpp\\lib里面为上海海思的自研库,遵循上海海思的LICENSE,这两个目录下均有LICENSE文件,LICENSE文件结尾可以看到版权信息:
113
114 ```
115 Copyright (C) 2020 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
116 ```
117
118- hispark\_taurus\\sdk\_liteos\\mpp\\module\_init\\src目录下为上海海思自研代码,使用基于Apache License Version 2.0许可的Hisilicon \(Shanghai\) 版权声明,在该目录下有Apache License Version 2.0的LICENSE文件,许可信息和版权信息通常可以在文件开头看到:
119
120 ```
121 / *Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. Licensed under the Apache License,* ... * /
122 ```
123
124- hispark\_taurus\\sdk\_liteos\\uboot\\reg为上海海思的二进制文件,遵循上海海思的LICENSE,该目录下有LICENSE文件,LICENSE文件结尾可以看到:
125
126 ```
127 Copyright (C) 2020 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
128 ```
129
130- hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot是由u-boot-2020.01和reg\_info\_hi3518ev300.bin编译成的U-Boot二进制文件,完全遵从u-boot-2020.01的整体协议,具体请参看third\_party\\uboot\\u-boot-2020.01\\Licenses目录下的README。
131- hispark\_aries\\sdk\_liteos\\uboot\\secureboot\_release为安全U-Boot的开源代码,其中自研的部分使用基于GPL许可的Hisilicon \(Shanghai\) 版权声明,在该目录下有License目录,许可信息和版权信息通常可以在文件开头看到:
132
133 ```
134 / *Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
135 *
136 * This program is free software; you can redistribute it and/or modify it
137 * under the terms of the GNU General Public License as published by the
138 * Free Software Foundation; either version 2 of the License, or (at your
139 * option) any later version.
140 * ... * /
141 ```
142
143- hispark\_taurus\\NOTICE文件描述了使用到的三款开源软件:Das U-Boot 2020.01、mbed TLS 2.16.6、fdk-aac v2.0.1。
144
145### third\_party许可说明<a name="section129654513264"></a>
146
147third\_party\\ffmpeg\\ffmpeg-y为ffmpeg开源代码,遵循软件版本自带的开源许可声明,具体请参看third\_party\\ffmpeg\\ffmpeg-y目录下的README。
148
149third\_party\\uboot\\u-boot-2020.01为U-Boot开源代码,遵循软件版本自带的开源许可声明,具体请参看third\_party\\uboot\\u-boot-2020.01\\Licenses目录下的README。
150
151## 相关仓<a name="section1371113476307"></a>
152
153device/hisilicon/build
154
155device/hisilicon/drivers
156
157device/hisilicon/hardware
158
159**device/hisilicon/hispark\_taurus**
160
161device/hisilicon/modules
162
163device/hisilicon/third\_party/ffmpeg
164
165device/hisilicon/third\_party/uboot
166
167vendor/hisilicon
168
169