Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock/Linux Mainline

Linux Kernel 3.18-rc5


What currently works in Linux mainline:

  • UART
  • SPI
  • I2C
  • GPIOs / LEDs / IR
  • PWM
  • USB
  • SD/MMC
  • Ethernet
  • Wifi
  • BT

What remains to be done:

  • DRM Display driver / LCD controller
  • HDMI drivers (ITE66121 / RK616)
  • TV OUT drivers (RK1000)
  • NAND flash support


Ubuntu 14.10 / GCC 4.9+ (GCC 4.8 is not supported)

sudo apt-get install git build-essential gcc-arm-linux-gnueabihf lzop libncurses5-dev libssl-dev bc

Get the source code

Get linux-next kernel tree (stable branch), default config and updated device-tree.

git clone -b stable --depth 1 git://
cd linux-next
wget -O arch/arm/configs/rockchip_defconfig
wget -O arch/arm/boot/dts/rk3188-radxarock.dts

Build kernel

We have to build two files:

  • zImage (the kernel)
  • rk3188-radxarock.dtb (the device tree blob)

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make rockchip_defconfig
make -j8 zImage dtbs

Create boot image

Install mkbootimg if you don't have it on your system.

   git clone
   cd rockchip-mkbootimg
   sudo make install
   cd ..

We need to append the device tree blob to zImage (CONFIG_ARM_APPENDED_DTB option) until we can use U-Boot device tree support.

cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxarock.dtb > zImage-dtb

get ramdisk

   git clone
   find . ! -path "./.git*"  | cpio -H newc  -ov > initrd.img

Create the boot.img using mkbootimg (Rockchip version).

mkbootimg --kernel zImage-dtb --ramdisk initrd.img -o boot.img

Flash parameter and boot image

Get a parameter file from


Flash parameter and boot.img using rkflashtool

rkflashtool P < parameter_linux_sd
rkflashtool w boot < boot.img
rkflashtool b


Install Rootfs in first partition of SD card

Your rootfs should be in ext4 format. It will be loaded from /dev/mmcblk0p1 by default.


The Realtek wifi chipsets require firmwares to be installed in /lib/firmware/rtlwifi

You can get them by installing the linux-firmware package from your Linux distribution

sudo apt-get install linux-firmware

or download them from here:


The rtl8723au_bt driver is not in the mainline kernel yet, but you can build it this way:

git clone -b new
cd rtl8723au_bt/Linux_BT_USB_2.11.20140423_8723BE/
git am 0001-Add-hci_recv_fragment-function.patch
make KDIR=../..

Copy the firmware files and rtk_btusb.ko into your rootfs:

8723A/rtl8723a_fw -> /lib/firmware/rtl8723a_fw
8723B/rtl8723b_fw -> /lib/firmware/rtl8723b_fw