Difference between revisions of "Upstream Kernel"

From Rockchip open source Document
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
 
 
 
  
 +
 
  
 
= Download Kernel =
 
= Download Kernel =
Line 12: Line 13:
 
Alternatively you can use linux-rockchip instead which may with some patches not get in mainline:
 
Alternatively you can use linux-rockchip instead which may with some patches not get in mainline:
 
<pre>git clone git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git</pre>
 
<pre>git clone git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git</pre>
 +
 +
&nbsp;
  
  
Line 18: Line 21:
 
Mainline&nbsp;kernel supports:
 
Mainline&nbsp;kernel supports:
  
RV1108, RK3036, RK3066, RK3188, RK3228, RK3288, RK3368, RK3399
+
RV1108, RK3036, RK3066, RK3188, RK3228, [[RK3288|RK3288]], RK3368, [[RK3399|RK3399]]
  
 
*RV1108 boards:  
 
*RV1108 boards:  
Line 46: Line 49:
 
<ol style="margin-left: 40px;">
 
<ol style="margin-left: 40px;">
 
<li>EVB RK3288 - use rk3288-evb-rk808.dts or&nbsp;rk3288-evb-act8846.dts</li>
 
<li>EVB RK3288 - use rk3288-evb-rk808.dts or&nbsp;rk3288-evb-act8846.dts</li>
<li>Fennec RK3288 - use rk3288-fennec.dts</li>
 
 
<li>Firefly RK3288 - use rk3288-firefly.dts</li>
 
<li>Firefly RK3288 - use rk3288-firefly.dts</li>
 
<li>Firefly beta RK3288 - use rk3288-firefly-beta.dts</li>
 
<li>Firefly beta RK3288 - use rk3288-firefly-beta.dts</li>
Line 52: Line 54:
 
<li>Hisense Chromebook - use rk3288-veyron-jerry.dts</li>
 
<li>Hisense Chromebook - use rk3288-veyron-jerry.dts</li>
 
<li>PopMetal RK3288 - use rk3288-popmetal.dts</li>
 
<li>PopMetal RK3288 - use rk3288-popmetal.dts</li>
<li>MiQi RK3288 - use&nbsp;rk3288-miqi.dts</li>
 
 
<li>Radxa Rock 2 - use rk3288-rock2-square.dts</li>
 
<li>Radxa Rock 2 - use rk3288-rock2-square.dts</li>
 
</ol>
 
</ol>
Line 68: Line 69:
  
 
&nbsp;
 
&nbsp;
 
  
 
= Configure and Build =
 
= Configure and Build =
Line 93: Line 93:
 
&nbsp;
 
&nbsp;
  
= Install Boot/kernel[[http://10.10.10.12:8444/index.php?title=Rockchip_Kernel&action=edit&section=4 edit]] =
+
&nbsp;
 +
 
 +
 
 +
= Install Boot/kernel =
  
 
We use distro boot in U-Boot, so we need to make a boot partition for U-Boot with kernel image and dtb inside.
 
We use distro boot in U-Boot, so we need to make a boot partition for U-Boot with kernel image and dtb inside.
Line 112: Line 115:
 
You need to change the base address of debug UART, root partition for your board.
 
You need to change the base address of debug UART, root partition for your board.
  
Pls reference to&nbsp;[http://10.10.10.12:8444/index.php?title=Partitions rockchip Linux parttion definition]&nbsp;for rootfs partition and where boot to flash.
+
Pls reference to&nbsp;[[Partitions|rockchip Linux parttion definition]]&nbsp;for rootfs partition and where boot to flash.
  
 
After all these file prepare complete, we write the file to the boot partition
 
After all these file prepare complete, we write the file to the boot partition
  
 
See [[Rockchip_Kernel|rockchip kernel]] for boot partition generate.
 
See [[Rockchip_Kernel|rockchip kernel]] for boot partition generate.
 +
 +
= Non-upstream module =
 +
 +
[[Graphics|Rockchp Graphics]]
 +
 +
[[Mpp|Rockchip Video]]
 +
 +
[[Camera|Rockchip Camera]]

Latest revision as of 03:12, 4 September 2019

Rockchip is working on upstream SoC support to Mainline kernel:

 

 

Download Kernel

Get the source code from the upstream mainline repository:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Alternatively you can use linux-rockchip instead which may with some patches not get in mainline:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git

 


Supported SoCs and Devices

Mainline kernel supports:

RV1108, RK3036, RK3066, RK3188, RK3228, RK3288, RK3368, RK3399

  • RV1108 boards:
  1. EVB RV1108- use rk1108-evb.dts
  • RK3036 boards:
  1. EVB RK3036 - use rk3036-evb.dts
  2. Kylin RK3036- use rk3036-kylin.dts
  • RK3066 boards:
  1. Marsboard - use rk3066a-marsboard.dts
  2. Bqcurie2 - use rk3066a-bqcurie2.dts
  3. Rayeager - use rk3066a-rayeager.dts
  • RK3188 boards:
  1. Radxa Rock - rk3188-radxarock.dts
  • RK3288 boards:
  1. EVB RK3288 - use rk3288-evb-rk808.dts or rk3288-evb-act8846.dts
  2. Firefly RK3288 - use rk3288-firefly.dts
  3. Firefly beta RK3288 - use rk3288-firefly-beta.dts
  4. Firefly reload RK3288 - use rk3288-firefly-reload.dts
  5. Hisense Chromebook - use rk3288-veyron-jerry.dts
  6. PopMetal RK3288 - use rk3288-popmetal.dts
  7. Radxa Rock 2 - use rk3288-rock2-square.dts
  • RK3368 boards:
  1. Geekbok RK3368 - use rk3368-geekbox.dts
  2. Orion r68 - use rk3368-orion-r68-meta.dts
  • RK3399 boards:
  1. EVB RK3399 - use rk3399-evb.dts

 

Configure and Build

You will need to use multi_v7_defconfig for armv7 SoCs:

make multi_v7_defconfig

configure for aarch64:

make ARCH=arm64 defconfig

The arm64 defconfig on upstream is more for server, we recommend you to use rockchip_linux_defconfig from Rockchip github

make ARCH=arm64 rockchip_linux_defconfig

After configure, build the kernel.

For armv7:

make CROSS_COMPILE=arm-linux-gnueabi-

For aarch64:

make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64

Then you can get Image/zImage and dtb files.

 

 


Install Boot/kernel

We use distro boot in U-Boot, so we need to make a boot partition for U-Boot with kernel image and dtb inside.

mkdir boot
cp arch/arm64/boot/dts/rockchip/rockchip/rk3399-evb.dtb boot/rk3399.dtb
cp arch/arm64/boot/Image boot/

Add extlinux/extlinux.conf for distro boot.

mkdir boot/extlinux
vi boot/extlinux/extlinux.conf

 

lable kernel-mainline
    kernel /Image
    fdt /rk3399.dtb
    append earlycon=uart8250,mmio,0xff1a0000 console=ttyS2,1500000n8 root=dev/mmcblk0p7 rootwait rootfstype=ext4 init=/sbin/init

You need to change the base address of debug UART, root partition for your board.

Pls reference to rockchip Linux parttion definition for rootfs partition and where boot to flash.

After all these file prepare complete, we write the file to the boot partition

See rockchip kernel for boot partition generate.

Non-upstream module

Rockchp Graphics

Rockchip Video

Rockchip Camera