Difference between revisions of "Upstream Kernel"
(2 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
| | ||
+ | | ||
= Download Kernel = | = Download Kernel = | ||
Line 13: | Line 14: | ||
<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> | ||
+ | | ||
Line 19: | Line 21: | ||
Mainline kernel supports: | Mainline kernel supports: | ||
− | RV1108, RK3036, RK3066, RK3188, RK3228, [[RK3288|RK3288]], RK3368, [[RK3399]] | + | RV1108, RK3036, RK3066, RK3188, RK3228, [[RK3288|RK3288]], RK3368, [[RK3399|RK3399]] |
*RV1108 boards: | *RV1108 boards: | ||
Line 47: | Line 49: | ||
<ol style="margin-left: 40px;"> | <ol style="margin-left: 40px;"> | ||
<li>EVB RK3288 - use rk3288-evb-rk808.dts or rk3288-evb-act8846.dts</li> | <li>EVB RK3288 - use rk3288-evb-rk808.dts or rk3288-evb-act8846.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 53: | 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>Radxa Rock 2 - use rk3288-rock2-square.dts</li> | <li>Radxa Rock 2 - use rk3288-rock2-square.dts</li> | ||
</ol> | </ol> | ||
Line 90: | Line 90: | ||
Then you can get Image/zImage and dtb files. | Then you can get Image/zImage and dtb files. | ||
+ | |||
+ | | ||
| | ||
Line 113: | 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 [ | + | 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 | ||
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:
Contents
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:
- EVB RV1108- use rk1108-evb.dts
- RK3036 boards:
- EVB RK3036 - use rk3036-evb.dts
- Kylin RK3036- use rk3036-kylin.dts
- RK3066 boards:
- Marsboard - use rk3066a-marsboard.dts
- Bqcurie2 - use rk3066a-bqcurie2.dts
- Rayeager - use rk3066a-rayeager.dts
- RK3188 boards:
- Radxa Rock - rk3188-radxarock.dts
- RK3288 boards:
- EVB RK3288 - use rk3288-evb-rk808.dts or rk3288-evb-act8846.dts
- Firefly RK3288 - use rk3288-firefly.dts
- Firefly beta RK3288 - use rk3288-firefly-beta.dts
- Firefly reload RK3288 - use rk3288-firefly-reload.dts
- Hisense Chromebook - use rk3288-veyron-jerry.dts
- PopMetal RK3288 - use rk3288-popmetal.dts
- Radxa Rock 2 - use rk3288-rock2-square.dts
- RK3368 boards:
- Geekbok RK3368 - use rk3368-geekbox.dts
- Orion r68 - use rk3368-orion-r68-meta.dts
- RK3399 boards:
- 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.