Difference between revisions of "Upstream Kernel"

From Rockchip open source Document
Jump to: navigation, search
Line 95: Line 95:
  
 
 
 
 
 +
  
 
= Install Boot/kernel =
 
= Install Boot/kernel =
Line 115: Line 116:
 
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 [http://10.10.10.12:8444/index.php?title=Partitions rockchip Linux parttion definition] for rootfs partition and where boot to flash.
+
Pls reference to [[Partitions|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
 
After all these file prepare complete, we write the file to the boot partition

Revision as of 03:06, 8 December 2017

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. Fennec RK3288 - use rk3288-fennec.dts
  3. Firefly RK3288 - use rk3288-firefly.dts
  4. Firefly beta RK3288 - use rk3288-firefly-beta.dts
  5. Firefly reload RK3288 - use rk3288-firefly-reload.dts
  6. Hisense Chromebook - use rk3288-veyron-jerry.dts
  7. PopMetal RK3288 - use rk3288-popmetal.dts
  8. MiQi RK3288 - use rk3288-miqi.dts
  9. 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