http://opensource.rock-chips.com/api.php?action=feedcontributions&user=Kever&feedformat=atom
Rockchip open source Document - User contributions [en]
2024-03-29T09:24:09Z
User contributions
MediaWiki 1.28.0
http://opensource.rock-chips.com/index.php?title=RK3328&diff=2230
RK3328
2022-03-23T01:38:57Z
<p>Kever: </p>
<hr />
<div><br />
{{Infobox SoC<br />
| title = RK3328<br />
| image = [[File:rk3328_soc.png|250px]]<br />
| manufacturer = Rockchip<br />
| process = 28nm<br />
| cpu = Quad-Core ARM Cortex-A53<br />
| ltwo = <br />
| extensions = <br />
| memory = DDR3/DDR3L/LPDDR3/DDR4 <br />
| gpu = Mali-450MP4<br />
| vpu = 4K VP9 and 4K 10bits H265/H264 video decode, up to 60fps<br />
| apu = <br />
| video = HDMI 2.0a, <br />
| audio = 8 channels I2S/PDM <br />
| storage = 4x SD Card, eMMC <br />
| usb = 1* USB2.0 otg, 1* USB 2.0 Host, 1* USB 3.0 Host<br />
| other = <br />
| release_date = December 2016<br />
| website = http://www.rock-chips.com/a/en/products/RK33_Series/2017/0118/829.html | Product Page<br />
}} &nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
RK3328 offers a high-integration and power efficiency&nbsp;SOC for 4K HDR OTT/IPTV. It support HDR10 ,HLG HDR ,&nbsp;4K 10bits 30fps H.264 video decoder and 4K 10bits 60fps H265 video decoder.Comply with lots of high-performance interface,such as multi-channel display with HDMI2.0a, TV Encoder, the Quad-core GPU can acheive&nbsp;high-resolution display and game.<br />
<br />
== Cortex-A53 ==<br />
<br />
Quad-core Cortex-A53 is integrated with separate Neon and FPU coprocessor, also with shared L2 Cache.&nbsp;<br />
<br />
[[File:3328.png|RTENOTITLE]]<br />
<br />
<br />
= RK3328 SoC Features =<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" style="width: 972px;"<br />
|-<br />
| style="width: 530px;" | <br />
*CPU: <br />
**ARM Cortex-A53&nbsp;Quad-Core&nbsp; <br />
**32KB L1&nbsp;I cache and D cache for each CPU <br />
**256KB L2 cache <br />
*Internal SRAM <br />
**32KB total <br />
*GPU <br />
**&nbsp;Mali-450MP2 <br />
**Comply with Open GL ES1.1/2.0 <br />
*Multi-Media: <br />
**4K VP9 and 4K 10bits H265/H264 video decode, up to 60fps <br />
**1080P other video decoders (VC-1, MPEG-1/2/4, VP8) <br />
**1080P video encoder for H.264 and H.265 <br />
**Support HDR10 ,HLG HDR , Support conversion between SDR and HDR <br />
*Display: <br />
**HDMI 2.0a for 4K@60Hz with HDCP 1.4/2.2 <br />
**Support conversion between Rec.2020 and Rec.709 <br />
*Memory: <br />
**LPDDR3/DDR3/DDR3L/DDR4 <br />
**eMMC 4.51,SDCard, SPI Flash <br />
*External interface <br />
**USB 2.0 x2 and USB 3.0 x1 <br />
**100M Ethernet w/ built-in PHY <br />
**Built-in CVBS and audio DAC <br />
**8 channels I2S IO and 8 chanel digital PDM input (for MIC array) <br />
<br />
| style="width: 429px;" | &nbsp;<br />
|}<br />
<br />
&nbsp;<br />
<br />
= Documentation =<br />
<br />
#[http://opensource.rock-chips.com/images/d/d7/Rockchip_RK3328_Datasheet_V1.1-20170309.pdf Rockchip_RK3328_Datasheet_V1.1-20170309.pdf] <br />
#[http://opensource.rock-chips.com/images/d/d5/RK3328_Linux-Debian_V1.1_Development_Guide-20170711.pdf RK3328_Linux-Debian_V1.1_Development_Guide-20170711.pdf] <br />
#[[Media:Rockchip_RK3328TRM_V1.1-Part1-20170321.pdf|Rockchip RK3328TRM V1.1-Part1-20170321.pdf]] <br />
#[[Media:Rk3328_hardware_reference.zip|Rk3328 hardware reference.zip]] <br />
<br />
&nbsp;<br />
<br />
= Software =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Linux_user_guide Linux User Guide]&nbsp;setup LInux OS generally;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_U-Boot U-Boot]&nbsp;guide to develop U-Boot;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Rockchip_Kernel Rockchip kernel]&nbsp;to develop kernel;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Buildroot buildroot and]&nbsp;[http://opensource.rock-chips.com/wiki_Debian debian&nbsp;to]&nbsp;develop and rootfs.<br />
<br />
&nbsp;<br />
<br />
== Chip configuration ==<br />
<br />
{| border="1" cellpadding="1" cellspacing="1" class="table_style"<br />
|-<br />
! '''chip'''<br />
! '''Kernel eMMC index'''<br />
! '''Kernel SD index'''<br />
! '''Uboot eMMC index'''<br />
! '''Uboot SD index'''<br />
! '''Baud speed'''<br />
|-<br />
| RK3328<br />
| 2<br />
| 0<br />
| 0<br />
| 1<br />
| 1500000<br />
|}<br />
<br />
&nbsp;<br />
<br />
= References =<br />
<br />
1.[https://en.wikipedia.org/wiki/ARM_Cortex-A53 https://en.wikipedia.org/wiki/ARM_Cortex-A53]<br />
<br />
&nbsp;</div>
Kever
http://opensource.rock-chips.com/index.php?title=Mpp&diff=2229
Mpp
2021-07-12T02:25:00Z
<p>Kever: </p>
<hr />
<div><br />
Multimedia Overview on Rockchip platform<br />
<br />
'''MPP: Media Process Platform '''is the video codec parser and<span class="_Tgc">Hardware Abstraction Layer library for the Rockchip platforms.</span><br />
<br />
&nbsp;<br />
<br />
== Get source code ==<br />
<br />
You can get mpp source from git.&nbsp;<br />
<br />
<code>git clone -b release&nbsp;[https://github.com/rockchip-linux/mpp.git https://github.com/rockchip-linux/mpp.git]</code><br />
<br />
== Build ==<br />
<br />
=== Unix/Linux ===<br />
<br />
If you are using a Debian relation distribution, there is a debian build rulles in the source code. You may check the debian directory for the future information.<br />
<br />
You may use the following command to build the deb packages, supporting architecture are: armhf, arm64.<br />
<br />
<code>DEB_BUILD_OPTIONS="parallel=4 nocheck" dpkg-buildpackage -a<arch></code><br />
<br />
Please install the all requirement cross compiling tools and Debian packages tools before.&nbsp;<br />
<br />
You may use the following command to build it in&nbsp;the board:<br />
<br />
cmake -DRKPLATFORM=ON -DHAVE_DRM=ON && make<br />
<br />
=== Android ===<br />
<br />
Build in Android need android ndk package, usually we use android-ndk-r10d.<br/> &nbsp;&nbsp; &nbsp;you can download ndk from google website and modify ndk path in make-Android.bash. Auto path is<br/> &nbsp;&nbsp; &nbsp;/home/pub/ndk/android-ndk-r10d.<br/> &nbsp;&nbsp; &nbsp;Then, Carry out build/andorid/xx/make-Android.bash. There may be some errors in the first execution<br/> &nbsp;&nbsp; &nbsp;Re-execution make-Android.bash the probelm can be resolved.<br />
<br />
=== Windows ===<br />
<br />
Carry out build/xx-x86_64/build-all.bat and make-solutions.bat<br />
<br />
&nbsp;<br />
<br />
== System Diagram ==<br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp;</span><br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---------------------------------------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp;OpenMax &nbsp;/ libva &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---------------------------------------+</span><br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------- MPP ----------------------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------------+ &nbsp; &nbsp;+--------+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;MPI / MPP &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; buffer queue manage &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------------+ &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------------+ &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;codec &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp;OSAL &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp;decoder / encoder &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------------+ &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-----------+ +-----------+ &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp;parser &nbsp; | | &nbsp; &nbsp;HAL &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp;control &nbsp;| | &nbsp;reg_gen &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-----------+ +-----------+ &nbsp; &nbsp;+--------| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------- MPP ----------------------+</span><br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---------------------------------------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kernel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; RK vcodec_service / v4l2 &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---------------------------------------+</span><br />
<br />
== About Mpp ==<br />
<br />
The mpp is a middleware library for Rockchip SoC's cross platform media process.<br/> The main purpose of mpp is to provide very high performance, high flexibility<br/> and expansibility on multimedia (mainly video and image) process.<br />
<br />
The design target of mpp is to connect different Rockchip hardware kernel driver<br/> and different userspace application.<br />
<br />
Rockchip has two sets of hardware kernel driver.<br />
<br />
The first one is vcodec_service/vpu_service/mpp_service which is a high<br/> performance stateless frame base hardware kernel driver. This driver supports<br/> all available codecs that hardware can provide. This driver is used on Android/<br/> Linux.<br />
<br />
The second one is v4l2 driver which is developed for ChromeOS. It currently<br/> supports H.264/H.265/vp8/vp9. This driver is used on ChomeOS/Linux.<br />
<br />
Mpp plans to support serval userspace applications including OpenMax,&nbsp;libva.<br />
<br />
&nbsp;<br />
<br />
== Mpp Feature ==<br />
<br />
1. Cross Platform<br/> The target OS platform including Android, Linux, ChromeOS and windows. &nbsp;Mpp uses<br/> cmake to compile on different platform.<br />
<br />
2. High Performance<br/> Mpp supports sync / async interface to reduce the time blocked in interface. And<br/> mpp internally make hardware and software run parallelly. When hardware is<br/> running sofware will prepare next hardware task at the same time.<br />
<br />
3. High Flexibility<br/> mpi (Media Process Interface) is easy to extend by different control function.<br/> The input/output element packet/frame/buffer is easy to extend different<br/> components.<br />
<br />
== Mpp Components ==<br />
<br />
=== OSAL (Operation System Abstraction Layer) ===<br />
<br />
This module shutters the differences between different operation systems and<br/> provide basic components including memory, time, thread, log and hardware memory<br/> allocator.<br />
<br />
=== MPI (Media Process Interface) / MPP ===<br />
<br />
This module is on charge of interaction with external user. Mpi layer has two<br/> ways for user. The simple way - User can use put/get packet/frame function set.<br/> The advanced way - User has to config MppTask and use dequeue/enqueue funciton<br/> set to communicate with mpp. MppTask can carry different meta data and complete<br/> complex work.<br />
<br />
=== Codec (encoder / decoder) ===<br />
<br />
This module implements the high efficiency internal work flow. The codec module<br/> provides a general call flow for different video format. Software process will<br/> be separated from hardware specified process. The software will communicate with<br/> hardware with a common task interface which combines the buffer information and<br/> codec specified infomation.<br />
<br />
=== Parser/Controller and hal (Hardware Abstraction Layer) ===<br />
<br />
This layer provides the implement function call of different video format and<br/> different hardware. For decoder parser provide the video stream parse function<br/> and output format related syntax structure to hal. The hal will translate the<br/> syntax structure to register set on different hardware. Current hal supports<br/> vcodec_service kernel driver and plan to support v4l2 driver later.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Mpp Kernel Driver ==<br />
<br />
Rockchip has two sets of hardware kernel driver.<br />
<br />
The first one is vcodec_service/vpu_service/mpp_service which is a high<br/> performance stateless frame base hardware kernel driver. This driver supports<br/> all available codecs that hardware can provide. This driver is used on Android/<br/> Linux.<br />
<br />
Here is the vcodec_service kernel driver framework diagram.<br />
<br />
&nbsp;<br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+<br/> &nbsp; &nbsp; | &nbsp;client &nbsp;A &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;client &nbsp;B &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;client &nbsp;C &nbsp;|<br/> &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+</span><br />
<br />
<span style="font-family:courier new,courier,monospace">userspace<br/> +------------------------------------------------------------------------------+<br/> &nbsp;kernel</span><br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+<br/> &nbsp; &nbsp; | &nbsp;session A &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;session B &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;session C &nbsp;|<br/> &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------+<br/> &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp;waiting &nbsp; &nbsp; &nbsp; &nbsp; done &nbsp; &nbsp; &nbsp; &nbsp;waiting &nbsp; &nbsp; &nbsp; &nbsp; done &nbsp; &nbsp; &nbsp; &nbsp;waiting &nbsp; &nbsp; &nbsp; &nbsp; done<br/> &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> +---+---+ &nbsp; &nbsp; +---+---+ &nbsp; &nbsp; +---+---+ &nbsp; &nbsp; +---+---+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---+---+<br/> | task3 | &nbsp; &nbsp; | task0 | &nbsp; &nbsp; | task1 | &nbsp; &nbsp; | task0 | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | task0 |<br/> +---+---+ &nbsp; &nbsp; +-------+ &nbsp; &nbsp; +-------+ &nbsp; &nbsp; +-------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---+---+<br/> &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> +---+---+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +---+---+<br/> | task2 | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | task1 |<br/> +-------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;service &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+---------+-----------+---------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waiting &nbsp; &nbsp; &nbsp; &nbsp; running &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;done<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+ &nbsp; +-----+-----+ &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;task A2 &nbsp;| &nbsp; | &nbsp;task A1 &nbsp;| &nbsp; | &nbsp;task C0 &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+ &nbsp; +-----------+ &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;task B1 &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;task C1 &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;task A3 &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;task A0 &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----+-----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;task B0 &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-----------+</span><br />
<br />
The principle of this design is to separate user task handling and hardware<br/> resource management and minimize the kernel serial process time between two<br/> hardware process operation.<br />
<br />
The driver uses session as communication channel. Each userspace client (client)<br/> will have a kernel session. Client will commit tasks to session. Then hardware<br/> is managed by service (vpu_service/vcodec_service). Service will provide the<br/> ability to process tasks in sessions.<br />
<br />
When client commits a task to kernel the task will be set to waiting status and<br/> link to both session waiting list and service waiting list. Then service will<br/> get task from waiting list to running list and run. When hardware finishs a task<br/> the task will be moved to done list and put to both service done list and<br/> session done list. Finally client will get the finished task from session.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Mpp Buffer ==<br />
<br />
Mpp buffer is the warpper of the buffer used by hardware. Hardware usually can<br/> not use the buffer malloc by cpu. Then we design MppBuffer for different memory<br/> allocator on different platform. Currently it is designed for ion buffer on<br/> Android and drm buffer on Linux. Later may support vb2_buffer in v4l2 devices.<br />
<br />
In order to manage buffer usage in different user mpp buffer module introduces<br/> MppBufferGroup as bufffer manager. All MppBuffer will connect to its manager.<br/> MppBufferGroup provides allocator service and buffer reuse ability.<br />
<br />
Different MppBufferGroup has different allocator. And besides normal malloc/free<br/> function the allocator can also accept buffer from external file descriptor.<br />
<br />
MppBufferGroup has two lists, unused buffer list and used buffer list. When<br/> buffer is free buffer will not be released immediately. Buffer will be moved to<br/> unused list for later reuse. There is a good reason for doing so. When video<br/> resolution comes to 4K the buffer size will be above 12M. It will take a long<br/> time to allocate buffer and generate map table for it. So reusing the buffer<br/> will save the allocate/free time.<br />
<br />
Here is the diagram of Mpp buffer status transaction.<br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----------+ &nbsp; &nbsp; +---------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;create &nbsp;| &nbsp; &nbsp; | &nbsp;commit |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+----+ &nbsp; &nbsp; +----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+----v----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----------+ unused &nbsp;<-----------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+---------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----v----+ &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; +-----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;malloc &nbsp;| &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; | &nbsp; free &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----------+ &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; +----------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | inc_ref &nbsp;| &nbsp; &nbsp; +---------+ &nbsp; &nbsp; | &nbsp;dec_ref |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----+----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-----^----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+---------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----------> &nbsp;used &nbsp; +-----------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+---------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+----^----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| import &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+---------+</span><br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Mpp Task ==<br />
<br />
Mpp task is the contain component for transaction with external user in advanced<br/> mode. The target of advanced mode is to provide flexible, multiple input/output<br/> content for extension.<br />
<br />
Mpp task has mpp_meta as the rich content carrier. Mpp meta uses KEY and value<br/> pair for extension. One task can carries multiple data into or out of mpp.<br/> The typical case is encoder with OSD and motion detection. One task may contain<br/> OSD buffer, motion detection buffer, frame buffer and stream buffer as input and<br/> output stream buffer and motion detection buffer with data. And this case can<br/> also be used on decoder if decoder wants to output some side information.<br />
<br />
1. Mpp task queue<br/> Mpp task queue is the manager of tasks. Due to user may incorrectly use the task<br/> we choose the design that hold all task inside mpp. Task queue will create and<br/> release task. But task queue will not interact with user directly. We use port<br/> and task status to control the transaction.<br />
<br />
2. Mpp port<br/> Mpp port is the transaction interface of task queue. External user and internal<br/> worker thread will use mpp_port_poll / mpp_port_dequeue / mpp_port_enqueue<br/> interface to poll / dequeue / enqueue the task task queue. Mpp advanced mode is<br/> using port to connect external user, interface storage and internal process<br/> thread. Each task queue has two port: input port and output port. And from a<br/> global view the task will always flow from input port to output port.<br />
<br />
3. Mpp task status<br/> There are four status for one task. Mpp use list_head to represent the status.<br />
<br />
INPUT_PORT&nbsp;: Initial status for input port user to dequeue. Or when output port<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;successfully enqueue a task then the task is on this status.<br />
<br />
INPUT_HOLD&nbsp;: When input port user successfully dequeue a task then the task is<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on this status.<br />
<br />
OUTPUT_PORT: When input port user successfully enqueue a task then the task is<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on OUTPUT_PORT status. And this task is ready for dequeue from<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output port.<br />
<br />
OUTPUT_HOLD: When output port user successfully dequeue a task then the task is<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on this status.<br />
<br />
4. Mpp task / port transaction<br/> There are three transaction functions on a port: poll / dequeue / enqueue.<br/> When port user call the transaction function task will be transfer from one<br/> status to next status. The status transform flow is unidirectional from input<br/> port to output port.<br />
<br />
The overall relationship graph of task / port / status is shown below.<br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1. task queue<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+------------------------------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+----+ &nbsp;+--------------+ &nbsp;+----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;4 &nbsp; &nbsp;| &nbsp;| &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp;| &nbsp;| &nbsp; 2.1 &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+--------+ dequeue <--+ &nbsp; &nbsp;status &nbsp; &nbsp;<--+ enqueue <---------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;| &nbsp;INPUT_PORT &nbsp;| &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;+---------+ &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;+---------+ &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; +------v-----+ &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;+--------------+ &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;+------+------+<br/> &nbsp; | &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; | &nbsp;| &nbsp; &nbsp;2 &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;2 &nbsp; &nbsp;| &nbsp;| &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp;|<br/> &nbsp; | &nbsp; status &nbsp; | &nbsp;| &nbsp;input &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;output | &nbsp;| &nbsp; status &nbsp; &nbsp;|<br/> &nbsp; | INPUT_HOLD | &nbsp;| &nbsp; port &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; port &nbsp;| &nbsp;| OUTPUT_HOLD |<br/> &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; +------+-----+ &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;+--------------+ &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;+------^------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;+---------+ &nbsp;| &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp;| &nbsp;+---------+ &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;4 &nbsp; &nbsp;| &nbsp;| &nbsp; &nbsp;status &nbsp; &nbsp;| &nbsp;| &nbsp; 2.1 &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+--------> enqueue +--> &nbsp;INPUT_PORT &nbsp;+--> dequeue +---------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+----+ &nbsp;+--------------+ &nbsp;-----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+------------------------------+</span><br />
<br />
On advanced mode mpp uses two task queue: input task queue and output task<br/> queue.<br/> Input task queue connects input side external user to internal worker thread.<br/> Output task queue connects internal worker thread to output side external user.<br/> Then there will be three threads to parallelize internal process and external<br/> transation. This will maximize mpp efficiency.<br />
<br />
The work flow is demonstrated as below graph.<br />
<br />
<span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp;input side user &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | output side user &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----^---------+----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----^---------+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+----+----v----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+----+----v----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | dequeue | enqueue | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | dequeue | enqueue |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----^----+----+----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----^----+----+----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+---------+----+ &nbsp; &nbsp;MPP &nbsp; &nbsp;+----+---------v----+<br/> &nbsp; &nbsp; &nbsp; &nbsp; +---+ &nbsp; &nbsp; input port &nbsp; &nbsp;+-----------+ &nbsp; &nbsp;output port &nbsp; &nbsp;+---+<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp;input task queue | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | output task queue | &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +-------------------+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +-------------------+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp;output port &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; input port &nbsp; &nbsp;| &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +----+---------^----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+---------^----+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +----v----+----+----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----v----+----+----+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | dequeue | enqueue | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | dequeue | enqueue | &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +----+----+----^----+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +----+----+----^----+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp;|<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +----v---------+---------------------v---------+----+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;internal work thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; +---------------------------------------------------+ &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/> &nbsp; &nbsp; &nbsp; &nbsp; +-----------------------------------------------------------+</span><br />
<br />
= &nbsp; =<br />
<br />
= Mpp User Guide =<br />
<br />
== Multithreading&nbsp; ==<br />
<br />
Mpp don't directly provide thread api, so you should use the correspoding<br/> os interface.<br/> About multithreading encode/decode, something must be done.<br />
<br />
1. Resources should apply for multiple copies rather than one, To avoid the<br/> competition of resources<br />
<br />
2. The timing of resource release is different, release resource should be done after<br/> a frmae or a packet end to used.<br />
<br />
For specific details about multithreading, see test/mpi_enc_test and test/mpi_dec_test.<br />
<br />
== param set ==<br />
<br />
Mpp nees some param to decide work mode, param include MPP, OSAL, CODEC, ISP, HAL&nbsp;<br/> and Mode module cmd.<br />
<br />
All cmd is define in Inc/Rk_mpi_cmd.h<br />
<br />
Usually cmd is set after mpp_create and mpp_init, but work mode should be set<br/> before mpp_init. you need to indicate work mode(single or advanced) to help mpp cho<br/> se thread.<br />
<pre>typedef enum {<br />
&nbsp; &nbsp; MPP_OSAL_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = CMD_MODULE_OSAL,<br />
&nbsp; &nbsp; MPP_OSAL_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_MPP,<br />
&nbsp; &nbsp; MPP_ENABLE_DEINTERLACE,<br />
&nbsp; &nbsp; MPP_SET_INPUT_BLOCK,<br />
&nbsp; &nbsp; MPP_SET_OUTPUT_BLOCK,<br />
&nbsp; &nbsp; MPP_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_CODEC_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_CODEC,<br />
&nbsp; &nbsp; MPP_CODEC_GET_FRAME_INFO,<br />
&nbsp; &nbsp; MPP_CODEC_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_DEC_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_CODEC | CMD_CTX_ID_DEC,<br />
&nbsp; &nbsp; MPP_DEC_SET_FRAME_INFO, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* vpu api legacy control for buffer slot dimension init */<br />
&nbsp; &nbsp; MPP_DEC_SET_EXT_BUF_GROUP, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* IMPORTANT: set external buffer group to mpp decoder */<br />
&nbsp; &nbsp; MPP_DEC_SET_INFO_CHANGE_READY,<br />
&nbsp; &nbsp; MPP_DEC_SET_INTERNAL_PTS_ENABLE,<br />
&nbsp; &nbsp; MPP_DEC_SET_PARSER_SPLIT_MODE, &nbsp; &nbsp; &nbsp;/* Need to setup before init */<br />
&nbsp; &nbsp; MPP_DEC_SET_PARSER_FAST_MODE, &nbsp; &nbsp; &nbsp; /* Need to setup before init */<br />
&nbsp; &nbsp; MPP_DEC_GET_STREAM_COUNT,<br />
&nbsp; &nbsp; MPP_DEC_GET_VPUMEM_USED_COUNT,<br />
&nbsp; &nbsp; MPP_DEC_SET_VC1_EXTRA_DATA,<br />
&nbsp; &nbsp; MPP_DEC_SET_OUTPUT_FORMAT,<br />
&nbsp; &nbsp; MPP_DEC_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_ENC_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_CODEC | CMD_CTX_ID_ENC,<br />
&nbsp; &nbsp; /* basic encoder setup control */<br />
&nbsp; &nbsp; MPP_ENC_SET_ALL_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* set MppEncCfgSet structure */<br />
&nbsp; &nbsp; MPP_ENC_GET_ALL_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* get MppEncCfgSet structure */<br />
&nbsp; &nbsp; MPP_ENC_SET_PREP_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* set MppEncPrepCfg structure */<br />
&nbsp; &nbsp; MPP_ENC_GET_PREP_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* get MppEncPrepCfg structure */<br />
&nbsp; &nbsp; MPP_ENC_SET_RC_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* set MppEncRcCfg structure */<br />
&nbsp; &nbsp; MPP_ENC_GET_RC_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* get MppEncRcCfg structure */<br />
&nbsp; &nbsp; MPP_ENC_SET_CODEC_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* set MppEncCodecCfg structure */<br />
&nbsp; &nbsp; MPP_ENC_GET_CODEC_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* get MppEncCodecCfg structure */<br />
&nbsp; &nbsp; /* runtime encoder setup control */<br />
&nbsp; &nbsp; MPP_ENC_SET_IDR_FRAME, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* next frame will be encoded as intra frame */<br />
&nbsp; &nbsp; MPP_ENC_SET_OSD_PLT_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* set OSD palette, parameter should be pointer to&nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MppEncOSDPlt */<br />
&nbsp; &nbsp; MPP_ENC_SET_OSD_DATA_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* set OSD data with at most 8 regions, parameter&nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;should be pointer to MppEncOSDData */<br />
&nbsp; &nbsp; MPP_ENC_GET_OSD_CFG,<br />
&nbsp; &nbsp; MPP_ENC_SET_EXTRA_INFO,<br />
&nbsp; &nbsp; MPP_ENC_GET_EXTRA_INFO, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* get vps / sps / pps from hal */<br />
&nbsp; &nbsp; MPP_ENC_SET_SEI_CFG, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* SEI: Supplement Enhancemant Information, parameter&nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;is MppSeiMode */<br />
&nbsp; &nbsp; MPP_ENC_GET_SEI_DATA, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* SEI: Supplement Enhancemant Information, parameter<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;is MppPacket */<br />
&nbsp; &nbsp; MPP_ENC_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_ISP_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_CODEC | CMD_CTX_ID_ISP,<br />
&nbsp; &nbsp; MPP_ISP_CMD_END,<br />
<br />
&nbsp; &nbsp; MPP_HAL_CMD_BASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= CMD_MODULE_HAL,<br />
&nbsp; &nbsp; MPP_HAL_CMD_END,<br />
<br />
&nbsp; &nbsp; MPI_CMD_BUTT,<br />
} MpiCmd;<br />
<br />
you can call like this.<br />
ret = mpi->control(ctx, xx_xx_cmd, &data);<br />
</pre><br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Rate Control ==<br />
<br />
Mpp support three mode of rate control, CBR(constant bitrate),VBR(variable&nbsp;<br/> bitrate) and CQP(FIX QP). &nbsp;Mpp control rate according to the set of three&nbsp;<br/> parameters, include MppEncCodecCfg, MppEncPrepCfg and MppEncRcCfg.<br />
<pre>MppEncPrepCfg<br />
+-----------+----------------------------------------+<br />
| param &nbsp; | &nbsp;effect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| format &nbsp;| &nbsp;input pix format, such as NV12, RGB24|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| width &nbsp; | &nbsp;wdith of picture &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| height &nbsp; | &nbsp;height of picture &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| stride &nbsp; | &nbsp;span of a line in picture, must align|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;in 8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+-----------+----------------------------------------+<br />
<br />
MppEncRcCfg<br />
+-----------+----------------------------------------+<br />
| param &nbsp; | &nbsp;effect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| rc_mode &nbsp;| &nbsp;0:CBR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;1:VBR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| bps_target| &nbsp;target bitrate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; |<br />
|bps_max/min &nbsp;max/min value of target bitrate &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; |<br />
|fps_in_num | &nbsp;input frame rate / denorm &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| /denorm | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
|fps_out_num &nbsp;output frame rate / denorm &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| /denorm | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| gop &nbsp; &nbsp; | &nbsp;group of picture, usually set as 4 * |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;fps &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+-----------+----------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| uality &nbsp; | profile of VBR mode, worst,worse, &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | medium,better,best and CQP,note that |<br />
| &nbsp; &nbsp; &nbsp; | it will let qp_max/qp_min lose effect. |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | {31, &nbsp; &nbsp; &nbsp; 51}, // worst &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | {28, &nbsp; &nbsp; &nbsp; 46}, // worse &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | {24, &nbsp; &nbsp; &nbsp; 42}, // medium &nbsp; &nbsp; &nbsp;&nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | {20, &nbsp; &nbsp; &nbsp; 39}, // better &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | {16, &nbsp; &nbsp; &nbsp; 35}, // best &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | {0, &nbsp; &nbsp; &nbsp; &nbsp; 0}, // cqp &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | cqp means use qp_init,qp will be const |<br />
| &nbsp; &nbsp; &nbsp; | in each frame. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+-----------+----------------------------------------+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MppEncCodecCfg<br />
+-----------+----------------------------------------+<br />
| param &nbsp; | &nbsp;effect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| qp_init &nbsp;| &nbsp;usually set as 33, if set at 0, mpp |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;will estimate it by width,height... |<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| qp_min/qp_| &nbsp;min/max value of qp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| max &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| qp_max_step &nbsp;The maximum range of QP differences |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;between two frames &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp;profile | &nbsp;44 &nbsp; CAVLC 4:4:4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;66 &nbsp; Baseline &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;77 &nbsp; Main &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;88 &nbsp; Extended &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;100 &nbsp;High (suggest) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| &nbsp;level &nbsp;| &nbsp;10 &nbsp; Level 1.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;99 &nbsp; Level 1.b &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;11 &nbsp; Level 1.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;12 &nbsp; Level 1.2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;13 &nbsp; Level 1.3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;20 &nbsp; Level 2.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;21 &nbsp; Level 2.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;22 &nbsp; Level 2.2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;30 &nbsp; Level 3.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;31 &nbsp; Level 3.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;32 &nbsp; Level 3.2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;40 &nbsp; Level 4.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;41 &nbsp; Level 4.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;42 &nbsp; Level 4.2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;50 &nbsp; Level 5.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;51 &nbsp; Level 5.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+-----------+----------------------------------------+<br />
| entroy_cod| &nbsp;entroy code mode 1:CAVLC &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| ing_mode | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0:CABAC &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| cabac_init| &nbsp;effect when entroy mode is CABAC &nbsp; |<br />
| _idc &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+-----------+----------------------------------------+</pre><br />
<br />
&nbsp;<br />
<br />
=== 1. CBR ===<br />
<br />
In CBR mode, the bitrate of encoded data is controlled whtnin the configured maximum<br/> bit rate and the minimum bitrate range.<br />
<pre>suggest param<br />
+-----------+----------------------------------------+<br />
| param &nbsp; | &nbsp;effect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| rc_mode &nbsp;| MPP_ENC_RC_MODE_CBR &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| qp_init &nbsp;| 0(suggest, mpp internal will set it) |<br />
| &nbsp; &nbsp; &nbsp; | 24(high bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | 32(medium bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; | 40(low bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| qp_min &nbsp; | suggest 0, mpp internal will set at 16 |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| qp_max &nbsp; | suggest 0, mpp internal will set at 48 |<br />
| &nbsp; &nbsp; &nbsp;&nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+-----------+----------------------------------------+<br />
| qp_max_step 16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+</pre><br />
<br />
=== 2. VBR ===<br />
<br />
In VBR mode, mpp will try to keep the video quality stable and make the code rate of<br/> the encoded file fluctuate as much as possible within the given maximum and minimum<br/> bit rate ranges.<br />
<pre>suggest param<br />
+-----------+----------------------------------------+<br />
| param &nbsp; | &nbsp;effect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
+----------------------------------------------------+<br />
| rc_mode | &nbsp; MPP_ENC_RC_MODE_VBR &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| quality &nbsp;| &nbsp;worst(very low bitrate) &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;worse(low bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;medium(medium bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;better(high bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; | &nbsp;best(very high bitrate) &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;CQP(const qp,rate control lose effect|<br />
+----------------------------------------------------+<br />
| qp_init &nbsp;| &nbsp;0(suggest, mpp internal estimate) &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;24(high bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;32(medium bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| &nbsp; &nbsp; &nbsp; | &nbsp;40(low bitrate) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------------------------------------------+<br />
| qp_min &nbsp; | &nbsp;0 |<br />
+----------------------------------------------------+<br />
| qp_max &nbsp; | &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+-----------+----------------------------------------+<br />
| qp_max_step &nbsp;8, set at 0 when CQP &nbsp; |<br />
+----------------------------------------------------+<br />
<br />
</pre><br />
<br />
&nbsp;<br />
<br />
== Mpp Interface Use ==<br />
<br />
1. MPP_RET Mpp::put_packet(MppPacket packet)<br/> Is packaged as mpi->put_packet, and for interact with internal packet list in decoder.<br />
<br />
2. MPP_RET Mpp::get_frame(MppFrame *frame)<br/> Is packaged as mpi->get_frame, and for interact with internal frame list in decoder. you can<br/> call like this when decode.<br/> &nbsp;&nbsp; &nbsp;mpi->put_packet<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->get_frame<br />
<br />
3. MPP_RET Mpp::put_frame(MppFrame frame)<br/> Is packaged as mpi->put_frame, and for interact with internal frame list in encoder.<br />
<br />
4. MPP_RET Mpp::get_packet(MppPacket *packet)<br/> Is packaged as mpi->get_packet, and for interact eith internal packet list in encoder. you can<br/> call like this when encode.<br/> &nbsp;&nbsp; &nbsp;mpi->put_frame<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->get_packet<br />
<br />
5. MPP_RET Mpp::poll(MppPortType type, MppPollType timeout)<br/> Is packaged as mpi->poll, poll usually used in task mode(advance mode). poll will check internal<br/> task list, if MPP_INPUT_PORT/MPP_OUTPUT_PORT is empty, poll will block util task list get node,<br/> else poll will return immediately.<br />
<br />
about how does task modework, please see doc/design/4.mpp_task.txt<br />
<br />
6. MPP_RET Mpp::dequeue(MppPortType type, MppTask *task)<br/> Is packaged as mpi->dequeue, will get a task with multiple data. when port is MPP_INPUT_PORT, get a<br/> task to set. when port is MPP_OUTPUT_PORT, get a task with encoded data.<br />
<br />
7. &nbsp;MPP_RET Mpp::enqueue(MppPortType type, MppTask task)<br/> Is packaged as mpi->enqueue, will send a task to internal task list, so that list get a node. you<br/> can call like this when encode.<br/> &nbsp;&nbsp; &nbsp;mpi->poll(input, xx)<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->dequeue(input, xx)<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->enqueue(input, xx)<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->poll(output, xx)<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->dequeue(output, xx)<br/> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;|<br/> &nbsp;&nbsp; &nbsp;mpi->enqueue(output, xx)<br/> 8. MPP_RET Mpp::control(MpiCmd cmd, MppParam param)<br/> Is packaged as mpi->control, will change mpp param.<br />
<br />
About how to use mpp encode/decode, please test/mpi_encode_test.c and test/mpi_decode_test.c<br />
<br />
= Mpp Development Reference Manual =<br />
<br />
[http://opensource.rock-chips.com/wiki_File:MPP_Development_Reference.pdf http://opensource.rock-chips.com/wiki_File:MPP_Development_Reference.pdf]<br />
<br />
= Mpp Development Guide (CN) =<br />
<br />
[http://opensource.rock-chips.com/wiki_File:MPP_开发参考_v0.3.pdf http://opensource.rock-chips.com/wiki_File:MPP_%E5%BC%80%E5%8F%91%E5%8F%82%E8%80%83_v0.3.pdf]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2226
Devices
2020-09-24T07:50:23Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on the market, they are maintained by the board vendors.<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: Vyasa-RK3288<br />
<br />
ASUS:&nbsp;Tinker Board<br />
<br />
Firefly:&nbsp;Firefly-RK3288<br />
<br />
PHYTEC: phyCore-RK3288<br />
<br />
Pico-ITX: RICO-3288<br />
<br />
Radxa: Rock2<br />
<br />
&nbsp;<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: Firefly-RK3399<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ROC-RK3399-PC<br />
<br />
FriendlyARM: Nano PC T4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi NEO4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi M4<br />
<br />
Khadas: Edge-rk3399<br />
<br />
Lenovo:&nbsp;Leez P710<br />
<br />
Orange Pi: Orangepi-rk3399<br />
<br />
Pico-ITX: RICO-3399<br />
<br />
Pine64: ROCK64pro<br />
<br />
Radxa:&nbsp;Rock Pi 4<br />
<br />
Rockchip: RK3399&nbsp;Excavator sapphire<br />
<br />
Theobroma Systems: RK3399-Q7<br />
<br />
Vmars: ROCK960<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;ROCK64<br />
<br />
Firefly: ROC-RK3328-CC<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;TB-RK3399<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AI<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;TB-RK1808<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AIoT</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2225
Devices
2020-09-24T07:47:24Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: Vyasa-RK3288<br />
<br />
ASUS:&nbsp;Tinker Board<br />
<br />
Firefly:&nbsp;Firefly-RK3288<br />
<br />
PHYTEC: phyCore-RK3288<br />
<br />
Pico-ITX: RICO-3288<br />
<br />
Radxa: Rock2<br />
<br />
&nbsp;<br />
<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: Firefly-RK3399<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ROC-RK3399-PC<br />
<br />
FriendlyARM: Nano PC T4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi NEO4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi M4<br />
<br />
Khadas: Edge-rk3399<br />
<br />
Lenovo:&nbsp;Leez P710<br />
<br />
Orange Pi: Orangepi-rk3399<br />
<br />
Pico-ITX: RICO-3399<br />
<br />
Pine64: ROCK64pro<br />
<br />
Radxa:&nbsp;Rock Pi 4<br />
<br />
Rockchip: RK3399&nbsp;Excavator sapphire<br />
<br />
Theobroma Systems: RK3399-Q7<br />
<br />
Vmars: ROCK960<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;ROCK64<br />
<br />
Firefly: ROC-RK3328-CC<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;TB-RK3399<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AI<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;TB-RK1808<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AIoT</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2220
Devices
2020-09-24T01:01:10Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: Vyasa-RK3288<br />
<br />
ASUS:&nbsp;Tinker Board<br />
<br />
Firefly:&nbsp;Firefly-RK3288<br />
<br />
PHYTEC: phyCore-RK3288<br />
<br />
Pico-ITX: RICO-3288<br />
<br />
Radxa: Rock2<br />
<br />
&nbsp;<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: Firefly-RK3399<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ROC-RK3399-PC<br />
<br />
FriendlyARM: Nano PC T4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi NEO4<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NanoPi M4<br />
<br />
Khadas: Edge-rk3399<br />
<br />
Lenovo:&nbsp;Leez P710<br />
<br />
Orange Pi: Orangepi-rk3399<br />
<br />
Pico-ITX: RICO-3399<br />
<br />
Pine64: ROCK64pro<br />
<br />
Radxa:&nbsp;Rock Pi 4<br />
<br />
Rockchip: RK3399&nbsp;Excavator sapphire<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: RK3399-Q7<br />
<br />
Vmars: ROCK960<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;ROCK64<br />
<br />
Firefly: ROC-RK3328-CC<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;TB-RK3399<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AI<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;TB-RK1808<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB-96AIoT</div>
Kever
http://opensource.rock-chips.com/index.php?title=Status_Matrix&diff=2219
Status Matrix
2020-09-24T00:57:19Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
== Rockchip 4.4 Kernel Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| rowspan="2" style="text-align: left;" | ADC<br />
| style="text-align: left;" | SARADC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | TSADC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Clocks<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | CPUFreq<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Crypto<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Mipi-CSI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | ISP<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | DVP/CIF<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: orange;" | WIP<br />
|-<br />
| rowspan="8" style="text-align: left;" | Display (DRM)<br />
| style="text-align: left;" | RGB<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | EDP<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | LVDS<br />
| style="background: rgb(255, 255, 255);" | &nbsp;N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | MIPI DSI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | CVBS<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VGA<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| style="text-align: left;" | HDMI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | CEC<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: orange;" | WIP<br />
|-<br />
| colspan="2" style="text-align: left;" | DMA<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | DDR DVFS<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: red;" | NO<br />
|-<br />
| rowspan="2" style="text-align: left;" | Ethernet<br />
| style="text-align: left;" | GMAC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | EMAC<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | I2S<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left" | I2C<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | MsgBox<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Pinctrl<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | PWM<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Power Domain<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | PCIE<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | SD / SDIO / MMC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SPDIF<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SPI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SUSPEND / RESUME<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | USB<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | USB OTG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | TYPEC<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Watchdog<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | GPU<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | VPU<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | RGA<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | IEP<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Mainline Kernel Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| rowspan="2" style="text-align: left;" | ADC<br />
| style="text-align: left;" | SARADC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| style="text-align: left;" | TSADC1<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Clocks<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | CPUFreq<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Crypto<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | CSI/ISP<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: orange;" | WIP<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | CIF<br />
| style="background: orange;" | WIP<br />
| style="background: orange;" | WIP<br />
| style="background: orange;" | WIP<br />
|-<br />
| rowspan="8" style="text-align: left;" | Display (DRM)<br />
| style="text-align: left;" | RGB<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| style="text-align: left;" | EDP<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| N/A<br />
|-<br />
| style="text-align: left;" | LVDS<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| N/A<br />
|-<br />
| style="text-align: left;" | MIPI DSI<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| N/A<br />
|-<br />
| style="text-align: left;" | CVBS<br />
| N/A<br />
| N/A<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| style="text-align: left;" | VGA<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| style="text-align: left;" | HDMI<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| style="text-align: left;" | CEC<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| colspan="2" style="text-align: left;" | DMA<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | DDR DVFS<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| rowspan="2" style="text-align: left;" | Ethernet<br />
| style="text-align: left;" | GMAC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| style="text-align: left;" | EMAC<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | I2S<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left" | I2C<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | MsgBox<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Pinctrl<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | PWM<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Power Domain<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | PCIE<br />
| style="background-color: lightgreen;" | 4.14<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | SD / SDIO / MMC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SPDIF<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SPI<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SUSPEND / RESUME<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | USB<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | USB OTG<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | TYPEC<br />
| style="background-color: lightgreen;" | 4.14<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Watchdog<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | GPU<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| colspan="2" style="text-align: left;" | VPU<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| colspan="2" style="text-align: left;" | RGA<br />
| style="background: lightgreen;" | 4.15<br />
| style="background: lightgreen;" | 4.15<br />
| style="background: orange;" | WIP<br />
|-<br />
| colspan="2" style="text-align: left;" | IEP<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
== Linux SDK CHIP Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| colspan="2" style="text-align: left;" | Debian<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Buildroot<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| rowspan="5" style="text-align: left;" | Decode<br />
| style="text-align: left;" | H264<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | H265<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VP8<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VP9<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | JPEG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| rowspan="3" style="text-align: left;" | Encode<br />
| style="text-align: left;" | H264<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | H265<br />
| style="background-color: white;" | N/A<br />
| style="background: white;" | N/A<br />
| style="background-color: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | JPEG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | ISP(3A)<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background: white;" | N/A<br />
|}<br />
<br />
<br/> &nbsp;<br />
<br />
<br />
== Linux&nbsp;Function Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! Status<br />
|-<br />
| rowspan="2" style="text-align: left;" | GPU<br />
| style="text-align: left;" | GLES<br />
| style="background: lightgreen;" | libmali<br />
|-<br />
| style="text-align: left;" | OPENCL<br />
| style="background: lightgreen;" | libmali<br />
|-<br />
| colspan="2" rowspan="1" style="text-align: left;" | QT<br />
| style="background: lightgreen;" | QT 5.x<br />
|-<br />
| colspan="2" style="text-align: left;" | <br />
Browser(HTML5 Accelerate)<br />
<br />
| style="background: yellow;" | Community<br />
|-<br />
| colspan="2" style="text-align: left;" | <br />
IOT(Third part Could Service)<br />
<br />
| style="background: lightgreen;" | ROS<br />
|-<br />
| colspan="2" style="text-align: left;" | MPV<br />
| style="background: yellow;" | Community<br />
|}</div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockchip-isp1&diff=2218
Rockchip-isp1
2020-09-23T09:57:42Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
The document below&nbsp;provide&nbsp;basical informations&nbsp;about the&nbsp;rockchip-isp1 driver driver and&nbsp;Image Signal Processing block on Rockchip SoC&nbsp;with&nbsp;examples and details.<br />
<br />
= Hardware =<br />
<br />
More detailed information could be found in TRM chapter "Image Signal Processing", "MIPI D-PHY"&nbsp;, but they are only available under&nbsp;NDA.<br />
<br />
== ISP Details ==<br />
<br />
ISP comprises with:<br />
<br />
*MIPI serial camera interface <br />
*Image Signal Processing <br />
*Many Image Enhancement Blocks <br />
*Crop <br />
*Resize <br />
<br />
=== Block diagram ===<br />
<br />
The completed block diagram&nbsp;can not be pasted from&nbsp;datasheet&nbsp;to here, below&nbsp;diagram&nbsp;is an abstract version:<br />
<br />
[[File:Block.png|1200px|Blocks.png]]<br />
<br />
&nbsp;<br />
<br />
== MIPI Details ==<br />
<br />
There are three D-PHY instances in rockchip SoC, their connection are shown as following figure:<br />
<br />
[[File:Phy.png|600px|Phy.png]]<br />
<br />
= Software =<br />
<br />
== Driver ==<br />
<br />
rockchip-isp1 is a V4L2 based driver for Image Signal Processing block on Rockchip SoC. Compared to the earlier driver&nbsp;rk-isp10, it use&nbsp;Media Controller&nbsp;framework, which it's different from plain v4L2. While the plain v4L2 had a view of the device as a plain DMA based image drabber which connects the input data to the host memory, the Media Controller takes into consideration the fact that a typical video device might consist of multiple sub-devices.<br />
<br />
=== Media Controller Basics ===<br />
<br />
Please read below link carefully,&nbsp;especially if you don't have use it before.<br />
<br />
[https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html]<br />
<br />
=== Block diagram ===<br />
<br />
==== File view ====<br />
<br />
[[File:Code.png|1200px|Code.png]]<br />
<br />
==== V4l2 view ====<br />
<br />
[[File:Rockchip-isp1-v4l2.png|800px|Rockchip-isp1-v4l2.png]]<br />
<br />
{| border="1" class="table_style" style="width: 768px;"<br />
|-<br />
! style="width: 165px;" | Name<br />
! style="width: 131px;" | Type<br />
! style="width: 450px;" | Description<br />
|-<br />
| style="width: 165px;" | rkisp1_mainpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RAW Bayer; Max resolution: 4416*3312;&nbsp;Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1_selfpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RGB; Max resolution: 1920*1080; Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-isp-subdev<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
Internal isp blocks; Support: source/sink pad crop.<br />
<br />
The format on sink pad&nbsp;should be equal to sensor input format, the size should be equal/less than&nbsp;sensor input size.<br />
<br />
The format on source pad&nbsp;should be equal to vdev output format if output format is raw bayer, otherwise it should be&nbsp; YUYV2X8. The size should be equal/less than&nbsp;sink pad size.<br />
<br />
|-<br />
| style="width: 165px;" | rockchip-sy-mipi-dphy<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
MIPI-DPHY&nbsp;Configure<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-statistics<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Provide Image color Statistics information.<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-input-params<br />
| style="width: 131px;" | v4l2_vdev, output<br />
| style="width: 450px;" | <br />
Accept params for AWB, BLC...... Image enhancement blcoks<br />
<br />
|}<br />
<br />
=== Sensor Driver Requirement ===<br />
<br />
The sensor driver should implement controls in the following table.&nbsp;<br />
<br />
{| border="1" class="table_style"<br />
|-<br />
! Controls<br />
! Description<br />
! R/W<br />
! Needed by<br />
|-<br />
| V4L2_CID_VBLANK<br />
| <span style="font-size:smaller;">Vertical blanking. The idle period after every frame during which no image data is produced. The unit of vertical blanking is a line. Every line has length of the image width plus horizontal blanking at the pixel rate defined by&nbsp;<code>V4L2_CID_PIXEL_RATE</code>&nbsp;control in the same sub-device.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_HBLANK<br />
| <span style="font-size:smaller;">Horizontal blanking. The idle period after every line of image data during which no image data is produced. The unit of horizontal blanking is pixels.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_EXPOSURE<br />
| <span style="font-size:smaller;">Determines the exposure time of the camera sensor. The exposure time is limited by the frame interval. Drivers should interpret the values as 100 µs units, where the value 1 stands for 1/10000th of a second, 10000 for 1 second and 100000 for 10 seconds.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_ANALOGUE_GAIN<br />
| <span style="font-size:smaller;">Analogue gain is gain affecting all colour components in the pixel matrix. The gain operation is performed in the analogue domain before A/D conversion.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_DIGITAL_GAIN<br />
| <span style="font-size:smaller;">Digital gain is the value by which all colour components are multiplied by. Typically the digital gain applied is the control value divided by e.g. 0x100, meaning that to get no digital gain the control value needs to be 0x100. The no-gain configuration is also typically the default.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_PIXEL_RATE<br />
| <span style="font-size:smaller;">Pixel rate in the source pads of the subdev. This control is read-only and its unit is pixels / second.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_LINK_FREQ<br />
| <span style="font-size:smaller;">Data bus frequency. Together with the media bus pixel code, bus type (clock cycles per sample), the data bus frequency defines the pixel rate (<code>V4L2_CID_PIXEL_RATE</code>) in the pixel array (or possibly elsewhere, if the device is not an image sensor). The frame rate can be calculated from the pixel clock, image width and height and horizontal and vertical blanking. While the pixel rate control may be defined elsewhere than in the subdev containing the pixel array, the frame rate cannot be obtained from that information. This is because only on the pixel array it can be assumed that the vertical and horizontal blanking information is exact: no other blanking is allowed in the pixel array. The selection of frame rate is performed by selecting the desired horizontal and vertical blanking. The unit of this control is Hz.</span><br />
| R<br />
| mipi-dphy<br />
|}<br />
<br />
=== Devicetree Bindings ===<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-isp1.txt]<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt]<br />
<br />
<br />
<br />
== Linux ==<br />
<br />
=== User applications&nbsp; ===<br />
<br />
The v4l-utils tool and applications&nbsp;<br/> The v4l-utils tool is a V4L2 development kit maintained by Linuxtv[1] . It provides a set&nbsp;<br/> of V4L2 and media framework related tools for configuring V4L2 sub-device properties,&nbsp;<br/> testing V4L2 devices, and providing development libraries such as libv4l2.so and so on.&nbsp;<br/> This chapter mainly introduces two command-line tools in v4l-utils: media-ctl and v4l2-&nbsp;<br/> ctl&nbsp;<br/> media-ctl, used to view and configure topology&nbsp;<br/> v4l2-ctl, used to configure v4l2 controls, capture frames, set cif, isp, sensor&nbsp;<br/> parameters&nbsp;<br/> The format code of different versions of v4l-utils will be different, especially mbus-fmt&nbsp;<br/> part. The version used in this document is v4l-utils-1.14.1 integrated in Linux SDK.&nbsp;<br />
<br />
== Android ==<br />
<br />
=== <del>Camera Hal3</del> ===<br />
<br />
[https://source.android.com/devices/camera/camera3?hl=zh-cn https://source.android.com/devices/camera/camera3]<br />
<br />
= Reproduce =<br />
<br />
The driver currently can run&nbsp;on ASUS Tinker Board and Firefly-RK3288-Reload + Rockchip&nbsp;Debian/Yocto SDK.<br />
<br />
== Source Code ==<br />
<br />
=== Kernel ===<br />
<br />
#4.15 + [https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7231 FORMLIST Patches] <br />
#[https://github.com/rockchip-linux/kernel/tree/release-4.4 Rockchip 4.4 BSP] <br />
<br />
=== Sensor Driver ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/imx219.c IMX219] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/ov5647.c OV5647] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/tc35874x.c TC35874X] <br />
<br />
=== Device Tree ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-miniarm.dts Tinker Board] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-firefly-reload-linux.dts Firefly-rk3288-Reload] <br />
<br />
&nbsp;<br />
<br />
== Test Command ==<br />
<pre>cat /sys/class/video4linux/video*/name<br />
# get self_path videox and main_path videox+1<br />
gst-launch-1.0 rkcamsrc device=/dev/videox+1 io-mode=4&nbsp;! videoconvert&nbsp;! video/x-raw,format=NV12,width=640,height=480&nbsp;! kmssink</pre><br />
<br />
= Others =<br />
<br />
== Topology ==<br />
<pre>Media device information<br />
------------------------<br />
driver rkisp1<br />
model rkisp1<br />
serial <br />
bus info <br />
hw revision 0x0<br />
driver version 0.0.0<br />
<br />
Device topology<br />
- entity 1: rkisp1-isp-subdev (4 pads, 5 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev0<br />
pad0: Sink<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
<- "rockchip-sy-mipi-dphy":1 [ENABLED]<br />
pad1: Sink<br />
<- "rkisp1-input-params":0 [ENABLED]<br />
pad2: Source<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
-> "rkisp1_selfpath":0 [ENABLED]<br />
-> "rkisp1_mainpath":0 [ENABLED]<br />
pad3: Source<br />
-> "rkisp1-statistics":0 [ENABLED]<br />
<br />
- entity 2: rkisp1_selfpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video0<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 3: rkisp1_mainpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video1<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 4: rkisp1-statistics (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video2<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":3 [ENABLED]<br />
<br />
- entity 5: rkisp1-input-params (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video3<br />
pad0: Source<br />
-> "rkisp1-isp-subdev":1 [ENABLED]<br />
<br />
- entity 6: rockchip-sy-mipi-dphy (2 pads, 2 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev1<br />
pad0: Sink<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
<- "imx219 2-0010":0 [ENABLED]<br />
pad1: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rkisp1-isp-subdev":0 [ENABLED]<br />
<br />
- entity 7: imx219 2-0010 (1 pad, 1 link)<br />
type V4L2 subdev subtype Sensor flags 0<br />
device node name /dev/v4l-subdev2<br />
pad0: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rockchip-sy-mipi-dphy":0 [ENABLED]</pre></div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockchip-isp1&diff=2217
Rockchip-isp1
2020-09-23T09:57:08Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
The document below&nbsp;provide&nbsp;basical informations&nbsp;about the&nbsp;rockchip-isp1 driver driver and&nbsp;Image Signal Processing block on Rockchip SoC&nbsp;with&nbsp;examples and details.<br />
<br />
= Hardware =<br />
<br />
More detailed information could be found in TRM chapter "Image Signal Processing", "MIPI D-PHY"&nbsp;, but they are only available under&nbsp;NDA.<br />
<br />
== ISP Details ==<br />
<br />
ISP comprises with:<br />
<br />
*MIPI serial camera interface <br />
*Image Signal Processing <br />
*Many Image Enhancement Blocks <br />
*Crop <br />
*Resize <br />
<br />
=== Block diagram ===<br />
<br />
The completed block diagram&nbsp;can not be pasted from&nbsp;datasheet&nbsp;to here, below&nbsp;diagram&nbsp;is an abstract version:<br />
<br />
[[File:Block.png|1200px|Blocks.png]]<br />
<br />
&nbsp;<br />
<br />
== MIPI Details ==<br />
<br />
There are three D-PHY instances in rockchip SoC, their connection are shown as following figure:<br />
<br />
[[File:Phy.png|600px|Phy.png]]<br />
<br />
= Software =<br />
<br />
== Driver ==<br />
<br />
rockchip-isp1 is a V4L2 based driver for Image Signal Processing block on Rockchip SoC. Compared to the earlier driver&nbsp;rk-isp10, it use&nbsp;Media Controller&nbsp;framework, which it's different from plain v4L2. While the plain v4L2 had a view of the device as a plain DMA based image drabber which connects the input data to the host memory, the Media Controller takes into consideration the fact that a typical video device might consist of multiple sub-devices.<br />
<br />
=== Media Controller Basics ===<br />
<br />
Please read below link carefully,&nbsp;especially if you don't have use it before.<br />
<br />
[https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html]<br />
<br />
=== Block diagram ===<br />
<br />
==== File view ====<br />
<br />
[[File:Code.png|1200px|Code.png]]<br />
<br />
==== V4l2 view ====<br />
<br />
[[File:Rockchip-isp1-v4l2.png|800px|Rockchip-isp1-v4l2.png]]<br />
<br />
{| border="1" class="table_style" style="width: 768px;"<br />
|-<br />
! style="width: 165px;" | Name<br />
! style="width: 131px;" | Type<br />
! style="width: 450px;" | Description<br />
|-<br />
| style="width: 165px;" | rkisp1_mainpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RAW Bayer; Max resolution: 4416*3312;&nbsp;Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1_selfpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RGB; Max resolution: 1920*1080; Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-isp-subdev<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
Internal isp blocks; Support: source/sink pad crop.<br />
<br />
The format on sink pad&nbsp;should be equal to sensor input format, the size should be equal/less than&nbsp;sensor input size.<br />
<br />
The format on source pad&nbsp;should be equal to vdev output format if output format is raw bayer, otherwise it should be&nbsp; YUYV2X8. The size should be equal/less than&nbsp;sink pad size.<br />
<br />
|-<br />
| style="width: 165px;" | rockchip-sy-mipi-dphy<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
MIPI-DPHY&nbsp;Configure<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-statistics<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Provide Image color Statistics information.<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-input-params<br />
| style="width: 131px;" | v4l2_vdev, output<br />
| style="width: 450px;" | <br />
Accept params for AWB, BLC...... Image enhancement blcoks<br />
<br />
|}<br />
<br />
=== Sensor Driver Requirement ===<br />
<br />
The sensor driver should implement controls in the following table.&nbsp;<br />
<br />
{| border="1" class="table_style"<br />
|-<br />
! Controls<br />
! Description<br />
! R/W<br />
! Needed by<br />
|-<br />
| V4L2_CID_VBLANK<br />
| <span style="font-size:smaller;">Vertical blanking. The idle period after every frame during which no image data is produced. The unit of vertical blanking is a line. Every line has length of the image width plus horizontal blanking at the pixel rate defined by&nbsp;<code>V4L2_CID_PIXEL_RATE</code>&nbsp;control in the same sub-device.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_HBLANK<br />
| <span style="font-size:smaller;">Horizontal blanking. The idle period after every line of image data during which no image data is produced. The unit of horizontal blanking is pixels.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_EXPOSURE<br />
| <span style="font-size:smaller;">Determines the exposure time of the camera sensor. The exposure time is limited by the frame interval. Drivers should interpret the values as 100 µs units, where the value 1 stands for 1/10000th of a second, 10000 for 1 second and 100000 for 10 seconds.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_ANALOGUE_GAIN<br />
| <span style="font-size:smaller;">Analogue gain is gain affecting all colour components in the pixel matrix. The gain operation is performed in the analogue domain before A/D conversion.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_DIGITAL_GAIN<br />
| <span style="font-size:smaller;">Digital gain is the value by which all colour components are multiplied by. Typically the digital gain applied is the control value divided by e.g. 0x100, meaning that to get no digital gain the control value needs to be 0x100. The no-gain configuration is also typically the default.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_PIXEL_RATE<br />
| <span style="font-size:smaller;">Pixel rate in the source pads of the subdev. This control is read-only and its unit is pixels / second.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_LINK_FREQ<br />
| <span style="font-size:smaller;">Data bus frequency. Together with the media bus pixel code, bus type (clock cycles per sample), the data bus frequency defines the pixel rate (<code>V4L2_CID_PIXEL_RATE</code>) in the pixel array (or possibly elsewhere, if the device is not an image sensor). The frame rate can be calculated from the pixel clock, image width and height and horizontal and vertical blanking. While the pixel rate control may be defined elsewhere than in the subdev containing the pixel array, the frame rate cannot be obtained from that information. This is because only on the pixel array it can be assumed that the vertical and horizontal blanking information is exact: no other blanking is allowed in the pixel array. The selection of frame rate is performed by selecting the desired horizontal and vertical blanking. The unit of this control is Hz.</span><br />
| R<br />
| mipi-dphy<br />
|}<br />
<br />
=== Devicetree Bindings ===<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-isp1.txt]<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt]<br />
<br />
<br />
== Linux ==<br />
<br />
=== User applications&nbsp; ===<br />
<br />
The v4l-utils tool and applications&nbsp;<br/> The v4l-utils tool is a V4L2 development kit maintained by Linuxtv[1] . It provides a set&nbsp;<br/> of V4L2 and media framework related tools for configuring V4L2 sub-device properties,&nbsp;<br/> testing V4L2 devices, and providing development libraries such as libv4l2.so and so on.&nbsp;<br/> This chapter mainly introduces two command-line tools in v4l-utils: media-ctl and v4l2-&nbsp;<br/> ctl&nbsp;<br/> media-ctl, used to view and configure topology&nbsp;<br/> v4l2-ctl, used to configure v4l2 controls, capture frames, set cif, isp, sensor&nbsp;<br/> parameters&nbsp;<br/> The format code of different versions of v4l-utils will be different, especially mbus-fmt&nbsp;<br/> part. The version used in this document is v4l-utils-1.14.1 integrated in Linux SDK.&nbsp;<br />
<br />
==== 3A ====<br />
<br />
[https://github.com/rockchip-linux/gstreamer-rockchip-extra/tree/master/gst/rkv4l2/rkcamsrc/rkisp1 https://github.com/rockchip-linux/gstreamer-rockchip-extra/tree/master/gst/rkv4l2/rkcamsrc/rkisp1]<br />
<br />
<br />
&nbsp;<br />
<br />
== Android ==<br />
<br />
=== <del>Camera Hal3</del> ===<br />
<br />
[https://source.android.com/devices/camera/camera3?hl=zh-cn https://source.android.com/devices/camera/camera3]<br />
<br />
= Reproduce =<br />
<br />
The driver currently can run&nbsp;on ASUS Tinker Board and Firefly-RK3288-Reload + Rockchip&nbsp;Debian/Yocto SDK.<br />
<br />
== Source Code ==<br />
<br />
=== Kernel ===<br />
<br />
#4.15 + [https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7231 FORMLIST Patches] <br />
#[https://github.com/rockchip-linux/kernel/tree/release-4.4 Rockchip 4.4 BSP] <br />
<br />
=== Sensor Driver ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/imx219.c IMX219] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/ov5647.c OV5647] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/tc35874x.c TC35874X] <br />
<br />
=== Device Tree ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-miniarm.dts Tinker Board] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-firefly-reload-linux.dts Firefly-rk3288-Reload] <br />
<br />
&nbsp;<br />
<br />
== Test Command ==<br />
<pre>cat /sys/class/video4linux/video*/name<br />
# get self_path videox and main_path videox+1<br />
gst-launch-1.0 rkcamsrc device=/dev/videox+1 io-mode=4&nbsp;! videoconvert&nbsp;! video/x-raw,format=NV12,width=640,height=480&nbsp;! kmssink</pre><br />
<br />
= Others =<br />
<br />
== Topology ==<br />
<pre>Media device information<br />
------------------------<br />
driver rkisp1<br />
model rkisp1<br />
serial <br />
bus info <br />
hw revision 0x0<br />
driver version 0.0.0<br />
<br />
Device topology<br />
- entity 1: rkisp1-isp-subdev (4 pads, 5 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev0<br />
pad0: Sink<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
<- "rockchip-sy-mipi-dphy":1 [ENABLED]<br />
pad1: Sink<br />
<- "rkisp1-input-params":0 [ENABLED]<br />
pad2: Source<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
-> "rkisp1_selfpath":0 [ENABLED]<br />
-> "rkisp1_mainpath":0 [ENABLED]<br />
pad3: Source<br />
-> "rkisp1-statistics":0 [ENABLED]<br />
<br />
- entity 2: rkisp1_selfpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video0<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 3: rkisp1_mainpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video1<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 4: rkisp1-statistics (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video2<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":3 [ENABLED]<br />
<br />
- entity 5: rkisp1-input-params (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video3<br />
pad0: Source<br />
-> "rkisp1-isp-subdev":1 [ENABLED]<br />
<br />
- entity 6: rockchip-sy-mipi-dphy (2 pads, 2 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev1<br />
pad0: Sink<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
<- "imx219 2-0010":0 [ENABLED]<br />
pad1: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rkisp1-isp-subdev":0 [ENABLED]<br />
<br />
- entity 7: imx219 2-0010 (1 pad, 1 link)<br />
type V4L2 subdev subtype Sensor flags 0<br />
device node name /dev/v4l-subdev2<br />
pad0: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rockchip-sy-mipi-dphy":0 [ENABLED]</pre></div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockchip-isp1&diff=2216
Rockchip-isp1
2020-09-23T09:56:32Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
The document below&nbsp;provide&nbsp;basical informations&nbsp;about the&nbsp;rockchip-isp1 driver driver and&nbsp;Image Signal Processing block on Rockchip SoC&nbsp;with&nbsp;examples and details.<br />
<br />
= Hardware =<br />
<br />
More detailed information could be found in TRM chapter "Image Signal Processing", "MIPI D-PHY"&nbsp;, but they are only available under&nbsp;NDA.<br />
<br />
== ISP Details ==<br />
<br />
ISP comprises with:<br />
<br />
*MIPI serial camera interface <br />
*Image Signal Processing <br />
*Many Image Enhancement Blocks <br />
*Crop <br />
*Resize <br />
<br />
=== Block diagram ===<br />
<br />
The completed block diagram&nbsp;can not be pasted from&nbsp;datasheet&nbsp;to here, below&nbsp;diagram&nbsp;is an abstract version:<br />
<br />
[[File:Block.png|1200px|Blocks.png]]<br />
<br />
&nbsp;<br />
<br />
== MIPI Details ==<br />
<br />
There are three D-PHY instances in rockchip SoC, their connection are shown as following figure:<br />
<br />
[[File:Phy.png|600px|Phy.png]]<br />
<br />
= Software =<br />
<br />
== Driver ==<br />
<br />
rockchip-isp1 is a V4L2 based driver for Image Signal Processing block on Rockchip SoC. Compared to the earlier driver&nbsp;rk-isp10, it use&nbsp;Media Controller&nbsp;framework, which it's different from plain v4L2. While the plain v4L2 had a view of the device as a plain DMA based image drabber which connects the input data to the host memory, the Media Controller takes into consideration the fact that a typical video device might consist of multiple sub-devices.<br />
<br />
=== Media Controller Basics ===<br />
<br />
Please read below link carefully,&nbsp;especially if you don't have use it before.<br />
<br />
[https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html https://linuxtv.org/downloads/v4l-dvb-apis/uapi/mediactl/media-controller-intro.html]<br />
<br />
=== Block diagram ===<br />
<br />
==== File view ====<br />
<br />
[[File:Code.png|1200px|Code.png]]<br />
<br />
==== V4l2 view ====<br />
<br />
[[File:Rockchip-isp1-v4l2.png|800px|Rockchip-isp1-v4l2.png]]<br />
<br />
{| border="1" class="table_style" style="width: 768px;"<br />
|-<br />
! style="width: 165px;" | Name<br />
! style="width: 131px;" | Type<br />
! style="width: 450px;" | Description<br />
|-<br />
| style="width: 165px;" | rkisp1_mainpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RAW Bayer; Max resolution: 4416*3312;&nbsp;Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1_selfpath<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Format: YUV, RGB; Max resolution: 1920*1080; Support: Crop<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-isp-subdev<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
Internal isp blocks; Support: source/sink pad crop.<br />
<br />
The format on sink pad&nbsp;should be equal to sensor input format, the size should be equal/less than&nbsp;sensor input size.<br />
<br />
The format on source pad&nbsp;should be equal to vdev output format if output format is raw bayer, otherwise it should be&nbsp; YUYV2X8. The size should be equal/less than&nbsp;sink pad size.<br />
<br />
|-<br />
| style="width: 165px;" | rockchip-sy-mipi-dphy<br />
| style="width: 131px;" | v4l2_subdev<br />
| style="width: 450px;" | <br />
MIPI-DPHY&nbsp;Configure<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-statistics<br />
| style="width: 131px;" | v4l2_vdev, capture<br />
| style="width: 450px;" | <br />
Provide Image color Statistics information.<br />
<br />
|-<br />
| style="width: 165px;" | rkisp1-input-params<br />
| style="width: 131px;" | v4l2_vdev, output<br />
| style="width: 450px;" | <br />
Accept params for AWB, BLC...... Image enhancement blcoks<br />
<br />
|}<br />
<br />
=== Sensor Driver Requirement ===<br />
<br />
The sensor driver should implement controls in the following table.&nbsp;<br />
<br />
{| border="1" class="table_style"<br />
|-<br />
! Controls<br />
! Description<br />
! R/W<br />
! Needed by<br />
|-<br />
| V4L2_CID_VBLANK<br />
| <span style="font-size:smaller;">Vertical blanking. The idle period after every frame during which no image data is produced. The unit of vertical blanking is a line. Every line has length of the image width plus horizontal blanking at the pixel rate defined by&nbsp;<code>V4L2_CID_PIXEL_RATE</code>&nbsp;control in the same sub-device.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_HBLANK<br />
| <span style="font-size:smaller;">Horizontal blanking. The idle period after every line of image data during which no image data is produced. The unit of horizontal blanking is pixels.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_EXPOSURE<br />
| <span style="font-size:smaller;">Determines the exposure time of the camera sensor. The exposure time is limited by the frame interval. Drivers should interpret the values as 100 µs units, where the value 1 stands for 1/10000th of a second, 10000 for 1 second and 100000 for 10 seconds.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_ANALOGUE_GAIN<br />
| <span style="font-size:smaller;">Analogue gain is gain affecting all colour components in the pixel matrix. The gain operation is performed in the analogue domain before A/D conversion.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_DIGITAL_GAIN<br />
| <span style="font-size:smaller;">Digital gain is the value by which all colour components are multiplied by. Typically the digital gain applied is the control value divided by e.g. 0x100, meaning that to get no digital gain the control value needs to be 0x100. The no-gain configuration is also typically the default.</span><br />
| R/W<br />
| Ae<br />
|-<br />
| V4L2_CID_PIXEL_RATE<br />
| <span style="font-size:smaller;">Pixel rate in the source pads of the subdev. This control is read-only and its unit is pixels / second.</span><br />
| R<br />
| Ae<br />
|-<br />
| V4L2_CID_LINK_FREQ<br />
| <span style="font-size:smaller;">Data bus frequency. Together with the media bus pixel code, bus type (clock cycles per sample), the data bus frequency defines the pixel rate (<code>V4L2_CID_PIXEL_RATE</code>) in the pixel array (or possibly elsewhere, if the device is not an image sensor). The frame rate can be calculated from the pixel clock, image width and height and horizontal and vertical blanking. While the pixel rate control may be defined elsewhere than in the subdev containing the pixel array, the frame rate cannot be obtained from that information. This is because only on the pixel array it can be assumed that the vertical and horizontal blanking information is exact: no other blanking is allowed in the pixel array. The selection of frame rate is performed by selecting the desired horizontal and vertical blanking. The unit of this control is Hz.</span><br />
| R<br />
| mipi-dphy<br />
|}<br />
<br />
=== Devicetree Bindings ===<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-isp1.txt]<br />
<br />
[https://github.com/wzyy2/linux/blob/rkisp1/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt]<br />
<br />
<br />
== Linux ==<br />
<br />
=== User applications&nbsp; ===<br />
<br />
The v4l-utils tool and applications&nbsp;<br/> The v4l-utils tool is a V4L2 development kit maintained by Linuxtv[1] . It provides a set&nbsp;<br/> of V4L2 and media framework related tools for configuring V4L2 sub-device properties,&nbsp;<br/> testing V4L2 devices, and providing development libraries such as libv4l2.so and so on.&nbsp;<br/> This chapter mainly introduces two command-line tools in v4l-utils: media-ctl and v4l2-&nbsp;<br/> ctl&nbsp;<br/> media-ctl, used to view and configure topology&nbsp;<br/> v4l2-ctl, used to configure v4l2 controls, capture frames, set cif, isp, sensor&nbsp;<br/> parameters&nbsp;<br/> The format code of different versions of v4l-utils will be different, especially mbus-fmt&nbsp;<br/> part. The version used in this document is v4l-utils-1.14.1 integrated in Linux SDK.&nbsp;<br />
<br />
==== 3A ====<br />
<br />
[https://github.com/rockchip-linux/gstreamer-rockchip-extra/tree/master/gst/rkv4l2/rkcamsrc/rkisp1 https://github.com/rockchip-linux/gstreamer-rockchip-extra/tree/master/gst/rkv4l2/rkcamsrc/rkisp1]<br />
<br />
=== &nbsp; ===<br />
<br />
== Android ==<br />
<br />
=== <del>Camera Hal3</del> ===<br />
<br />
[https://source.android.com/devices/camera/camera3?hl=zh-cn https://source.android.com/devices/camera/camera3]<br />
<br />
= Reproduce =<br />
<br />
The driver currently can run&nbsp;on ASUS Tinker Board and Firefly-RK3288-Reload + Rockchip&nbsp;Debian/Yocto SDK.<br />
<br />
== Source Code ==<br />
<br />
=== Kernel ===<br />
<br />
#4.15 + [https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7231 FORMLIST Patches] <br />
#[https://github.com/rockchip-linux/kernel/tree/release-4.4 Rockchip 4.4 BSP] <br />
<br />
=== Sensor Driver ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/imx219.c IMX219] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/ov5647.c OV5647] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/i2c/tc35874x.c TC35874X] <br />
<br />
=== Device Tree ===<br />
<br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-miniarm.dts Tinker Board] <br />
#[https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-firefly-reload-linux.dts Firefly-rk3288-Reload] <br />
<br />
&nbsp;<br />
<br />
== Test Command ==<br />
<pre>cat /sys/class/video4linux/video*/name<br />
# get self_path videox and main_path videox+1<br />
gst-launch-1.0 rkcamsrc device=/dev/videox+1 io-mode=4&nbsp;! videoconvert&nbsp;! video/x-raw,format=NV12,width=640,height=480&nbsp;! kmssink</pre><br />
<br />
= Others =<br />
<br />
== Topology ==<br />
<pre>Media device information<br />
------------------------<br />
driver rkisp1<br />
model rkisp1<br />
serial <br />
bus info <br />
hw revision 0x0<br />
driver version 0.0.0<br />
<br />
Device topology<br />
- entity 1: rkisp1-isp-subdev (4 pads, 5 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev0<br />
pad0: Sink<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
<- "rockchip-sy-mipi-dphy":1 [ENABLED]<br />
pad1: Sink<br />
<- "rkisp1-input-params":0 [ENABLED]<br />
pad2: Source<br />
[fmt:SBGGR10_1X10/800x600 field:none<br />
crop.bounds:(0,0)/800x600<br />
crop:(0,0)/800x600]<br />
-> "rkisp1_selfpath":0 [ENABLED]<br />
-> "rkisp1_mainpath":0 [ENABLED]<br />
pad3: Source<br />
-> "rkisp1-statistics":0 [ENABLED]<br />
<br />
- entity 2: rkisp1_selfpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video0<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 3: rkisp1_mainpath (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video1<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":2 [ENABLED]<br />
<br />
- entity 4: rkisp1-statistics (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video2<br />
pad0: Sink<br />
<- "rkisp1-isp-subdev":3 [ENABLED]<br />
<br />
- entity 5: rkisp1-input-params (1 pad, 1 link)<br />
type Node subtype V4L flags 0<br />
device node name /dev/video3<br />
pad0: Source<br />
-> "rkisp1-isp-subdev":1 [ENABLED]<br />
<br />
- entity 6: rockchip-sy-mipi-dphy (2 pads, 2 links)<br />
type V4L2 subdev subtype Unknown flags 0<br />
device node name /dev/v4l-subdev1<br />
pad0: Sink<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
<- "imx219 2-0010":0 [ENABLED]<br />
pad1: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rkisp1-isp-subdev":0 [ENABLED]<br />
<br />
- entity 7: imx219 2-0010 (1 pad, 1 link)<br />
type V4L2 subdev subtype Sensor flags 0<br />
device node name /dev/v4l-subdev2<br />
pad0: Source<br />
[fmt:SRGGB10_1X10/3280x2464 field:none]<br />
-> "rockchip-sy-mipi-dphy":0 [ENABLED]</pre></div>
Kever
http://opensource.rock-chips.com/index.php?title=Distribution&diff=2214
Distribution
2020-09-22T09:09:17Z
<p>Kever: </p>
<hr />
<div><br />
The release rootfs image is based on linaro-alip-jessie.If you want to use other distributions, you need to compile and install components we provide.Do not install the deb under rk-rootfs-build directly.<br />
<br />
We currently provide several components, the guide below only help you make xserver work.<br/> For more details Please refer to each package's wiki.<br />
<br />
There are also many other districbutions support by community or developers.<br />
<br />
= ARCH Linux =<br />
<br />
Here is the guide from Arch Linux to support RK3288 and RK3399 based Chromebook:<br />
<br />
[https://archlinuxarm.org/platforms/armv7/rockchip https://archlinuxarm.org/platforms/armv7/rockchip]<br />
<br />
[https://archlinuxarm.org/platforms/armv8/rockchip/ https://archlinuxarm.org/platforms/armv8/rockchip/]<br />
<br />
and source code here:<br />
<br />
[https://www.google.com/url?q=https://github.com/archlinuxarm/PKGBUILDs/tree/master/core/linux-gru&sa=D&sntz=1&usg=AFQjCNE-M4mxRkDn10G8xLOVN02TsJJKag https://github.com/archlinuxarm/PKGBUILDs/tree/master/core/linux-gru]<br />
<br />
&nbsp;<br />
<br />
= Fedora =<br />
<br />
Here is the guide from Fedora to support RK3288 chromebook:<br />
<br />
[https://fedoraproject.org/wiki/Architectures/ARM/Chromebook https://fedoraproject.org/wiki/Architectures/ARM/Chromebook]<br />
<br />
&nbsp;<br />
<br />
<br />
= See also =<br />
<br />
&nbsp;</div>
Kever
http://opensource.rock-chips.com/index.php?title=File:Rockchip_RK1808_TRM_Part1_V1.2--20190826_open_source.zip&diff=2206
File:Rockchip RK1808 TRM Part1 V1.2--20190826 open source.zip
2020-09-22T03:09:38Z
<p>Kever: </p>
<hr />
<div></div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockusb&diff=2204
Rockusb
2020-06-30T00:46:16Z
<p>Kever: </p>
<hr />
<div><br />
= Introduce =<br />
<br />
Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs.<br />
<br />
&nbsp;<br />
<br />
= Get into Rockusb =<br />
<br />
There are a few cases for&nbsp;Rockchip SoCs to get into Rockusb.<br />
<br />
*maskrom mode, no firmware found on chip, target run maskrom rockusb driver; <br />
*usbplug mode,&nbsp; <br />
*miniLoader rockusb mode, target run miniloader rockusb driver. <br />
*uboot rockusb mode. <br />
<br />
&nbsp;<br />
<br />
<br />
<br />
== Maskrom mode ==<br />
<br />
If&nbsp;there is no bootable&nbsp;firmware found on board, the SoC will run&nbsp;Rockusb driver&nbsp;automatically, we call it Bootrom mode or Maskrom mode.<br />
<br />
If firmware is at somewhere of the board,&nbsp;in order to get into this mode, we can do something to prevent cpu read the firmware successful:<br />
<br />
*for SD-card, unplug the SD-card; <br />
*for eMMC, short the eMMC clock to GND; <br />
*for NAND, short the data line or clock line; <br />
*for SPI, short the spi signal to GND; <br />
*By "reboot bootrom" command in U-Boot and Kernel, WIP. <br />
*erase bootable region with non-bootable data&nbsp;in eMMC or other media devices <br />
<br />
In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size.<br />
<br />
Available command in this mode:<br />
<br />
'db' command: system&nbsp;init the DRAM and run into usbplug(with rockusb driver) mode which have no size limitation in download size.<br />
<br />
'ul' command: 'db' command and download idbloader into eMMC 0x40;<br />
<br />
'uf' command: 'db' command and download image in update.img into eMMC;<br />
<br />
all the other commands need to access DRAM should be after 'db' command.<br />
<br />
== Usbplug mode ==<br />
<br />
The usbplug is a firmware used for USB download with rkdeveloptool db command, with rockusb driver inside, the DRAM already initialized in this mode.<br />
<br />
== Miniloader Rockusb&nbsp;mode ==<br />
<br />
Rockchip legacy image(with U-Boot 2014.10) using miniloader as default USB firmware upgrade path,&nbsp;enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
- &nbsp;there is no next stage firmware found.<br />
<br />
&nbsp; For example, erase bootable data in U-Boot:<br />
<pre style="margin-left: 40px;">mmc erase 0x4000 0x2000</pre><br />
<br />
- &nbsp;run "reboot loader" command in kernel.<br />
<br />
NOTE: In this miniloader rockusb, the offset for rkdeveloptool&nbsp;is not the physical address,<br />
<br />
the physical offset 0~0x2000 is no able to write by wl command;<br />
<br />
'''The physical address of &nbsp;offset in&nbsp;''wl'' command is&nbsp;the offset plus 0x2000''', eg:<br />
<br />
"rkdeveloptool wl 0x2000 uboot.img" will write uboot.img to emmc 0x4000 address.<br />
<br />
== U-Boot&nbsp;Rockusb&nbsp;mode ==<br />
<br />
enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
-&nbsp;Run "reboot loader" command in kernel;<br />
<br />
- Start with cmd in U-Boot shell<br />
<pre>rockusb 0 mmc 0</pre><br />
<br />
&nbsp;<br />
<br />
= USB VID/PID for rockusb =<br />
<br />
Rockchip Vendor ID is 0x2207, and the product ID for different SoCs are different.<br />
<br />
Rockusb product ID:<br />
<br />
*RK3288: 0x320a <br />
*RK3328: 0x320c <br />
*RK3399: 0x330c <br />
<br />
Please use ''lsusb ''command in Linux PC to check if there is a Rockusb device connect.<br />
<br />
&nbsp;<br />
<br />
<br />
= Firmware download =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]&nbsp;and [[Upgradetool|upgrade_tool]] is the tool to do the firmware upgrade for Rockchip SoCs which is using Rockusb protocol via USB.<br />
<br />
Please follow the steps for boot from eMMC for how to use the tool.</div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockusb&diff=2203
Rockusb
2020-06-30T00:44:58Z
<p>Kever: </p>
<hr />
<div><br />
= Introduce =<br />
<br />
Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs.<br />
<br />
&nbsp;<br />
<br />
= Get into Rockusb =<br />
<br />
There are a few cases for&nbsp;Rockchip SoCs to get into Rockusb.<br />
<br />
*maskrom mode, no firmware found on chip, target run maskrom rockusb driver; <br />
*usbplug mode,&nbsp; <br />
*miniLoader rockusb mode, target run miniloader rockusb driver. <br />
*uboot rockusb mode. <br />
<br />
&nbsp;<br />
<br />
<br />
== Maskrom mode ==<br />
<br />
If&nbsp;there is no bootable&nbsp;firmware found on board, the SoC will run&nbsp;Rockusb driver&nbsp;automatically, we call it Bootrom mode or Maskrom mode.<br />
<br />
If firmware is at somewhere of the board,&nbsp;in order to get into this mode, we can do something to prevent cpu read the firmware successful:<br />
<br />
*for SD-card, unplug the SD-card; <br />
*for eMMC, short the eMMC clock to GND; <br />
*for NAND, short the data line or clock line; <br />
*for SPI, short the spi signal to GND; <br />
*By "reboot bootrom" command in U-Boot and Kernel, WIP. <br />
*erase bootable region with non-bootable data&nbsp;in eMMC or other media devices <br />
<br />
In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size.<br />
<br />
Available command in this mode:<br />
<br />
'db' command: system&nbsp;init the DRAM and run into usbplug(with rockusb driver) mode which have no size limitation in download size.<br />
<br />
'ul' command: 'db' command and download idbloader into eMMC 0x40;<br />
<br />
'uf' command: 'db' command and download image in update.img into eMMC;<br />
<br />
== Usbplug mode ==<br />
<br />
The usbplug is a firmware used for USB download with rkdeveloptool db command, with rockusb driver inside, the DRAM already initialized in this mode.<br />
<br />
== Miniloader Rockusb&nbsp;mode ==<br />
<br />
Rockchip legacy image(with U-Boot 2014.10) using miniloader as default USB firmware upgrade path,&nbsp;enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
- &nbsp;there is no next stage firmware found.<br />
<br />
&nbsp; For example, erase bootable data in U-Boot:<br />
<pre style="margin-left: 40px;">mmc erase 0x4000 0x2000</pre><br />
<br />
- &nbsp;run "reboot loader" command in kernel.<br />
<br />
NOTE: In this miniloader rockusb, the offset for rkdeveloptool&nbsp;is not the physical address,<br />
<br />
the physical offset 0~0x2000 is no able to write by wl command;<br />
<br />
'''The physical address of &nbsp;offset in&nbsp;''wl'' command is&nbsp;the offset plus 0x2000''', eg:<br />
<br />
"rkdeveloptool wl 0x2000 uboot.img" will write uboot.img to emmc 0x4000 address.<br />
<br />
== U-Boot&nbsp;Rockusb&nbsp;mode ==<br />
<br />
enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
-&nbsp;Run "reboot loader" command in kernel;<br />
<br />
- Start with cmd in U-Boot shell<br />
<pre>rockusb 0 mmc 0</pre><br />
<br />
&nbsp;<br />
<br />
= USB VID/PID for rockusb =<br />
<br />
Rockchip Vendor ID is 0x2207, and the product ID for different SoCs are different.<br />
<br />
Rockusb product ID:<br />
<br />
*RK3288: 0x320a <br />
*RK3328: 0x320c <br />
*RK3399: 0x330c <br />
<br />
Please use ''lsusb ''command in Linux PC to check if there is a Rockusb device connect.<br />
<br />
&nbsp;<br />
<br />
<br />
= Firmware download =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]&nbsp;and [[Upgradetool|upgrade_tool]] is the tool to do the firmware upgrade for Rockchip SoCs which is using Rockusb protocol via USB.<br />
<br />
Please follow the steps for boot from eMMC for how to use the tool.</div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2187
Boot option
2019-11-15T03:52:05Z
<p>Kever: </p>
<hr />
<div><br />
<br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
<br />
<br />
=== The Pre-bootloader(IDBLoader) ===<br />
<br />
==== What is idbloader ====<br />
<br />
idbloader.img is a Rockchip format pre-loader suppose to work at SoC start up, it contains:<br />
<br />
- IDBlock header which is known by Rockchip BootRom;<br />
<br />
- DRAM init program which is load by MaskRom and running at internal SRAM;<br />
<br />
- loader for next stage which is load by MaskRom and running at DDR SDRAM;<br />
<br />
You can get idbloader with below methods.<br />
<br />
==== Get idbloader for eMMC from Rockchip release loader ====<br />
<br />
No need to package a idbloader.img for eMMC if you are using Rockchip release loader, you can get idbloader on eMMC with below command:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
==== Package the idbloader.img from Rockchip binary: ====<br />
<br />
For SD boot or eMMC(update with rockusb wl cmd), you need a idbloader(combinded with ddr and miniloader) .<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== Package the idbloader.img from U-Boot&nbsp;TPL/SPL(which is fully open source): ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2186
Boot option
2019-11-15T03:49:25Z
<p>Kever: </p>
<hr />
<div><br />
<br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
<br />
=== The Pre-bootloader(IDBloader) ===<br />
<br />
==== What is idbloader ====<br />
<br />
idbloader.img is a Rockchip format pre-loader with:<br />
<br />
- IDBlock header which is known by Rockchip BootRom;<br />
<br />
- DRAM init program which is load by MaskRom and running at internal SRAM;<br />
<br />
- loader for next stage which is load by MaskRom and running at DDR SDRAM;<br />
<br />
You can get idbloader with below methods.<br />
<br />
==== Get idbloader for eMMC from Rockchip release loader ====<br />
<br />
No need to package a idbloader for eMMC if you are using Rockchip release loader, you can get idbloader on eMMC with below command:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
==== Package the idbloader.img from Rockchip binary: ====<br />
<br />
For SD boot or eMMC(update with rockusb wl cmd), you need a idbloader(combinded with ddr and miniloader) .<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== Package the idbloader.img from U-Boot&nbsp;TPL/SPL(which is fully open source): ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2185
Boot option
2019-11-15T03:48:50Z
<p>Kever: </p>
<hr />
<div><br />
<br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
=== The Pre-bootloader(IDBloader) ===<br />
<br />
==== What is idbloader ====<br />
<br />
idbloader.img is a Rockchip format pre-loader with:<br />
<br />
- IDBlock header which is known by Rockchip BootRom;<br />
<br />
- DRAM init program which is load by MaskRom and running at internal SRAM;<br />
<br />
- loader for next stage which is load by MaskRom and running at DDR SDRAM;<br />
<br />
You can get idbloader with below methods.<br />
<br />
==== Get idbloader for eMMC from Rockchip release loader ====<br />
<br />
No need to package a idbloader for eMMC if you are using Rockchip release loader, you can get idbloader on eMMC with below command:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
==== Package the idbloader.img from Rockchip binary: ====<br />
<br />
==== For SD boot or eMMC(update with rockusb wl cmd), you need a idbloader(combinded with ddr and miniloader) . ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== Package the idbloader.img from U-Boot&nbsp;TPL/SPL(which is fully open source): ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2184
Boot option
2019-11-15T03:46:20Z
<p>Kever: </p>
<hr />
<div><br />
<br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
<br />
=== The Pre-bootloader(IDBloader) ===<br />
<br />
==== idbloader.img ====<br />
<br />
idbloader.img is a Rockchip format pre-loader with:<br />
<br />
- IDBlock header which is known by Rockchip BootRom;<br />
<br />
- DRAM init program which is load by MaskRom and running at internal SRAM;<br />
<br />
- loader for next stage which is load by MaskRom and running at DDR SDRAM;<br />
<br />
You can get idbloader with below methods.<br />
<br />
No need to package a idbloader for eMMC if you are using Rockchip release loader, you can get idbloader on eMMC with below command:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
Package the idbloader.img from Rockchip binary:<br />
<br />
For SD boot or eMMC(update with rockusb wl cmd), you need a idbloader(combinded with ddr and miniloader) .<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== Package the idbloader.img from U-Boot&nbsp;TPL/SPL(which is fully open source): ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockusb&diff=2181
Rockusb
2019-09-04T06:42:07Z
<p>Kever: </p>
<hr />
<div><br />
= Introduce =<br />
<br />
Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs.<br />
<br />
&nbsp;<br />
<br />
= Get into Rockusb =<br />
<br />
There are a few cases for&nbsp;Rockchip SoCs to get into Rockusb.<br />
<br />
*maskrom mode, no firmware found on chip, target run maskrom rockusb driver; <br />
*usbplug mode,&nbsp; <br />
*miniLoader rockusb mode, target run miniloader rockusb driver. <br />
*uboot rockusb mode. <br />
<br />
&nbsp;<br />
<br />
== Maskrom mode ==<br />
<br />
If&nbsp;there is no bootable&nbsp;firmware found on board, the SoC will run&nbsp;Rockusb driver&nbsp;automatically, we call it Bootrom mode or Maskrom mode.<br />
<br />
If firmware is at somewhere of the board,&nbsp;in order to get into this mode, we can do something to prevent cpu read the firmware successful:<br />
<br />
*for SD-card, unplug the SD-card; <br />
*for eMMC, short the eMMC clock to GND; <br />
*for NAND, short the data line or clock line; <br />
*for SPI, short the spi signal to GND; <br />
*By "reboot bootrom" command in U-Boot and Kernel, WIP. <br />
*erase bootable region with non-bootable data&nbsp;in eMMC or other media devices <br />
<br />
In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size.<br />
<br />
Use db command in rkdeveloptool, system will init the DRAM and run into usbplug(with rockusb driver) mode which have no size limitation in download size.<br />
<br />
== Usbplug mode ==<br />
<br />
The usbplug is a firmware used for USB download with rkdeveloptool db command, with rockusb driver inside, the DRAM already initialized in this mode.<br />
<br />
== Miniloader Rockusb&nbsp;mode ==<br />
<br />
Rockchip legacy image(with U-Boot 2014.10) using miniloader as default USB firmware upgrade path,&nbsp;enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
- &nbsp;there is no next stage firmware found.<br />
<br />
&nbsp; For example, erase bootable data in U-Boot:<br />
<pre style="margin-left: 40px;">mmc erase 0x4000 0x2000</pre><br />
<br />
- &nbsp;run "reboot loader" command in kernel.<br />
<br />
NOTE: In this miniloader rockusb, the offset for rkdeveloptool&nbsp;is not the physical address,<br />
<br />
the physical offset 0~0x2000 is no able to write by wl command;<br />
<br />
'''The physical address of &nbsp;offset in&nbsp;''wl'' command is&nbsp;the offset plus 0x2000''', eg:<br />
<br />
"rkdeveloptool wl 0x2000 uboot.img" will write uboot.img to emmc 0x4000 address.<br />
<br />
== U-Boot&nbsp;Rockusb&nbsp;mode ==<br />
<br />
enter this mode with:<br />
<br />
- Press 'recovery' or 'volumn +' key pressed when power up;<br />
<br />
-&nbsp;Run "reboot loader" command in kernel;<br />
<br />
- Start with cmd in U-Boot shell<br />
<pre>rockusb 0 mmc 0</pre><br />
<br />
&nbsp;<br />
<br />
= USB VID/PID for rockusb =<br />
<br />
Rockchip Vendor ID is 0x2207, and the product ID for different SoCs are different.<br />
<br />
Rockusb product ID:<br />
<br />
*RK3288: 0x320a <br />
*RK3328: 0x320c <br />
*RK3399: 0x330c <br />
<br />
Please use ''lsusb ''command in Linux PC to check if there is a Rockusb device connect.<br />
<br />
&nbsp;<br />
<br />
<br />
= Firmware download =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]&nbsp;and [[Upgradetool|upgrade_tool]] is the tool to do the firmware upgrade for Rockchip SoCs which is using Rockusb protocol via USB.<br />
<br />
Please follow the steps for boot from eMMC for how to use the tool.</div>
Kever
http://opensource.rock-chips.com/index.php?title=U-Boot&diff=2180
U-Boot
2019-09-04T06:39:42Z
<p>Kever: </p>
<hr />
<div><br />
= Download U-Boot =<br />
<br />
<br />
== Upstream U-Boot ==<br />
<br />
You can clone the u-boot repository by running:<br />
<pre>git clone https://gitlab.denx.de/u-boot/u-boot.git</pre><br />
<br />
Alternatively you can use u-boot-rockchip instead which may with some patches not get in mainline:<br />
<pre>git clone https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git</pre><br />
<br />
&nbsp;<br />
<br />
== Rockchip U-Boot ==<br />
<br />
You can clone the u-boot repository by running:<br />
<pre>git clone https://github.com/rockchip-linux/u-boot.git<br />
</pre><br />
<br />
<br />
= Supported Devices =<br />
<br />
Upstream U-Boot support Rockchip SoCs:<br />
<br />
RK3036, RK3188,&nbsp;[http://opensource.rock-chips.com/wiki_RK3288 RK3288],&nbsp;[http://opensource.rock-chips.com/wiki_RK3328 RK3328],&nbsp;[http://opensource.rock-chips.com/wiki_RK3399 RK3399]<br />
<br />
*RK3036 boards supported: <br />
<br />
#EVB RK3036 - use evb-rk3036 configuration <br />
#Kylin - use kylin_rk3036 configuration <br />
<br />
*RK3288 boards supported: <br />
<br />
#EVB RK3288 - use evb-rk3288 configuration <br />
#Firefly RK3288 - use firefly-rk3288 configuration <br />
#Hisense Chromebook - use chromebook_jerry configuration <br />
#Miniarm RK3288 - use miniarm-rk3288 configuration <br />
#PopMetal RK3288 - use popmetal-rk3288 configuration <br />
#Radxa Rock 2 - use rock2 configuration <br />
#ASUS Tinker <br />
<br />
*RK3188 boards&nbsp;supported: <br />
<br />
#Radxa Rock - use rock&nbsp;configuration <br />
<br />
*RK3328 boards&nbsp;supported: <br />
<br />
#EVB RK3328 - use evb-rk3328 configuration <br />
<br />
*RK3399 boards&nbsp;supported: <br />
<br />
#EVB RK3399 - use evb-rk3399 configuration<br />
<br />
= Get a toolchain =<br />
<br />
If you haven't done so before, get a suitable&nbsp;toolchain&nbsp;installed and add it&nbsp;to your PATH.<br />
<br />
In Ubuntu 14.04, you can use below command to install cross compiler for armv7:<br />
<pre>sudo apt-get install gcc-arm-linux-gnueabi</pre><br />
<br />
Or for ARM64<br />
<pre>sudo apt-get install gcc-aarch64-linux-gnu<br />
</pre><br />
<br />
Note that the latest U-Boot require version gcc-5.0 and later, we recommand to use linaro 6.3.1.<br />
<pre>https://github.com/rockchip-linux/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.git</pre><br />
<pre>https://github.com/rockchip-linux/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.git</pre><br />
<br />
= Build U-Boot =<br />
<br />
== Configure U-Boot ==<br />
<br />
First you need to choose a correct defconfig for your board;<br />
<br />
When you have determined what <board_name> you want to build, configure:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi- <board_name>_defconfig</pre><br />
<br />
You may need to change the U-Boot function/feature support by modify the defconfig file or,<br />
<br />
there is also menuconfig to play with settings if you feel like it:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi- menuconfig<br />
</pre><br />
<br />
&nbsp;<br />
<br />
== Buid Rockchip U-Boot ==<br />
<br />
For&nbsp;convenience, Rockchip provide a &nbsp;script 'make.sh' to make it easy to get everything before kernel, this script need toolchain and [https://github.com/rockchip-linux/rkbin rkbin] support.<br />
<pre>├── prebuilts<br />
│ └── gcc<br />
│ └── linux-x86 <br />
│ ├── aarch64<br />
│ └── arm<br />
├── rkbin<br />
├── u-boot</pre><br />
<br />
expample for build rk3399:<br />
<pre>./make.sh rk3399</pre><br />
<br />
and&nbsp;use './make.sh -h' for more option.<br />
<br />
The output will including pre-loader, trust and u-boot image which is ready to use with rockchip upgrade tool,&nbsp;<br />
<pre>u-boot/<br />
├── rk3399_loader_v1.09.112.bin<br />
├── trust.img<br />
└── uboot.img</pre><br />
<br />
&nbsp;<br />
<br />
== Build Upstream U-Boot ==<br />
<br />
This is common and available for both Upstream U-Boot and Rockchip U-Boot.<br />
<br />
For armv7:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi-</pre><br />
<br />
or for ARM64:<br />
<pre>make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-</pre><br />
<br />
In order to support debug symbol in ARM DS-5, you may need add ctags in make command:<br />
<pre>CFLAGS='-gdwarf-3'</pre><br />
<br />
The output including u-boot.bin, spl/u-boot-spl.bin, tpl/u-boot-tpl.bin at this step, and you need to package it with mkimage tool before use with rockchip upagrade tool. Get detail at&nbsp;[http://opensource.rock-chips.com/wiki_Boot_option boot option].<br />
<br />
'''Support ATF with SPL FIT image'''<br />
<br />
For trust support in SPL, we are using FIT image with 'mkimage' cmd in Makefile and its script defined in defconfig:<br />
<pre>make u-boot.itb</pre><br />
<br />
Note: please copy the trust binary(optee.bin or bl31.elf from rkbin project) to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
The output u-boot.itb is a its based package including u-boot-nodtb.bin, board.dtb, and trust binaries which can be used directly with upgrade tool.<br />
<pre>├── u-boot <br />
│ ├── u-boot.bin<br />
│ ├── u-boot.itb<br />
│ ├── spl<br />
│ │ └── u-boot-spl.bin<br />
│ └── tpl <br />
│ └── u-boot-tpl.bin</pre><br />
<br />
= Install U-Boot =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Boot_option boot option]&nbsp;about how to<br />
<br />
- package the available binaries<br />
<br />
- flash and boot from eMMC/SD card.<br />
<br />
<br />
<br />
= Boot cmd =<br />
<br />
Rockchip U-Boot supports image type:<br />
<br />
Android boot(boot_android), Rockchip RKIMG boot(boot_rockchip) and LInux distro boot(distro_bootcmd).<br />
<br />
Upstream U-Boot supports image type::<br />
<br />
Linux distro boot(distro_bootcmd).<br />
<br />
= Firmware download in U-Boot =<br />
<br />
In U-Boot, there are multi way to update image into emmc via U-Boot, you can chose any of one easy use for you.<br />
<br />
fastboot:&nbsp;See&nbsp;[http://opensource.rock-chips.com/wiki_Fastboot fastboot]<br />
<br />
rockusb: See [[Rockusb|rockusb]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Uboot&diff=2179
Uboot
2019-09-04T03:16:37Z
<p>Kever: </p>
<hr />
<div><br />
We recommand use below command to build U-Boot. It will use&nbsp;RK_UBOOT_DEFCONFIG in&nbsp;device/rockchip/.BoardConfig.mk to build U-Boot. Please modify RK_UBOOT_DEFCONFIG if it don't match your board.&nbsp;<br />
<br />
In your linux SDK root directory.<br />
<pre>./build.sh uboot<br />
</pre><br />
<br />
Or, you can use a separate command. In your linux SDK root directory. enter to U-Boot directory.&nbsp;<br />
<pre>cd u-boot<br />
</pre><br />
<br />
For RK3399&nbsp;sapphire-excavator board, VS-RK3399 board,&nbsp;Rock960 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh evb-rk3399<br />
</pre><br />
<br />
For firefly-rk3399&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh firefly-rk3399<br />
</pre><br />
<br />
For all other rk3399&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh rk3399<br />
</pre><br />
<br />
For firefly-rk3288 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh firefly-rk3288<br />
</pre><br />
<br />
For rk3288-evb-act8846&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh evb-rk3288<br />
</pre><br />
<br />
For rk3288-evb-rk808&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh fennec-rk3288<br />
</pre><br />
<br />
For rk3288 tinker&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh tinker-rk3288<br />
</pre><br />
<br />
For phytec-rk3288&nbsp;board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh phycore-rk3288<br />
</pre><br />
<br />
For rk3288-evb-rk1608 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh evb-rk3288-rk1608</pre><br />
<br />
For all other rk3288 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh rk3288</pre><br />
<br />
For all rk1808 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh rk1808</pre><br />
<br />
For px30 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh evb-px30</pre><br />
<br />
For all other px30 board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh px30</pre><br />
<br />
For all RK3399Pro board. Use below command to build the U-Boot:&nbsp;<br />
<pre>./make.sh rk3399pro</pre><br />
<br />
It will generate 3 binary image: rk3xxx_loader_vx.xx.xxx.bin, trust.img, uboot.img.&nbsp;<br />
<br />
rk3xxx_loader_vx.xx.xxx.bin: Rockchip miniloader. rk3xxx is the part number of the chip. vx.xx.xxx is the version number. Please flash this binary to miniloader partition.&nbsp;<br />
<br />
trust.img:&nbsp;ARM Trusted Firmware, Please flash this binary to trust partition<br />
<br />
uboot.img: The U-Boot image, Please flash this binary to uboot partition<br />
<pre>u-boot/<br />
├── rk3399_loader_v1.09.112.bin<br />
├── trust.img<br />
└── uboot.img<br />
</pre><br />
<br />
Rockchip now only offically support miniloader+U-Boot boot to simplify the customer product design.&nbsp; You can refer to&nbsp;[http://opensource.rock-chips.com/wiki_Boot_option boot option]&nbsp;page for more boot path. But do remember that you should do it all by your own. Rockchip won't provide technical support for these boot option.&nbsp;</div>
Kever
http://opensource.rock-chips.com/index.php?title=Kernel&diff=2178
Kernel
2019-09-04T03:15:56Z
<p>Kever: </p>
<hr />
<div><br />
We recommand use below command to build kernel. It will use&nbsp;RK_KERNEL_DEFCONFIG and RK_KERNEL_DTS in&nbsp;device/rockchip/.BoardConfig.mk to build kernel. Please modify RK_KERNEL_DEFCONFIG and RK_KERNEL_DTS if it don't&nbsp;match your board.&nbsp;<br />
<br />
In your linux SDK root directory.<br />
<pre>./build.sh kernel<br />
</pre><br />
<br />
Or, you can use a separate command.&nbsp;In your linux SDK root directory. enter to kernel directory.&nbsp;<br />
<pre>cd kernel<br />
</pre><br />
<br />
Config your kernel.<br />
<br />
For ARM v7: RK3288<br />
<pre>make ARCH=arm rockchip_linux_defconfig<br />
</pre><br />
<br />
For ARM V8: RK3399, RK3328, RK1808, RK3399Pro, PX30<br />
<pre>make ARCH=arm64 rockchip_linux_defconfig<br />
</pre><br />
<br />
For RK3399&nbsp;sapphire-excavator board, VS-RK3399 board,&nbsp;Rock960 board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm64 rk3399-sapphire-excavator-linux.img -j8<br />
</pre><br />
<br />
For firefly-rk3399&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm64 rk3399-firefly-linux.img -j8<br />
</pre><br />
<br />
For rk1808-evb&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm64 rk1808-evb-v10.img -j8</pre><br />
<br />
For rk3399pro-evb board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm64 rk3399pro-evb-v11-linux.img -j8</pre><br />
<br />
For px30-evb board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm64 px30-evb-ddr3-v10-linux.img -j8</pre><br />
<br />
For firefly-rk3288 board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-firefly.img -j8<br />
</pre><br />
<br />
For rk3288-evb-act8846&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-evb-act8846.img -j8<br />
</pre><br />
<br />
For rk3288-evb-rk808&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-evb-rk808-linux.img -j8<br />
</pre><br />
<br />
For rk3288 tinker&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-miniarm.img -j8<br />
</pre><br />
<br />
For phytec-rk3288&nbsp;board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-phycore-rdk.img -j8<br />
</pre><br />
<br />
For rk3288-evb-rk1608 board. Use below command to build the kernel:&nbsp;<br />
<pre>make ARCH=arm rk3288-evb-rk1608.img -j8</pre><br />
<br />
It will generate boot.img(ARM v8) or zboot.img(ARM v7):&nbsp;&nbsp;it pack kernel image and&nbsp;resource image into Android boot image format. Please flash this binary to boot partition</div>
Kever
http://opensource.rock-chips.com/index.php?title=Popmetal&diff=2177
Popmetal
2019-09-04T03:15:15Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Image =<br />
<br />
<br />
<br />
= See also =<br />
<br />
#[[Firefly-RK3288|Firefly-RK3288]] <br />
#[[Firefly-RK3288_reload|Firefly-RK3288_reload]] <br />
#[[Rock2_Square|Rock2_Square]] <br />
#[[Rock2_Full|Rock2_Full]] <br />
#[[PhyCORE-RK3288|phyCORE-RK328]][[PhyCORE-RK3288|8]]<br />
<br />
= References =<br />
<br />
1.[http://10.10.10.12:8444/images/f/f4/PopMetal_EVB.rar PopMetal_EVB]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Board_Config&diff=2176
Board Config
2019-09-04T03:14:08Z
<p>Kever: </p>
<hr />
<div><br />
= Board config =<br />
<br />
<br />
<br />
<br />
<br />
== defconfig and dts ==<br />
<br />
<span style="font-size: 13px; line-height: 1.6;">Every Board has its device tree file and config file required by the kernel and uboot. Therefore, you will need to choose the correct dts and config to build the source.Below list various Boards and the matching file.</span><br />
<br />
{| border="1" class="table_style" style="width: 1020px;"<br />
|-<br />
! rowspan="2" style="width: 253px;" | board<br />
! rowspan="2" style="width: 172px;" | uboot<br />
! rowspan="2" style="width: 167px;" | kernel config<br />
! rowspan="2" style="width: 287px;" | kernel dts<br />
! colspan="3" rowspan="1" style="width: 287px;" | Hardware<br />
|-<br />
! style="width: 287px;" | DDR<br />
! style="width: 287px;" | PMIC<br />
! style="width: 287px;" | Boot<br />
|-<br />
| style="width: 153px;" | rk3288-evb<br />
| style="width: 172px;" | evb-rk3288_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-evb-act8846.dts&nbsp;<br />
| style="width: 287px; text-align: center;" | &nbsp;LPDDR3<br />
| style="width: 287px; text-align: center;" | &nbsp;act8846<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3288-evb-rk808<br />
| style="width: 172px;" | <del>fennec-rk3288_defconfig</del><br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-evb-rk808-linux.dts<br />
| style="width: 287px; text-align: center;" | LPDDR3<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3288-miniarm<br />
| style="width: 172px;" | tinker-rk3288_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-miniarm.dts<br />
| style="width: 287px; text-align: center;" | LPDDR3<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | sd-card boot<br />
|-<br />
| style="width: 153px;" | rk3288-firefly<br />
| style="width: 172px;" | firefly-rk3288_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-firefly.dts<br />
| style="width: 287px; text-align: center;" | DDR3<br />
| style="width: 287px; text-align: center;" | act8846<br />
| style="width: 287px; text-align: center;" | sd-card boot<br />
|-<br />
| style="width: 153px;" | rk3288-firefly-reload<br />
| style="width: 172px;" | <del>f<var>irefly-rk3288_defconfig</var></del><br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-firefly-reload-linux.dts<br />
| style="width: 287px; text-align: center;" | DDR3<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | sd-card boot<br />
|-<br />
| style="width: 153px;" | rk3288-phytec<br />
| style="width: 172px;" | phtec-rk3288_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3288-phytec-rdk.dts<br />
| style="width: 287px; text-align: center;" | DDR3<br />
| style="width: 287px; text-align: center;" | rk818<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3328-evb<br />
| style="width: 172px;" | evb-rk3328_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3328-evb.dts<br />
| style="width: 287px; text-align: center;" | DDR3<br />
| style="width: 287px; text-align: center;" | rk805<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3399-excavator<br />
| style="width: 172px;" | evb-rk3399_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3399-sapphire-excavator-linux.dts<br />
| style="width: 287px; text-align: center;" | LPDDR4<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3399-firefly<br />
| style="width: 172px;" | firefly-rk3399_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3399-firefly-linux.dts<br />
| style="width: 287px; text-align: center;" | LPDDR4<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|-<br />
| style="width: 153px;" | rk3036-kylin<br />
| style="width: 172px;" | kylin-rk3036_defconfig<br />
| style="width: 167px;" | rockchip_linux_defconfig<br />
| style="width: 287px;" | rk3036-kylin.dts<br />
| style="width: 287px; text-align: center;" | DDR3<br />
| style="width: 287px; text-align: center;" | rk808<br />
| style="width: 287px; text-align: center;" | emmc boot<br />
|}<br />
<br />
&nbsp;<br />
<br />
== Config Per Chip ==<br />
<br />
{| border="1" class="table_style"<br />
|-<br />
! chip<br />
! Kernel eMMC index<br />
! Kernel SD index<br />
! Uboot eMMC index<br />
! Uboot SD index<br />
! Baud speed<br />
|-<br />
| rk3399<br />
| 1<br />
| 0<br />
| 0<br />
| 1<br />
| 1500000<br />
|-<br />
| rk3328<br />
| 2<br />
| 0<br />
| 0<br />
| 1<br />
| 1500000<br />
|-<br />
| rk3288<br />
| 2<br />
| 0<br />
| 0<br />
| 1<br />
| 115200<br />
|-<br />
| rk3036<br />
| 2<br />
| 0<br />
| 0<br />
| -<br />
| 115200<br />
|}<br />
<br />
----</div>
Kever
http://opensource.rock-chips.com/index.php?title=File:Rockchip_RK1808_TRM_Part1_V1.2--20190826_open_source.rar&diff=2161
File:Rockchip RK1808 TRM Part1 V1.2--20190826 open source.rar
2019-09-04T02:48:41Z
<p>Kever: </p>
<hr />
<div></div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2160
Boot option
2019-09-04T02:34:06Z
<p>Kever: </p>
<hr />
<div><br />
<br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
=== The Pre-bootloader ===<br />
<br />
==== Rockchip Miniloader ====<br />
<br />
Package the image from Rockchip binary:<br />
<br />
No need to package a idbloader for eMMC because you can use below command to write idbloader from loader:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
For SD boot, you need a idbloader(combinded with ddr and miniloader) to write to SD card.<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== idbloader.img with tpl/spl ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img/idbspl.img&nbsp;to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2159
Boot option
2019-09-04T02:32:41Z
<p>Kever: </p>
<hr />
<div><br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
<br />
== Boot flow ==<br />
<br />
This chapter introduce the generic boot flow for Rockchip Application Processors, including&nbsp;the detail about what image we may use in Rockchip platform&nbsp;for kind of boot path:<br />
<br />
- use U-Boot TPL/SPL from upsream or rockchip U-Boot, fully source code;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin from Rockchip [https://github.com/rockchip-linux/rkbin rkbin project];<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
=== The Pre-bootloader ===<br />
<br />
<br />
==== Rockchip Miniloader ====<br />
<br />
Package the image from Rockchip binary:<br />
<br />
No need to package a idbloader for eMMC because you can use below command to write idbloader from loader:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
For SD boot, you need a idbloader(combinded with ddr and miniloader) to write to SD card.<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== idbloader.img with tpl/spl ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img/idbspl.img&nbsp;to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockchip_Kernel&diff=2158
Rockchip Kernel
2019-09-02T10:08:43Z
<p>Kever: </p>
<hr />
<div><br />
== Download Kernel ==<br />
<br />
You can clone the rockchip kernel repository from github which is kernel 4.4 based:<br />
<pre>git clone https://github.com/rockchip-linux/kernel.git</pre><br />
<br />
&nbsp;<br />
<br />
= Supported SoCs and Devices =<br />
<br />
Rockchip kernel 4.4 supports:<br />
<br />
RK3036, RK3066, RK312X, RK3188, RK322X,[http://opensource.rock-chips.com/wiki_RK3288 RK3288],&nbsp;[http://opensource.rock-chips.com/wiki_RK3328 RK3328], RK3368,&nbsp;[http://opensource.rock-chips.com/wiki_RK3399 RK3399], PX30<br />
<br />
&nbsp;<br />
<br />
= Configure and Build =<br />
<br />
You will need to use rockchip_linux_defconfig for Linux OS<br />
<br />
For ARM v7<br />
<pre>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- rockchip_linux_defconfig<br />
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4<br />
</pre><br />
<br />
For ARM V8<br />
<pre>make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rockchip_linux_defconfig<br />
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4</pre><br />
<br />
Then you can get Image/zImage and dtb file and used for LInux Distro boot.<br />
<br />
'''Rockchip RKIMG format image'''<br />
<br />
RKIMG is a format customized by Rockchip from Android boot image, usually only used by kernel developers. It's support by Rockchip&nbsp; U-Boot.<br />
<br />
For example, build for rk3399-evb with&nbsp;command:<br />
<pre>make rk3399-evb.img</pre><br />
<br />
The output will be as below, boot.img is ramdisk with rockchip header, kernel is zImage/Image with rockchip header, resource is dtb and boot logo with rockchip header.<br />
<pre>kernel/<br />
├── boot.img<br />
├── kernel.img<br />
└── resource.img</pre><br />
<br />
<br />
= Install Boot/kernel for Distro =<br />
<br />
We use distro boot in U-Boot, so we need to make a boot partition for U-Boot with kernel image and dtb inside.<br />
<pre>mkdir boot<br />
cp arch/arm64/boot/dts/rockchip/rk3399-evb.dtb boot/rk3399.dtb<br />
cp arch/arm64/boot/Image boot/</pre><br />
<br />
Add&nbsp;[http://opensource.rock-chips.com/images/6/60/Boot_extlinux.zip extlinux/extlinux.conf]&nbsp;for distro boot.<br />
<pre>mkdir boot/extlinux<br />
vi boot/extlinux/extlinux.conf</pre><br />
<br />
&nbsp;<br />
<pre>label rockchip-kernel-4.4<br />
kernel /Image<br />
fdt /rk3399.dtb<br />
append earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=B921B045-1D rootwait rootfstype=ext4 init=/sbin/init</pre><br />
<br />
For armv7<br />
<pre>label rockchip-kernel-4.4<br />
kernel /zImage<br />
fdt /rk3288.dtb<br />
append earlyprintk console=ttyS2,1500000n8 rw root=PARTUUID=69dad710-2c rootwait rootfstype=ext4 init=/sbin/init</pre><br />
<br />
You need to change the base address of debug UART, root partition for your board.<br />
<br />
Pls reference to&nbsp;[http://opensource.rock-chips.com/wiki_Partitions rockchip Linux parttion definition]&nbsp;for rootfs partition and where boot to flash.<br />
<br />
After all these files prepare completely, we write the file to the boot partition<br />
<br />
Folder tree for armv8(rk3399, rk3328):<br />
<pre>boot<br />
├── extlinux<br />
│ └── extlinux.conf<br />
├── Image<br />
└── rk3399-evb.dtb</pre><br />
<br />
Folder tree for armv7(rk3288), rootfs is optional, and we usually use compressed 'zImage':<br />
<pre>boot_rk3288/<br />
├── extlinux<br />
│ └── extlinux.conf<br />
├── rk3288-evb-rk808.dtb<br />
├── rootfs.cpio.gz<br />
└── zImage<br />
</pre><br />
<br />
== Generate ext2fs&nbsp;boot partition ==<br />
<br />
by genext2fs:<br />
<pre>genext2fs -b 32768 -B $((32*1024*1024/32768)) -d boot/ -i 8192 -U boot_rk3399.img</pre><br />
<br />
According to Rockchip partition definition, you need to flash this image to boot partiton which offset is 0x8000.<br />
<br />
&nbsp;<br />
<br />
== Generate fatfs boot partition ==<br />
<br />
=== Generate boot.img in fatfs ===<br />
<br />
Below commands can generate a fatfs boot.img<br />
<pre>dd if=/dev/zero of=boot.img bs=1M count=32<br />
sudo mkfs.fat boot.img<br />
mkdir tmp<br />
sudo mount boot.img tmp/<br />
cp -r boot/* tmp/<br />
umount tmp</pre><br />
<br />
Done!<br />
<br />
Flash this boot.img to boot partition, which is offset 0x8000 in Rockchip partition definition.<br />
<br />
=== Update boot.img via U-Boot in target ===<br />
<br />
After flash and&nbsp;boot the U-Boot, write the gpt table from default partition table<br />
<pre>gpt write mmc 0 $partitions<br />
gpt verify mmc 0 $partitions</pre><br />
<br />
connect target to PC and start the ums in command line:<br />
<pre>ums 0 mmc 1:6</pre><br />
<br />
We should able to see a device connect to PC, formate and copy data into the partition(dev/sdb6 for example).<br />
<pre>sudo mkfs.fat /dev/sdb6<br />
cp -r boot/* /media/machine/9F35-9565/<br />
</pre><br />
<br />
Done!<br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from U-Boot ==<br />
<br />
If you are using genext2fs to genarate the boot.img, you need write the gpt table in U-Boot command line:<br />
<pre>gpt write mmc 0 $partitions</pre><br />
<br />
Then boot from eMMC or reset:<br />
<pre>boot</pre><br />
<br />
If everything is OK, you should able to see the U-Boot log like this:<br />
<pre>switch to partitions #0, OK<br />
mmc0(part 0) is current device<br />
Scanning mmc 0:6...<br />
Found /extlinux/extlinux.conf<br />
Retrieving file: /extlinux/extlinux.conf<br />
205 bytes read in 82 ms (2 KiB/s)<br />
1: upstream-4.10<br />
Retrieving file: /Image<br />
13484040 bytes read in 1833 ms (7 MiB/s)<br />
append: earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,1500000n8 rw root=PARTUUID=B921B045-1D rootwait rootfstype=ext4 init=/sbin/init<br />
Retrieving file: /rk3399.dtb<br />
61714 bytes read in 54 ms (1.1 MiB/s)<br />
## Flattened Device Tree blob at 01f00000<br />
Booting using the fdt blob at 0x1f00000<br />
Loading Device Tree to 000000007df14000, end 000000007df26111 ... OK<br />
<br />
Starting kernel ...</pre></div>
Kever
http://opensource.rock-chips.com/index.php?title=File:RK3399_hardware_reference2019.zip&diff=2155
File:RK3399 hardware reference2019.zip
2019-08-28T10:08:42Z
<p>Kever: </p>
<hr />
<div></div>
Kever
http://opensource.rock-chips.com/index.php?title=RK3288&diff=2154
RK3288
2019-08-22T07:21:38Z
<p>Kever: </p>
<hr />
<div><br />
{{Infobox SoC<br />
| title = RK3288<br />
| image = [[File:rk3288_soc.png|200px]]<br />
| manufacturer = Rockchip<br />
| process = 28nm<br />
| cpu = Quad-Core ARM Cortex-A17<br />
| ltwo = <br />
| extensions = <br />
| memory = 2-channel LPDDR3/LPDDR2/DDR3/DDR3L<br />
| gpu = ARM Mali-T764<br />
| vpu = <br />
| apu = <br />
| video = HDMI 1.4, MIPI DSI, LVDS, RGB LCD<br />
| audio = I2S, PCM<br />
| network = <br />
| storage = 4x SD Card, eMMC, NAND<br />
| usb = OTG, 2x Host<br />
| other = <br />
| release_date = June 2014<br />
| website = http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html<br />
}}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
Integrated with a Quad-Core [https://en.wikipedia.org/wiki/ARM_Cortex-A17 Cortex-A17]&nbsp;which up to 1.8GHz and ARMMali-T764&nbsp;which supports openGL ES1.1/2.0/3.0, openVG1.1, OpenCL and DirectX11. Abundant&nbsp;interfaces provide&nbsp;a friendly solution for product&nbsp;development. Futhermore<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
The RK3288 offers<big><var>&nbsp;</var></big>an extensible, <big><small><tt>leading&nbsp;performance</tt></small></big>, long-standing heritage platform,ideally suited for &nbsp;set-top box solution, tablet and chromebook.The platform is integrated with a Quad-Core Cortex-A17 which up to 1.8GHz and ARM Mali-T764&nbsp;which supports openGL ES1.1/2.0/3.0, openVG1.1, OpenCL and DirectX11. Abundant&nbsp;interfaces provide&nbsp;a friendly solution for product&nbsp;development. Futhermore, the power consumption is&nbsp;optimal for applications such as imaging/video, communication and broadband infrastructure,and performance audio applications.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 SoC Features =<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" style="width: 972px;"<br />
|-<br />
| style="width: 530px;" | <br />
*CPU: <br />
**Quad Core Cortex-A17&nbsp;up to 1.8GHz <br />
**32KB L1-Cache <br />
**1MB L2-Cache <br />
*Internal SRAM <br />
**96KB total <br />
**First 16KB used by Bootrom when bootup <br />
*GPU: <br />
**ARM Mali-T764 GPU, with TE, ASTC, AFBC technology <br />
**Quad core 3D Graphics engine <br />
**Dual core 2D Graphics engine <br />
**Comply with&nbsp;OpenGL ES1.1/2.0/3.0, OpenVG1.1, OpenCL, DirectX11 <br />
*Display: <br />
**4Kx2K@60fpsHDMI2.0 <br />
**Up to 3840X2160 display resolution <br />
**Support dual-channel LVDS/dual-channel MIPI-DSI/eDP1.1 <br />
*Camera: <br />
**Support up to 5M pixels <br />
**8bits/10bits/12bits raw data interface&nbsp; <br />
*Memory: <br />
**Dual channels 64-bit DRAM controller <br />
**Support DDR3/DDR3L, LPDDR2, LPDDR3 <br />
*Connectivity: <br />
**Embedded 13M ISP and MIPI-CSI2 interface <br />
*Audio: <br />
**I2S/PCM with 8 channels <br />
<br />
| style="width: 429px;" | [[File:3288.png|RTENOTITLE]]<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Documentation =<br />
<br />
#[[Media:Rockchip_RK3288_Datasheet_V2.2-20170301.pdf|Media:Rockchip RK3288 Datasheet V2.2-20170301.pdf]] <br />
#[[Media:Rockchip_RK3288_TRM_V1.2_Part1-20170321.pdf|Rockchip RK3288 TRM V1.2 Part1-20170321.pdf]] <br />
#[http://opensource.rock-chips.com/images/a/ae/Rk3288_hardware_reference.zip Rk3288_hardware_reference.zip] <br />
<br />
&nbsp;<br />
<br />
= Software =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Linux_user_guide Linux User Guide]&nbsp;setup LInux OS generally;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_U-Boot U-Boot]&nbsp;guide to develop U-Boot;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Rockchip_Kernel Rockchip kernel]&nbsp;to develop kernel;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Buildroot buildroot and]&nbsp;[http://opensource.rock-chips.com/wiki_Debian debian&nbsp;to]&nbsp;develop and rootfs.<br />
<br />
&nbsp;<br />
<br />
== Chip configuration ==<br />
<br />
{| border="1" cellpadding="1" cellspacing="1" class="table_style"<br />
|-<br />
! '''chip'''<br />
! '''Kernel eMMC index'''<br />
! '''Kernel SD index'''<br />
! '''Uboot eMMC index'''<br />
! '''Uboot SD index'''<br />
! '''Baud speed'''<br />
|-<br />
| RK3288<br />
| 1<br />
| 0<br />
| 0<br />
| 1<br />
| 115200<br />
|}<br />
<br />
= [http://opensource.rock-chips.com/wiki_Devices#RK3288_Boards RK3288 Devices List] =<br />
<br />
= References =<br />
<br />
#[https://en.wikipedia.org/wiki/ARM_Cortex-A17 https://en.wikipedia.org/wiki/ARM_Cortex-A17] <br />
#[http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html]</div>
Kever
http://opensource.rock-chips.com/index.php?title=RK3399&diff=2153
RK3399
2019-08-22T07:19:38Z
<p>Kever: </p>
<hr />
<div><br />
Rockchip RK3399 SoC integrates&nbsp;dual-core Cortex-A72 and quad-core Cortex-A53 with separate NEON coprocessor, and with&nbsp;ARM Mali-T864 GPU.<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" class="infobox" style="width: 300px;"<br />
|-<br />
| [[File:RK3399 Soc.png|RTENOTITLE]]<br />
|}<br />
<br />
= Overview =<br />
<br />
RK3399 is a low power, high performance processor for computing, personal mobile internet devices and other smart device applications. Based on Big.Little architecture, it integrates dual-core Cortex-A72 and quad-core Cortex-A53 with separate NEON coprocessor.<br/> Many embedded powerful hardware engines provide optimized performance for high-end application. RK3399 supports multi-format video decoders including H.264/H.265/VP9 up to4Kx2K@60fps, especially, H.264/H.265 decoders support 10bits coding, and also supports H.264/MVC/VP8 encoders by 1080p@30fps, high-quality JPEG encoder/decoder, and special image preprocessor and postprocessor.<br/> Embedded 3D GPU makes RK3399 completely compatible with OpenGL ES1.1/2.0/3.0/3.1, OpenCL and DirectX 11.1. Special 2D hardware engine with MMU will maximize display performance and provide very smooth operation.<br/> RK3399 has high-performance dual channel external memory interface (DDR3/DDR3L/LPDDR3/LPDDR4) capable of sustaining demanding memory bandwidths, also provides a complete set of peripheral interface to support very flexible applications.<br />
<br />
&nbsp;<br />
<br />
= SoC Features =<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" style="width: 972px;"<br />
|-<br />
| style="width: 530px;" | <br />
*CPU: <br />
**Big.Little architecture: Dual Cortex-A72 + Quad Cortex-A53, 64-bit CPU <br />
**Frequency is over 1.8GHz (Big cluster) <br />
**L1 cache <br />
***48KB Icache and 32KB Dcache for each A72 <br />
***32KB Icache and 32KB Dcache for each A53 <br />
**L2 cache <br />
***1024KB for big cluster <br />
***512KB for little cluster <br />
*Internal SRAM <br />
**192KB total <br />
**4KB used by bootrom when bootup <br />
*GPU: <br />
**&nbsp;Mali-T864 GPU, OpenGL ES1.1/2.0/3.0/3.1, OpenCL, DX11 <br />
**Supports AFBC (ARM Frame Buffer Compression) <br />
*Display: <br />
**Dual VOP: one supports 4096x2160 with AFBC supported;The other supports 2560x1600 <br />
**Dual channel MIPI-DSI (4 lanes per channel) <br />
**eDP 1.3 (4 lanes with 10.8Gbps) to support display, with PSR <br />
**HDMI 2.0 for 4K 60Hz with HDCP 1.4/2.2 <br />
**DisplayPort 1.2 (4 lanes, up to 4K 60Hz) <br />
**Supports Rec.2020 and conversion to Rec.709 <br />
*Camera: <br />
**&nbsp;Dual mipi CSI,dual ISP,Maximum input resolution of 13M pixels <br />
*Memory: <br />
**Dual channels 64-bit DRAM controller <br />
**Support DDR3/DDR3L, LPDDR3, LPDDR4 <br />
*Connectivity: <br />
**PCIe 2.1 (4 full-duplex lanes with 20Gbps) <br />
**Embedded low power MCU for other application <br />
**8 channels I2S supports 8 channels RX or 8 channels TX <br />
<br />
| style="width: 429px;" | [[File:RK3399 Block Diagram.png|RTENOTITLE]]<br />
|}<br />
<br />
&nbsp;<br />
<br />
= Documentation =<br />
<br />
#[http://opensource.rock-chips.com/images/6/60/Rockchip_RK3399_Datasheet_V1.6-20170301.pdf Rockchip_RK3399_Datasheet_V1.6-20170301.pdf] <br />
#[[Media:Rockchip_RK3399TRM_V1.4_Part1-20170408.pdf|Rockchip RK3399TRM V1.4 Part1-20170408.pdf]] <br />
#[http://opensource.rock-chips.com/images/f/f9/RK3399_Linux_Debain_V1.1_Development_Guide170620.pdf RK3399_Linux_Debain_V1.1_Development_Guide170620.pdf] <br />
#[http://opensource.rock-chips.com/images/5/5d/RK3399_Linux_Debian_v1.1开发说明170620.pdf RK3399 Linux Debian v1.1开发说明170620.pdf] <br />
#[http://opensource.rock-chips.com/images/9/92/RK3399_Linux_Buildroot_V1.2_Development_Guide170619.pdf RK3399_Linux_Buildroot_V1.2_Development_Guide170619.pdf] <br />
#[http://opensource.rock-chips.com/images/0/05/RK3399_Linux_Buildroot_V1.2开发说明170619.pdf RK3399_Linux_Buildroot_V1.2开发说明170619.pdf] <br />
#[http://opensource.rock-chips.com/images/2/20/RK3399_Multimedia_Codec_Benchmark_v1.0.pdf RK3399_Multimedia_Codec_Benchmark_v1.0.pdf] <br />
#[[Media:RK3399_Design_Guide_V1.0_20170420.pdf|RK3399 Design Guide_V1.0_20170420.pdf]] <br />
<br />
= Software =<br />
<br />
See [[Linux_user_guide|Linux User Guide]]&nbsp;setup LInux OS generally;<br />
<br />
See&nbsp;[[U-Boot|U-Boot]]&nbsp;guide to develop U-Boot;<br />
<br />
See&nbsp;[[Rockchip_Kernel|Rockchip kernel]]&nbsp;to develop kernel;<br />
<br />
See [[Buildroot|buildroot and]] [[Debian|debian&nbsp;to]] develop and rootfs.<br />
<br />
&nbsp;<br />
<br />
== Chip configuration ==<br />
<br />
{| border="1" cellpadding="1" cellspacing="1" class="table_style" style="width: 859px;"<br />
|-<br />
! style="width: 68px; text-align: center;" | '''chip'''<br />
! style="width: 181px; text-align: center;" | '''Kernel eMMC index'''<br />
! style="width: 142px; text-align: center;" | '''Kernel SD index'''<br />
! style="width: 158px; text-align: center;" | '''Uboot eMMC index'''<br />
! style="width: 146px; text-align: center;" | '''Uboot SD index'''<br />
! style="width: 132px; text-align: center;" | '''Baud speed'''<br />
|-<br />
| style="width: 68px; text-align: center;" | RK3399<br />
| style="width: 181px; text-align: center;" | 1<br />
| style="width: 142px; text-align: center;" | 0<br />
| style="width: 158px; text-align: center;" | 0<br />
| style="width: 146px; text-align: center;" | 1<br />
| style="width: 132px; text-align: center;" | 1500000<br />
|}<br />
<br />
&nbsp;<br />
<br />
<br />
= [http://opensource.rock-chips.com/wiki_Devices#RK3399_Boards RK3399 Devices List] =<br />
<br />
&nbsp;<br />
<br />
= References =<br />
<br />
[https://en.wikipedia.org/wiki/ARM_Cortex-A72 https://en.wikipedia.org/wiki/ARM_Cortex-A72]<br />
<br />
[http://www.rock-chips.com/a/en/products/RK33_Series/2016/0419/758.html http://www.rock-chips.com/a/en/products/RK33_Series/2016/0419/758.html]<br />
<br />
[https://www.arm.com/zh/products/multimedia/mali-gpu/high-performance/mali-t860-t880.php https://www.arm.com/zh/products/multimedia/mali-gpu/high-performance/mali-t860-t880.php]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2152
Devices
2019-08-22T07:17:30Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Radxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
Lenovo:&nbsp;[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Radxa:&nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2151
Devices
2019-08-22T07:17:05Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Radxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
&nbsp;<br />
<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
Lenovo:&nbsp;[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
&nbsp;<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Radxa:&nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2150
Devices
2019-08-22T07:15:23Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Radxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
&nbsp;<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
Lenovo:&nbsp;[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
Radxa:&nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2149
Devices
2019-08-22T03:53:00Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
<br />
= RK3399 Boards =<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
Lenovo:&nbsp;[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2148
Devices
2019-08-22T03:32:36Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
Lenovo:[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2147
Devices
2019-08-22T03:31:28Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Lenovo:[https://leez.lenovo.com/#/p710 Leez P710]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2146
Devices
2019-08-22T03:10:11Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2145
Devices
2019-08-22T03:03:50Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
= RK3036 Boards =<br />
<br />
Rockchip:&nbsp;[http://rockchip.wikidot.com/kylin Kylin-RK3036]<br />
<br />
&nbsp;<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]<br />
<br />
= RK3399Pro&nbsp;Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/en/portal.php?mod=view&aid=4 TB-RK3399]<br />
<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96ai TB-96AI]<br />
<br />
= RK1808 Boards =<br />
<br />
Rockchip:&nbsp;[http://t.rock-chips.com/portal.php?mod=view&aid=28 TB-RK1808]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://www.96boards.org/documentation/som/tb-96aiot/ TB-96AIoT]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2144
Devices
2019-08-22T02:51:19Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
= RK3036 Boards =<br />
<br />
Rockchip:&nbsp;[http://rockchip.wikidot.com/kylin Kylin-RK3036]<br />
<br />
<br />
<br />
= RK3288 Boards =<br />
<br />
Amarula Electronics: [https://www.amarula-electronics.com/product/vyasa-pico-itx-2-5-single-board-computer Vyasa-RK3288]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
Rdaxa: [https://wiki.radxa.com/Rock2 Rock2]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2143
Devices
2019-08-22T02:50:11Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
= RK3036 Boards =<br />
<br />
Rockchip:&nbsp;[http://rockchip.wikidot.com/kylin Kylin-RK3036]<br />
<br />
<br />
= RK3288 Boards =<br />
<br />
&nbsp;<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Devices&diff=2142
Devices
2019-08-22T02:34:48Z
<p>Kever: </p>
<hr />
<div><br />
Here list the sbc boards that purchase available on market.<br />
<br />
&nbsp;<br />
<br />
= RK3036 Boards =<br />
<br />
Rockchip:&nbsp;[http://rockchip.wikidot.com/kylin Kylin-RK3036]<br />
<br />
= RK3288 Boards =<br />
<br />
Firefly:&nbsp;[[Firefly-RK3288|Firefly-RK3288]]<br />
<br />
ASUS:&nbsp;[[ASUS_Tinker|Tinker Board]]<br />
<br />
Mqmaker: [[MiQi|MiQi]]<br />
<br />
PHYTEC: [[PhyCORE-RK3288|phyCore-RK3288]]<br />
<br />
Linksprite:&nbsp;[[Fennec|PcDuino9 Fennec]]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3288 RICO-3288]<br />
<br />
<br />
<br />
= RK3399 Boards =<br />
<br />
Rockchip: RK3399&nbsp;[[Excavator_sapphire_board|Excavator sapphire]]<br />
<br />
Firefly: [[Firefly-RK3399|Firefly-RK3399]]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [http://en.t-firefly.com/product/rocrk3399pc ROC-RK3399-PC]<br />
<br />
[https://www.theobroma-systems.com/ Theobroma Systems]: [[RK3399-Q7|RK3399-Q7]]<br />
<br />
Pine64: [https://www.pine64.org/?page_id=61454 ROCK64pro]<br />
<br />
Vmars: [https://www.96rocks.com/ ROCK960]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[https://wiki.radxa.com/Rockpi4 Rock Pi 4]<br />
<br />
Pico-ITX: [http://www.aaeon.com/en/p/pico-itx-boards-rico-3399 RICO-3399]<br />
<br />
Orange Pi: [http://www.orangepi.org/Orange%20Pi%20RK3399/ Orangepi-rk3399]<br />
<br />
FriendlyARM: [http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T4 Nano PC T4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 NanoPi NEO4]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4 NanoPi M4]<br />
<br />
Khadas: [https://www.khadas.com/edge Edge-rk3399]<br />
<br />
= RK3328 Boards =<br />
<br />
Pine64:&nbsp;[[ROCK64|ROCK64]]<br />
<br />
Firefly: [[ROC-RK3328-CC|ROC-RK3328-CC]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=U-Boot&diff=2141
U-Boot
2019-08-22T02:16:03Z
<p>Kever: </p>
<hr />
<div><br />
= Download U-Boot =<br />
<br />
<br />
== Upstream U-Boot ==<br />
<br />
You can clone the u-boot repository by running:<br />
<pre>git clone https://gitlab.denx.de/u-boot/u-boot.git</pre><br />
<br />
Alternatively you can use u-boot-rockchip instead which may with some patches not get in mainline:<br />
<pre>git clone https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git</pre><br />
<br />
&nbsp;<br />
<br />
== Rockchip U-Boot ==<br />
<br />
You can clone the u-boot repository by running:<br />
<pre>git clone https://github.com/rockchip-linux/u-boot.git<br />
</pre><br />
<br />
= Supported Devices =<br />
<br />
Upstream U-Boot support Rockchip SoCs:<br />
<br />
RK3036, RK3188,&nbsp;[http://opensource.rock-chips.com/wiki_RK3288 RK3288],&nbsp;[http://opensource.rock-chips.com/wiki_RK3328 RK3328],&nbsp;[http://opensource.rock-chips.com/wiki_RK3399 RK3399]<br />
<br />
*RK3036 boards supported: <br />
<br />
#EVB RK3036 - use evb-rk3036 configuration <br />
#Kylin - use kylin_rk3036 configuration <br />
<br />
*RK3288 boards supported: <br />
<br />
#EVB RK3288 - use evb-rk3288 configuration <br />
#Fennec RK3288 - use fennec-rk3288 configuration <br />
#Firefly RK3288 - use firefly-rk3288 configuration <br />
#Hisense Chromebook - use chromebook_jerry configuration <br />
#Miniarm RK3288 - use miniarm-rk3288 configuration <br />
#PopMetal RK3288 - use popmetal-rk3288 configuration <br />
#Radxa Rock 2 - use rock2 configuration <br />
#ASUS Tinker <br />
<br />
*RK3188 boards&nbsp;supported: <br />
<br />
#Radxa Rock - use rock&nbsp;configuration <br />
<br />
*RK3328 boards&nbsp;supported: <br />
<br />
#EVB RK3328 - use evb-rk3328 configuration <br />
<br />
*RK3399 boards&nbsp;supported: <br />
<br />
#EVB RK3399 - use evb-rk3399 configuration <br />
<br />
= Get a toolchain =<br />
<br />
If you haven't done so before, get a suitable&nbsp;toolchain&nbsp;installed and add it&nbsp;to your PATH.<br />
<br />
In Ubuntu 14.04, you can use below command to install cross compiler for armv7:<br />
<pre>sudo apt-get install gcc-arm-linux-gnueabi</pre><br />
<br />
Or for ARM64<br />
<pre>sudo apt-get install gcc-aarch64-linux-gnu<br />
</pre><br />
<br />
Note that the latest U-Boot require version gcc-5.0 and later, we recommand to use linaro 6.3.1.<br />
<pre>https://github.com/rockchip-linux/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.git</pre><br />
<pre>https://github.com/rockchip-linux/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.git</pre><br />
<br />
= Build U-Boot =<br />
<br />
== Configure U-Boot ==<br />
<br />
First you need to choose a correct defconfig for your board;<br />
<br />
When you have determined what <board_name> you want to build, configure:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi- <board_name>_defconfig</pre><br />
<br />
You may need to change the U-Boot function/feature support by modify the defconfig file or,<br />
<br />
there is also menuconfig to play with settings if you feel like it:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi- menuconfig<br />
</pre><br />
<br />
&nbsp;<br />
<br />
== Buid Rockchip U-Boot ==<br />
<br />
For&nbsp;convenience, Rockchip provide a &nbsp;script 'make.sh' to make it easy to get everything before kernel, this script need toolchain and [https://github.com/rockchip-linux/rkbin rkbin] support.<br />
<pre>├── prebuilts<br />
│ └── gcc<br />
│ └── linux-x86 <br />
│ ├── aarch64<br />
│ └── arm<br />
├── rkbin<br />
├── u-boot</pre><br />
<br />
expample for build rk3399:<br />
<pre>./make.sh rk3399</pre><br />
<br />
and&nbsp;use './make.sh -h' for more option.<br />
<br />
The output will including pre-loader, trust and u-boot image which is ready to use with rockchip upgrade tool,&nbsp;<br />
<pre>u-boot/<br />
├── rk3399_loader_v1.09.112.bin<br />
├── trust.img<br />
└── uboot.img</pre><br />
<br />
&nbsp;<br />
<br />
== Build Upstream U-Boot ==<br />
<br />
This is common and available for both Upstream U-Boot and Rockchip U-Boot.<br />
<br />
For armv7:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabi-</pre><br />
<br />
or for ARM64:<br />
<pre>make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-</pre><br />
<br />
In order to support debug symbol in ARM DS-5, you may need add ctags in make command:<br />
<pre>CFLAGS='-gdwarf-3'</pre><br />
<br />
The output including u-boot.bin, spl/u-boot-spl.bin, tpl/u-boot-tpl.bin at this step, and you need to package it with mkimage tool before use with rockchip upagrade tool. Get detail at&nbsp;[http://opensource.rock-chips.com/wiki_Boot_option boot option].<br />
<br />
'''Support ATF with SPL FIT image'''<br />
<br />
For trust support in SPL, we are using FIT image with 'mkimage' cmd in Makefile and its script defined in defconfig:<br />
<pre>make u-boot.itb</pre><br />
<br />
Note: please copy the trust binary(optee.bin or bl31.elf from rkbin project) to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
The output u-boot.itb is a its based package including u-boot-nodtb.bin, board.dtb, and trust binaries which can be used directly with upgrade tool.<br />
<pre>├── u-boot <br />
│ ├── u-boot.bin<br />
│ ├── u-boot.itb<br />
│ ├── spl<br />
│ │ └── u-boot-spl.bin<br />
│ └── tpl <br />
│ └── u-boot-tpl.bin</pre><br />
<br />
= Install U-Boot =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Boot_option boot option]&nbsp;about how to<br />
<br />
- package the available binaries<br />
<br />
- flash and boot from eMMC/SD card.<br />
<br />
<br />
= Boot cmd =<br />
<br />
Rockchip U-Boot supports:<br />
<br />
Android boot(boot_android), Rockchip RKIMG boot(boot_rockchip) and LInux distro boot(distro_bootcmd).<br />
<br />
Upstream U-Boot supports:<br />
<br />
Linux distro boot(distro_bootcmd).<br />
<br />
= Firmware download in U-Boot =<br />
<br />
In U-Boot, there are multi way to update image into emmc via U-Boot, you can chose any of one easy use for you.<br />
<br />
fastboot:&nbsp;See&nbsp;[http://opensource.rock-chips.com/wiki_Fastboot fastboot]<br />
<br />
rockusb: See [[Rockusb|rockusb]]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Status_Matrix&diff=2140
Status Matrix
2019-07-05T02:46:11Z
<p>Kever: </p>
<hr />
<div><br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
== Rockchip 4.4 Kernel Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| rowspan="2" style="text-align: left;" | ADC<br />
| style="text-align: left;" | SARADC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | TSADC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Clocks<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | CPUFreq<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Crypto<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Mipi-CSI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | ISP<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | DVP/CIF<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: orange;" | WIP<br />
|-<br />
| rowspan="8" style="text-align: left;" | Display (DRM)<br />
| style="text-align: left;" | RGB<br />
| style="background: rgb(255, 255, 255);" | N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | EDP<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | LVDS<br />
| style="background: rgb(255, 255, 255);" | &nbsp;N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | MIPI DSI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| N/A<br />
|-<br />
| style="text-align: left;" | CVBS<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VGA<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| style="text-align: left;" | HDMI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | CEC<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: orange;" | WIP<br />
|-<br />
| colspan="2" style="text-align: left;" | DMA<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | DDR DVFS<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: red;" | NO<br />
|-<br />
| rowspan="2" style="text-align: left;" | Ethernet<br />
| style="text-align: left;" | GMAC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | EMAC<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | I2S<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left" | I2C<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | MsgBox<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Pinctrl<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | PWM<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Power Domain<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | PCIE<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | SD / SDIO / MMC<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SPDIF<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SPI<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | SUSPEND / RESUME<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | USB<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | USB OTG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | TYPEC<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Watchdog<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | GPU<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | VPU<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | RGA<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | IEP<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
== Mainline Kernel Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| rowspan="2" style="text-align: left;" | ADC<br />
| style="text-align: left;" | SARADC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| style="text-align: left;" | TSADC1<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Clocks<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | CPUFreq<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Crypto<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | CSI/ISP<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: orange;" | WIP<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | CIF<br />
| style="background: orange;" | WIP<br />
| style="background: orange;" | WIP<br />
| style="background: orange;" | WIP<br />
|-<br />
| rowspan="8" style="text-align: left;" | Display (DRM)<br />
| style="text-align: left;" | RGB<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| style="text-align: left;" | EDP<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| N/A<br />
|-<br />
| style="text-align: left;" | LVDS<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| N/A<br />
|-<br />
| style="text-align: left;" | MIPI DSI<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| N/A<br />
|-<br />
| style="text-align: left;" | CVBS<br />
| N/A<br />
| N/A<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| style="text-align: left;" | VGA<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| style="text-align: left;" | HDMI<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| style="text-align: left;" | CEC<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: darkgreen;" | INCOMPLETE<br />
|-<br />
| colspan="2" style="text-align: left;" | DMA<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | DDR DVFS<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| rowspan="2" style="text-align: left;" | Ethernet<br />
| style="text-align: left;" | GMAC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| style="text-align: left;" | EMAC<br />
| N/A<br />
| N/A<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | I2S<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left" | I2C<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | MsgBox<br />
| N/A<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Pinctrl<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | PWM<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | Power Domain<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | PCIE<br />
| style="background-color: lightgreen;" | 4.14<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | SD / SDIO / MMC<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SPDIF<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SPI<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | SUSPEND / RESUME<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: darkgreen;" | INCOMPLETE<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | USB<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | USB OTG<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | TYPEC<br />
| style="background-color: lightgreen;" | 4.14<br />
| N/A<br />
| N/A<br />
|-<br />
| colspan="2" style="text-align: left;" | Watchdog<br />
| style="background: lightgreen;" | 4.14<br />
| style="background: lightgreen;" | 4.4<br />
| style="background: lightgreen;" | 4.14<br />
|-<br />
| colspan="2" style="text-align: left;" | GPU<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| colspan="2" style="text-align: left;" | VPU<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|-<br />
| colspan="2" style="text-align: left;" | RGA<br />
| style="background: lightgreen;" | 4.15<br />
| style="background: lightgreen;" | 4.15<br />
| style="background: orange;" | WIP<br />
|-<br />
| colspan="2" style="text-align: left;" | IEP<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
| style="background: red;" | NO<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
== Linux SDK CHIP Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! RK3399<br />
! RK3288<br />
! RK3328<br />
|-<br />
| colspan="2" style="text-align: left;" | Debian<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | Buildroot<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| rowspan="5" style="text-align: left;" | Decode<br />
| style="text-align: left;" | H264<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | H265<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VP8<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | VP9<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | JPEG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| rowspan="3" style="text-align: left;" | Encode<br />
| style="text-align: left;" | H264<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | H265<br />
| style="background-color: white;" | N/A<br />
| style="background: white;" | N/A<br />
| style="background-color: lightgreen;" | SUPPORT<br />
|-<br />
| style="text-align: left;" | JPEG<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background: lightgreen;" | SUPPORT<br />
|-<br />
| colspan="2" style="text-align: left;" | ISP(3A)<br />
| style="background: lightgreen;" | SUPPORT<br />
| style="background-color: lightgreen;" | SUPPORT<br />
| style="background: white;" | N/A<br />
|}<br />
<br />
<br/> &nbsp;<br />
<br />
== Linux&nbsp;Function Status Matrix ==<br />
<br />
{| class="wikitable" style="text-align: center; width: 100%;"<br />
|-<br />
! colspan="2" style="width: 10%; text-align: left;" | Model<br />
! Status<br />
|-<br />
| rowspan="5" style="text-align: left;" | Gstreamer<br />
| style="text-align: left;" | Display<br />
| style="background: lightgreen;" | kmssink(qt eglfs),rkximagesink(x11), waylandsink(wayland)<br />
|-<br />
| style="text-align: left;" | Decode&nbsp;<br />
| style="background: lightgreen;" | h264, h265, vp8, vp9, jpeg<br />
|-<br />
| style="text-align: left;" | Encode<br />
| style="background: lightgreen;" | h264<br />
|-<br />
| style="text-align: left;" | Camera<br />
| style="background: lightgreen;" | support 3A<br />
|-<br />
| style="text-align: left;" | Transform<br />
| style="background: lightgreen;" | RGA<br />
|-<br />
| rowspan="2" style="text-align: left;" | GPU<br />
| style="text-align: left;" | GLES<br />
| style="background: lightgreen;" | libmali<br />
|-<br />
| style="text-align: left;" | OPENCL<br />
| style="background: lightgreen;" | libmali<br />
|-<br />
| colspan="2" rowspan="1" style="text-align: left;" | QT<br />
| style="background: lightgreen;" | QT 5.x<br />
|-<br />
| colspan="2" style="text-align: left;" | <br />
Browser(HTML5 Accelerate)<br />
<br />
| style="background: yellow;" | Community<br />
|-<br />
| colspan="2" style="text-align: left;" | <br />
IOT(Third part Could Service)<br />
<br />
| style="background: lightgreen;" | ROS<br />
|-<br />
| colspan="2" style="text-align: left;" | FFmpeg<br />
| style="background: yellow;" | Community<br />
|-<br />
| colspan="2" style="text-align: left;" | MPV<br />
| style="background: yellow;" | Community<br />
|-<br />
| colspan="2" style="text-align: left;" | KODI<br />
| style="background: yellow;" | Community<br />
|}</div>
Kever
http://opensource.rock-chips.com/index.php?title=File:Rockchip_RK1808_Datasheet_V1.2_20190527.pdf&diff=2131
File:Rockchip RK1808 Datasheet V1.2 20190527.pdf
2019-06-03T02:24:02Z
<p>Kever: </p>
<hr />
<div></div>
Kever
http://opensource.rock-chips.com/index.php?title=RK3328&diff=2129
RK3328
2019-04-25T03:14:41Z
<p>Kever: </p>
<hr />
<div><br />
{{Infobox SoC<br />
| title = RK3328<br />
| image = [[File:rk3328_soc.png|250px]]<br />
| manufacturer = Rockchip<br />
| process = 28nm<br />
| cpu = Quad-Core ARM Cortex-A53<br />
| ltwo = <br />
| extensions = <br />
| memory = DDR3/DDR3L/LPDDR3/DDR4 <br />
| gpu = Mali-450MP4<br />
| vpu = 4K VP9 and 4K 10bits H265/H264 video decode, up to 60fps<br />
| apu = <br />
| video = HDMI 2.0a, <br />
| audio = 8 channels I2S/PDM <br />
| storage = 4x SD Card, eMMC <br />
| usb = 1* USB2.0 otg, 1* USB 2.0 Host, 1* USB 3.0 Host<br />
| other = <br />
| release_date = December 2016<br />
| website = http://www.rock-chips.com/a/en/products/RK33_Series/2017/0118/829.html | Product Page<br />
}} &nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
RK3328 offers a high-integration and power efficiency&nbsp;SOC for 4K HDR OTT/IPTV. It support HDR10 ,HLG HDR ,&nbsp;4K 10bits 30fps H.264 video decoder and 4K 10bits 60fps H265 video decoder.Comply with lots of high-performance interface,such as multi-channel display with HDMI2.0a, TV Encoder, the Quad-core GPU can acheive&nbsp;high-resolution display and game.<br />
<br />
== Cortex-A53 ==<br />
<br />
Quad-core Cortex-A53 is integrated with separate Neon and FPU coprocessor, also with shared L2 Cache.&nbsp;<br />
<br />
[[File:3328.png|RTENOTITLE]]<br />
<br />
= RK3328 SoC Features =<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" style="width: 972px;"<br />
|-<br />
| style="width: 530px;" | <br />
*CPU: <br />
**ARM Cortex-A53&nbsp;Quad-Core&nbsp; <br />
**32KB L1&nbsp;I cache and D cache for each CPU <br />
**256KB L2 cache <br />
*Internal SRAM <br />
**32KB total <br />
*GPU <br />
**&nbsp;Mali-450MP4 <br />
**Comply with Open GL ES1.1/2.0 <br />
*Multi-Media: <br />
**4K VP9 and 4K 10bits H265/H264 video decode, up to 60fps <br />
**1080P other video decoders (VC-1, MPEG-1/2/4, VP8) <br />
**1080P video encoder for H.264 and H.265 <br />
**Support HDR10 ,HLG HDR , Support conversion between SDR and HDR <br />
*Display: <br />
**HDMI 2.0a for 4K@60Hz with HDCP 1.4/2.2 <br />
**Support conversion between Rec.2020 and Rec.709 <br />
*Memory: <br />
**LPDDR3/DDR3/DDR3L/DDR4 <br />
**eMMC 4.51,SDCard, SPI Flash <br />
*External interface <br />
**USB 2.0 x2 and USB 3.0 x1 <br />
**100M Ethernet w/ built-in PHY <br />
**Built-in CVBS and audio DAC <br />
**8 channels I2S IO and 8 chanel digital PDM input (for MIC array) <br />
<br />
| style="width: 429px;" | &nbsp;<br />
|}<br />
<br />
&nbsp;<br />
<br />
= Documentation =<br />
<br />
#[http://opensource.rock-chips.com/images/d/d7/Rockchip_RK3328_Datasheet_V1.1-20170309.pdf Rockchip_RK3328_Datasheet_V1.1-20170309.pdf] <br />
#[http://opensource.rock-chips.com/images/d/d5/RK3328_Linux-Debian_V1.1_Development_Guide-20170711.pdf RK3328_Linux-Debian_V1.1_Development_Guide-20170711.pdf] <br />
#[[Media:Rockchip_RK3328TRM_V1.1-Part1-20170321.pdf|Rockchip RK3328TRM V1.1-Part1-20170321.pdf]] <br />
#[[Media:Rk3328_hardware_reference.zip|Rk3328 hardware reference.zip]] <br />
<br />
&nbsp;<br />
<br />
= Software =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Linux_user_guide Linux User Guide]&nbsp;setup LInux OS generally;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_U-Boot U-Boot]&nbsp;guide to develop U-Boot;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Rockchip_Kernel Rockchip kernel]&nbsp;to develop kernel;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Buildroot buildroot and]&nbsp;[http://opensource.rock-chips.com/wiki_Debian debian&nbsp;to]&nbsp;develop and rootfs.<br />
<br />
&nbsp;<br />
<br />
== Chip configuration ==<br />
<br />
{| border="1" cellpadding="1" cellspacing="1" class="table_style"<br />
|-<br />
! '''chip'''<br />
! '''Kernel eMMC index'''<br />
! '''Kernel SD index'''<br />
! '''Uboot eMMC index'''<br />
! '''Uboot SD index'''<br />
! '''Baud speed'''<br />
|-<br />
| RK3328<br />
| 2<br />
| 0<br />
| 0<br />
| 1<br />
| 1500000<br />
|}<br />
<br />
&nbsp;<br />
<br />
= References =<br />
<br />
1.[https://en.wikipedia.org/wiki/ARM_Cortex-A53 https://en.wikipedia.org/wiki/ARM_Cortex-A53]<br />
<br />
&nbsp;</div>
Kever
http://opensource.rock-chips.com/index.php?title=RK3288&diff=2128
RK3288
2019-04-25T03:06:30Z
<p>Kever: </p>
<hr />
<div><br />
{{Infobox SoC<br />
| title = RK3288<br />
| image = [[File:rk3288_soc.png|200px]]<br />
| manufacturer = Rockchip<br />
| process = 28nm<br />
| cpu = Quad-Core ARM Cortex-A17<br />
| ltwo = <br />
| extensions = <br />
| memory = 2-channel LPDDR3/LPDDR2/DDR3/DDR3L<br />
| gpu = ARM Mali-T764<br />
| vpu = <br />
| apu = <br />
| video = HDMI 1.4, MIPI DSI, LVDS, RGB LCD<br />
| audio = I2S, PCM<br />
| network = <br />
| storage = 4x SD Card, eMMC, NAND<br />
| usb = OTG, 2x Host<br />
| other = <br />
| release_date = June 2014<br />
| website = http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html<br />
}}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
Integrated with a Quad-Core [https://en.wikipedia.org/wiki/ARM_Cortex-A17 Cortex-A17]&nbsp;which up to 1.8GHz and ARMMali-T764&nbsp;which supports openGL ES1.1/2.0/3.0, openVG1.1, OpenCL and DirectX11. Abundant&nbsp;interfaces provide&nbsp;a friendly solution for product&nbsp;development. Futhermore<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Overview =<br />
<br />
The RK3288 offers<big><var>&nbsp;</var></big>an extensible, <big><small><tt>leading&nbsp;performance</tt></small></big>, long-standing heritage platform,ideally suited for &nbsp;set-top box solution, tablet and chromebook.The platform is integrated with a Quad-Core Cortex-A17 which up to 1.8GHz and ARM Mali-T764&nbsp;which supports openGL ES1.1/2.0/3.0, openVG1.1, OpenCL and DirectX11. Abundant&nbsp;interfaces provide&nbsp;a friendly solution for product&nbsp;development. Futhermore, the power consumption is&nbsp;optimal for applications such as imaging/video, communication and broadband infrastructure,and performance audio applications.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= RK3288 SoC Features =<br />
<br />
{| border="0" cellpadding="1" cellspacing="1" style="width: 972px;"<br />
|-<br />
| style="width: 530px;" | <br />
*CPU: <br />
**Quad Core Cortex-A17&nbsp;up to 1.8GHz <br />
**32KB L1-Cache <br />
**1MB L2-Cache <br />
*Internal SRAM <br />
**96KB total <br />
**First 16KB used by Bootrom when bootup <br />
*GPU: <br />
**ARM Mali-T764 GPU, with TE, ASTC, AFBC technology <br />
**Quad core 3D Graphics engine <br />
**Dual core 2D Graphics engine <br />
**Comply with&nbsp;OpenGL ES1.1/2.0/3.0, OpenVG1.1, OpenCL, DirectX11 <br />
*Display: <br />
**4Kx2K@60fpsHDMI2.0 <br />
**Up to 3840X2160 display resolution <br />
**Support dual-channel LVDS/dual-channel MIPI-DSI/eDP1.1 <br />
*Camera: <br />
**Support up to 5M pixels <br />
**8bits/10bits/12bits raw data interface&nbsp; <br />
*Memory: <br />
**Dual channels 64-bit DRAM controller <br />
**Support DDR3/DDR3L, LPDDR2, LPDDR3 <br />
*Connectivity: <br />
**Embedded 13M ISP and MIPI-CSI2 interface <br />
*Audio: <br />
**I2S/PCM with 8 channels <br />
<br />
| style="width: 429px;" | [[File:3288.png|RTENOTITLE]]<br />
|}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Documentation =<br />
<br />
#[[Media:Rockchip_RK3288_Datasheet_V2.2-20170301.pdf|Media:Rockchip RK3288 Datasheet V2.2-20170301.pdf]] <br />
#[[Media:Rockchip_RK3288_TRM_V1.2_Part1-20170321.pdf|Rockchip RK3288 TRM V1.2 Part1-20170321.pdf]] <br />
#[http://opensource.rock-chips.com/images/a/ae/Rk3288_hardware_reference.zip Rk3288_hardware_reference.zip] <br />
<br />
&nbsp;<br />
<br />
= Software =<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Linux_user_guide Linux User Guide]&nbsp;setup LInux OS generally;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_U-Boot U-Boot]&nbsp;guide to develop U-Boot;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Rockchip_Kernel Rockchip kernel]&nbsp;to develop kernel;<br />
<br />
See&nbsp;[http://opensource.rock-chips.com/wiki_Buildroot buildroot and]&nbsp;[http://opensource.rock-chips.com/wiki_Debian debian&nbsp;to]&nbsp;develop and rootfs.<br />
<br />
&nbsp;<br />
<br />
== Chip configuration ==<br />
<br />
{| border="1" cellpadding="1" cellspacing="1" class="table_style"<br />
|-<br />
! '''chip'''<br />
! '''Kernel eMMC index'''<br />
! '''Kernel SD index'''<br />
! '''Uboot eMMC index'''<br />
! '''Uboot SD index'''<br />
! '''Baud speed'''<br />
|-<br />
| RK3288<br />
| 1<br />
| 0<br />
| 0<br />
| 1<br />
| 115200<br />
|}<br />
<br />
= &nbsp; =<br />
<br />
= References =<br />
<br />
#[https://en.wikipedia.org/wiki/ARM_Cortex-A17 https://en.wikipedia.org/wiki/ARM_Cortex-A17] <br />
#[http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html http://www.rock-chips.com/a/en/products/RK32_Series/2014/0504/484.html]</div>
Kever
http://opensource.rock-chips.com/index.php?title=Rockchip_Kernel&diff=2109
Rockchip Kernel
2019-03-15T03:38:17Z
<p>Kever: </p>
<hr />
<div><br />
== Download Kernel ==<br />
<br />
You can clone the rockchip kernel repository from github which is kernel 4.4 based:<br />
<pre>git clone https://github.com/rockchip-linux/kernel.git</pre><br />
<br />
&nbsp;<br />
<br />
= Supported SoCs and Devices =<br />
<br />
Rockchip kernel 4.4 supports:<br />
<br />
RK3036, RK3066, RK312X, RK3188, RK322X,[http://opensource.rock-chips.com/wiki_RK3288 RK3288],&nbsp;[http://opensource.rock-chips.com/wiki_RK3328 RK3328], RK3368,&nbsp;[http://opensource.rock-chips.com/wiki_RK3399 RK3399], PX30<br />
<br />
&nbsp;<br />
<br />
= Configure and Build =<br />
<br />
You will need to use rockchip_linux_defconfig for Linux OS<br />
<br />
For ARM v7<br />
<pre>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- rockchip_linux_defconfig<br />
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4<br />
</pre><br />
<br />
For ARM V8<br />
<pre>make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rockchip_linux_defconfig<br />
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4</pre><br />
<br />
Then you can get Image/zImage and dtb file and used for LInux Distro boot.<br />
<br />
'''Rockchip RKIMG format image'''<br />
<br />
RKIMG is a format customized by Rockchip from Android boot image, usually only used by kernel developers. It's support by Rockchip&nbsp; U-Boot.<br />
<br />
For example, build for rk3399-evb with&nbsp;command:<br />
<pre>make rk3399-evb.img</pre><br />
<br />
The output will be as below, boot.img is ramdisk with rockchip header, kernel is zImage/Image with rockchip header, resource is dtb and boot logo with rockchip header.<br />
<pre>kernel/<br />
├── boot.img<br />
├── kernel.img<br />
└── resource.img</pre><br />
<br />
<br />
= Install Boot/kernel for Distro =<br />
<br />
We use distro boot in U-Boot, so we need to make a boot partition for U-Boot with kernel image and dtb inside.<br />
<pre>mkdir boot<br />
cp arch/arm64/boot/dts/rockchip/rk3399-evb.dtb boot/rk3399.dtb<br />
cp arch/arm64/boot/Image boot/</pre><br />
<br />
Add&nbsp;[http://opensource.rock-chips.com/images/6/60/Boot_extlinux.zip extlinux/extlinux.conf]&nbsp;for distro boot.<br />
<pre>mkdir boot/extlinux<br />
vi boot/extlinux/extlinux.conf</pre><br />
<br />
&nbsp;<br />
<pre>label rockchip-kernel-4.4<br />
kernel /Image<br />
fdt /rk3399.dtb<br />
append earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=B921B045-1D rootwait rootfstype=ext4 init=/sbin/init</pre><br />
<br />
For armv7<br />
<pre>label rockchip-kernel-4.4<br />
kernel /zImage<br />
fdt /rk3288.dtb<br />
append earlyprintk console=ttyS2,1500000n8 rw root=PARTUUID=69dad710-2c rootwait rootfstype=ext4 init=/sbin/init</pre><br />
<br />
You need to change the base address of debug UART, root partition for your board.<br />
<br />
Pls reference to&nbsp;[http://opensource.rock-chips.com/wiki_Partitions rockchip Linux parttion definition]&nbsp;for rootfs partition and where boot to flash.<br />
<br />
After all these files prepare completely, we write the file to the boot partition<br />
<br />
Folder tree for armv8(rk3399, rk3328):<br />
<pre>boot<br />
├── extlinux<br />
│ └── extlinux.conf<br />
├── Image<br />
└── rk3399-evb.dtb</pre><br />
<br />
Folder tree for armv7(rk3288), rootfs is optional, and we usually use compressed 'zImage':<br />
<pre>boot_rk3288/<br />
├── extlinux<br />
│ └── extlinux.conf<br />
├── rk3288-evb-rk808.dtb<br />
├── rootfs.cpio.gz<br />
└── zImage<br />
</pre><br />
<br />
== Generate ext2fs&nbsp;boot partition ==<br />
<br />
by genext2fs:<br />
<pre>genext2fs -b 32768 -B $((32*1024*1024/32768)) -d boot/ -i 8192 -U boot_rk3399.img</pre><br />
<br />
According to Rockchip partition definition, you need to flash this image to boot partiton which offset is 0x8000.<br />
<br />
&nbsp;<br />
<br />
== Generate fatfs boot partition ==<br />
<br />
=== Generate boot.img in fatfs ===<br />
<br />
Below commands can generate a fatfs boot.img<br />
<pre>dd if=/dev/zero of=boot.img bs=1M count=32<br />
sudo mkfs.fat boot.img<br />
mkdir tmp<br />
sudo mount boot.img tmp/<br />
cp -r boot/* tmp/<br />
umount tmp</pre><br />
<br />
Done!<br />
<br />
Flash this boot.img to boot partition, which is offset 0x8000 in Rockchip partition definition.<br />
<br />
=== Update boot.img via U-Boot in target ===<br />
<br />
After flash and&nbsp;boot the U-Boot, write the gpt table from default partition table<br />
<pre>gpt write mmc 0 $partitions<br />
gpt verify mmc 0 $partitions</pre><br />
<br />
connect target to PC and start the ums in command line:<br />
<pre>ums 0 mmc 1:6</pre><br />
<br />
We should able to see a device connect to PC, formate and copy data into the partition(dev/sdb6 for example).<br />
<pre>sudo mkfs.fat /dev/sdb6<br />
cp -r boot/* /media/machine/9F35-9565/<br />
</pre><br />
<br />
Done!<br />
<br />
&nbsp;<br />
<br />
== Boot from U-Boot ==<br />
<br />
If you are using genext2fs to genarate the boot.img, you need write the gpt table in U-Boot command line:<br />
<pre>gpt write mmc 0 $partitions</pre><br />
<br />
Then boot from eMMC or reset:<br />
<pre>boot</pre><br />
<br />
If everything is OK, you should able to see the U-Boot log like this:<br />
<pre>switch to partitions #0, OK<br />
mmc0(part 0) is current device<br />
Scanning mmc 0:6...<br />
Found /extlinux/extlinux.conf<br />
Retrieving file: /extlinux/extlinux.conf<br />
205 bytes read in 82 ms (2 KiB/s)<br />
1: upstream-4.10<br />
Retrieving file: /Image<br />
13484040 bytes read in 1833 ms (7 MiB/s)<br />
append: earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,1500000n8 rw root=/dev/mmcblk0p7 rootwait rootfstype=ext4 init=/sbin/init<br />
Retrieving file: /rk3399.dtb<br />
61714 bytes read in 54 ms (1.1 MiB/s)<br />
## Flattened Device Tree blob at 01f00000<br />
Booting using the fdt blob at 0x1f00000<br />
Loading Device Tree to 000000007df14000, end 000000007df26111 ... OK<br />
<br />
Starting kernel ...</pre></div>
Kever
http://opensource.rock-chips.com/index.php?title=Excavator_sapphire_board&diff=2108
Excavator sapphire board
2019-03-05T10:21:04Z
<p>Kever: </p>
<hr />
<div><br />
{{Infobox<br />
| image = [[File:RK3399 Excavator Board.jpg |500px]]<br />
}}<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
= Rockchip github =<br />
<br />
You can download code from github,See&nbsp;[[Linux_user_guide|Linux_user_guide]]&nbsp;setup Linux OS generally.<br />
<br />
&nbsp;<br />
<br />
<br />
= Documentation =<br />
<br />
[[Media:RK3399_EVB_User_Guide-20160920.pdf|RK3399 EVB User Guide]]<br />
<br />
[[Media:Rockchip_RK3399_Excavator_User_Guide_CN_V3.0_20190305.pdf|RK3399 EVB User Guide&nbsp;V3&nbsp;CN]]<br />
<br />
[[Media:Design_documents.rar|Design documents]]<br />
<br />
[[Media:Component_datasheet.rar|Component datasheet]]<br />
<br />
== RK3399 Excavator EVB ==<br />
<br />
[[Media:RK_Excavator_MainBoard.rar|RK_Excavator_MainBoard]]<br />
<br />
[[Media:RK_Excavator_ExtBoard_MipiDisplay.rar|RK_Excavator_ExtBoard_MipiDisplay]]<br />
<br />
[[Media:RK_Sapphire_RK3399.rar|RK_Sapphire_RK3399]]<br />
<br />
= Image =<br />
<br />
&nbsp;You can download image directly from below link if available.<br />
<br />
&nbsp;<br />
<br />
= See also =<br />
<br />
Firefly: [http://wiki.t-firefly.com/index.php/Firefly-RK3399 Firefly-RK3399]<br />
<br />
&nbsp;<br />
<br />
= References =<br />
<br />
&nbsp;&nbsp;[http://www.rock-chips.com/a/en/News/Press_Releases/2017/0224/832.html http://www.rock-chips.com/a/en/News/Press_Releases/2017/0224/832.html]<br />
<br />
To buy this board call: 4007700590 &nbsp; &nbsp; &nbsp; &nbsp;Email: service@rock-chips.com</div>
Kever
http://opensource.rock-chips.com/index.php?title=File:Rockchip_RK3399_Excavator_User_Guide_CN_V3.0_20190305.pdf&diff=2107
File:Rockchip RK3399 Excavator User Guide CN V3.0 20190305.pdf
2019-03-05T10:20:12Z
<p>Kever: </p>
<hr />
<div></div>
Kever
http://opensource.rock-chips.com/index.php?title=Boot_option&diff=2105
Boot option
2018-12-12T10:11:41Z
<p>Kever: </p>
<hr />
<div><br />
= Boot introduce =<br />
<br />
First, let's make the concept clear, there are many boot stages when we boot up a Linux OS;<br />
<br />
Then we need to know about how the image should packaged, where&nbsp;the image locate;<br />
<br />
At last, we will explain how to write to different&nbsp;media and boot from there.<br />
<br />
Here is Rockchip pre-released binaries which may be mentioned later:<br />
<br />
[https://github.com/rockchip-linux/rkbin https://github.com/rockchip-linux/rkbin]<br />
<br />
And [http://opensource.rock-chips.com/wiki_Partitions Rockcip Linux GPT partition] here.<br />
<br />
&nbsp;<br />
<br />
&nbsp;<br />
<br />
<br />
<br />
== Boot flow ==<br />
<br />
Here is a table show the detail what we may use in Rockchip platform, for 2 boot stage:<br />
<br />
- use U-Boot SPL;<br />
<br />
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin;<br />
<pre>+--------+----------------+----------+-------------+---------+<br />
| Boot | Terminology #1 | Actual | Rockchip | Image |<br />
| stage | | program | Image | Location|<br />
| number | | name | Name | (sector)|<br />
+--------+----------------+----------+-------------+---------+<br />
| 1 | Primary | ROM code | BootRom | |<br />
| | Program | | | |<br />
| | Loader | | | |<br />
| | | | | |<br />
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | pre-loader<br />
| | Program | TPL/SPL | | |<br />
| | Loader (SPL) | | | |<br />
| | | | | |<br />
| 3 | - | U-Boot | u-boot.itb | 0x4000 | including u-boot and atf<br />
| | | | uboot.img | | only used with miniloader<br />
| | | | | |<br />
| | | ATF/TEE | trust.img | 0x6000 | only used with miniloader<br />
| | | | | |<br />
| 4 | - | kernel | boot.img | 0x8000 |<br />
| | | | | |<br />
| 5 | - | rootfs | rootfs.img | 0x40000 |<br />
+--------+----------------+----------+-------------+---------+<br />
</pre><br />
<br />
Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:<br />
<br />
*Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled). <br />
*Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place; <br />
*Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC; <br />
*Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card; <br />
*Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5; <br />
*Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network; <br />
<br />
&nbsp;<br />
<br />
[[File:Rockchip bootflow20181122.jpg|1000x1000px|Rockchip bootflow.jpg]]<br />
<br />
Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;<br/> Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;<br/> <br/> Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.<br/> Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).<br/> Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.<br/> Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;<br />
<br />
== Package option ==<br />
<br />
After we know about the boot stages,<br />
<br />
Here are the file list before package for stage 2~4:<br />
<br />
*From source code: <br />
**From U-Boot: '''u-boot-spl.bin''', '''u-boot.bin'''(may use u-boot-nodtb.bin and u-boot.dtb instead), <br />
**From kernel: kernel '''Image/zImage''' file, kernel dtb, <br />
**From ATF: '''bl31.elf'''; <br />
*From Rockchip binary: <br />
**ddr, usbplug, miniloader, bl31/op-tee, (all with&nbsp;chip 'rkxx_'&nbsp; prefix and with version '_x.xx.bin' postfix); <br />
<br />
We offer two different boot-loader methods for different solutions, the steps and request files are also complete different. But not all the platforms supports the both boot-loader methods. Here are the types to&nbsp;package image from those files:<br />
<br />
&nbsp;<br />
<br />
=== The Pre-bootloader ===<br />
<br />
<br />
==== Rockchip Miniloader ====<br />
<br />
Package the image from Rockchip binary:<br />
<br />
No need to package a idbloader for eMMC because you can use below command to write idbloader from loader:<br />
<pre>rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin</pre><br />
<br />
For SD boot, you need a idbloader(combinded with ddr and miniloader) to write to SD card.<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d rkxx_ddr_vx.xx.bin idbloader.img<br />
cat rkxx_miniloader_vx.xx.bin >> idbloader.img<br />
</pre><br />
<br />
==== idbloader.img with tpl/spl ====<br />
<pre>tools/mkimage -n rkxxxx -T rksd -d tpl/u-boot-tpl.bin idbloader.img<br />
cat spl/u-boot-spl.bin >> idbloader.img<br />
</pre><br />
<br />
Flash the idbloader.img/idbspl.img&nbsp;to offset 0x40 which including stage 2, and you will need a uboot.img for boot stage 3.<br />
<br />
=== U-Boot ===<br />
<br />
<br />
==== uboot.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package u-boot.bin into miniloader loadable format by Rockchip tool loaderimage.<br />
<pre>tools/loaderimage --pack --uboot u-boot.bin uboot.img $SYS_TEXT_BASE</pre><br />
<br />
Where SoCs may have different&nbsp;$SYS_TEXT_BASE.<br />
<br />
==== u-boot.itb ====<br />
<br />
When using SPL to load the ATF/OP-TEE, package the bl31.bin, u-boot-nodtb.bin and uboot.dtb into one FIT image. You can skip the step to package the Trust image and flash that image in the next section.<br />
<pre>make u-boot.itb<br />
</pre><br />
<br />
Note: please copy the trust binary() to u-boot root directory and rename it to tee.bin(armv7) or bl31.elf(armv8).<br />
<br />
=== Trust ===<br />
<br />
==== trust.img ====<br />
<br />
When using idbLoader from&nbsp;Rockchip miniloader, need package bl31.bin into miniloader loadable format by Rockchip tool trustmerge.<br />
<pre>tools/trustmerge tools/rk_tools/RKTRUST_RKXXXXTRUST.ini</pre><br />
<br />
Flash the trust.img to offset 0x6000 which is for using Rockchip miniloader<br />
<br />
=== boot.img ===<br />
<br />
This image is package the kernel Image and dtb file into a know filesystem(FAT or EXT2) image for distro boot.<br />
<br />
See [[Rockchip_Kernel#Install_Boot.2Fkernel|Install kernel]] for detail about generate boot.img from kernel zImage/Image, dtb.<br />
<br />
Flash the boot.img to offset 0x8000 which is stage 4.<br />
<br />
=== rootfs.img ===<br />
<br />
Flash the rootfs.img to offset 0x40000 which is stage 5. As long as the kernel you chosen can support that filesystem, there is not limit in the format of the image.<br />
<br />
=== rkxx_loader_vx.xx.xxx.bin ===<br />
<br />
This is provide by Rockchip in binary mode, which is used for firmware upgrade to eMMC with [[Rkdeveloptool|rkdeveloptool]], can not be wirte to media device directly.<br />
<br />
This is a package from ddr.bin, usbplug.bin, miniloader.bin, Rockchip tool ''DB ''command will make usbplug.bin running in target which perform as a Rockusb device. You can skip to package this image, Rockchip will offer this image at the most of time.<br />
<br />
&nbsp;<br />
<br />
= Flash and boot from Media device =<br />
<br />
Here we introduce how to write image to different Medeia device.<br />
<br />
Get image Ready:<br />
<br />
*For&nbsp;with SPL: <br />
**idbloader.img <br />
**u-boot.itb <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
*For&nbsp;with miniloader <br />
**idbloader.img <br />
**uboot.img <br />
**trust.img <br />
**boot.img or&nbsp;boot folder with Image, dtb and exitlinulx inside <br />
**rootfs.img <br />
<br />
&nbsp;<br />
<br />
== Boot from eMMC ==<br />
<br />
The eMMC is on the hardware board, so we need:<br />
<br />
*Get the board into [[Rockusb#Maskrom_mode|maskrom mode]]; <br />
*Connect the target to PC with USB cable; <br />
*Flash the image to eMMC with [[Rkdeveloptool|rkdeveloptool]] <br />
<br />
Example commands for flash image to target.<br />
<br />
Flash the gpt partition to target:<br />
<pre style="margin-left: 40px;">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool gpt parameter_gpt.txt</pre><br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x40 idbloader.img<br />
rkdeveloptool wl 0x4000 u-boot.itb<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
*For&nbsp;with miniloader <br />
<pre style="margin-left: 40px">rkdeveloptool db rkxx_loader_vx.xx.bin<br />
rkdeveloptool ul rkxx_loader_vx.xx.bin<br />
rkdeveloptool wl 0x4000 uboot.img<br />
rkdeveloptool wl 0x6000 trust.img<br />
rkdeveloptool wl 0x8000 boot.img<br />
rkdeveloptool wl 0x40000 rootfs.img<br />
rkdeveloptool rd<br />
</pre><br />
<br />
&nbsp;<br />
<br />
<br />
== Boot from SD/TF Card ==<br />
<br />
We can write SD/TF card with Linux PC ''dd'' command very easily.<br />
<br />
Insert SD card to PC and we assume the /dev/sdb is the SD card device.<br />
<br />
*For&nbsp;with SPL: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=u-boot.itb of=sdb seek=16384<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144<br />
</pre><br />
<br />
*For&nbsp;with miniloader: <br />
<pre style="margin-left: 40px">dd if=idbloader.img of=sdb seek=64<br />
dd if=uboot.img of=sdb seek=16384<br />
dd if=trust.img of=sdb seek=24576<br />
dd if=boot.img of=sdb seek=32768<br />
dd if=rootfs.img of=sdb seek=262144</pre><br />
<br />
In order to make sure everything has write to SD card before unpluged, recommand to run below command:<br />
<pre>sync</pre><br />
<br />
Note, when using boot from SD card, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre>append earlyprintk console=ttyS2,115200n8 rw root=/dev/mmcblk1p7 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
Write GPT partition table to SD card&nbsp;in U-Boot, and then U-Boot can find the boot partition and run into kernel.<br />
<pre>gpt write mmc 0 $partitions<br />
</pre><br />
<br />
== Boot from U-Disk ==<br />
<br />
Same as&nbsp;[[#Boot_from_SD.2FTF_Card|boot-from-sdcard]], but please note that U-Disk&nbsp;only support stage 4 and 5, see [[#Boot_Stage|Boot Stage]] for detail.<br />
<br />
If U-Disk used for stage 4 and 5, format the U-Disk in gpt format and at least 2 partitions, write ''boot.img'' and ''rootfs.img'' in those partitions;<br />
<br />
if U-Dist is only used for stage 5, we can ''dd ''the ''rootfs.img'' to U-Disk device directly.<br />
<br />
Note, need to update the kernel cmdline(which is in extlinux.conf) for the correct ''root ''value.<br />
<pre> append earlyprintk console=ttyS2,115200n8 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init<br />
</pre><br />
<br />
== Boot from Network ==<br />
<br />
To be continued.<br />
<br />
= See also =<br />
<br />
[[Rkdeveloptool|rkdeveloptool]]<br />
<br />
[[Rockusb|rockusb]]<br />
<br />
[[Partitions|Rockchip Linux partition definition]]</div>
Kever