Rock/Linux Mainline
Contents
Linux Kernel 3.18-rc3
Status
What currently works in Linux mainline:
- UART
- SPI
- I2C
- GPIOs / LEDs / IR
- PWM
- USB
- SD/MMC
- Ethernet
- Wifi
What remains to be done:
- DRM Display driver / LCD controller
- HDMI drivers (ITE66121 / RK616)
- TV OUT drivers (RK1000)
- NAND flash support
- Bluetooth support (rtl8723au_bt)
Requirements
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git cd linux-next
wget http://rockchip.fr/radxa/linux/rockchip_defconfig -O arch/arm/configs/rockchip_defconfig wget http://rockchip.fr/radxa/linux/rk3188-radxarock.dts -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
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
Create the boot.img using mkbootimg (Rockchip version).
mkbootimg --kernel zImage-dtb --ramdisk /dev/null -o boot.img
Flash parameter and boot image
Get a parameter file from http://dl.radxa.com/rock/images/parameter
wget http://dl.radxa.com/rock/images/parameter/parameter_linux_sd
Flash parameter and boot.img using rkflashtool
rkflashtool P < parameter_linux_sd rkflashtool w boot < boot.img rkflashtool b
Notes
Install Rootfs in first partition of SD card
Your rootfs should be in ext4 format. It will be loaded from /dev/mmcblk0p1 by default.
Wireless
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: http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/rtlwifi