Sunday, October 6, 2013

Booting Linux on Radxa Rock

For anybody interested, here is a preliminary working kernel for the Radxa Rock board.

UPDATE (2013/10/11): IR and Audio I/O working, updated links to new flash images

Xubuntu Linux on Radxa Rock RK3188 board

This is WORK IN PROGRESS, so few things are supported, even though it's already almost as usable as any stick. This is the current state of affairs (check commits for updated info):

What works?
- Integrated Ethernet 10/100
- USB 2
- Flash
- MicroSD
- RK1000-S sound (integrated mic, audio out jack)
- IR (point a remote at it and press a button while monitoring cat /proc/interrupts ;)

What doesn't work yet?
- Wifi+BT

Not tested?
- Expansion headers
- SPDIF Audio Out / Exp.header Line In

I've based development on this repository. To compile it for yourself, you'll have to clone it and use the arch/arm/configs/rk3188_Radxa_Rock_Linux_galland_defconfig file as your .config (UPDATE: the initramfs file necessary for this defconfig, with rknand support, is initramfs-3.0.36+.cpio from here).

OR, if you have the board and want to go ahead with the flashing (supposing you already have an Ubuntu Linux in a MicroSD card inserted in the Radxa board), you have two options:

A) Boot to Linux only: Flash "kernel" partition with this file, so you boot directly to Linux (warning: it won't boot to Android unless you revert this step). Follow these steps:

//backup the Android "kernel" to be able to revert this
sudo ./rkflashtool r 0x4000 0x5000 > radxa_stock_kernel.img
//flash the downloaded Linux kernel instead
sudo ./rkflashtool w 0x4000 0x5000 < kernel.img
//safely reboot (into Linux)
sudo ./rkflashtool b

Now the Radxa board will boot directly into Linux.
In order to recover Android booting you'd have to reflash the stock kernel you've backed up.

B) Usual way: flash the Linux kernel (decompressing this different file) into the recovery partition to be able to dual boot Android/Linux:

//flash the downloaded and uncompressed recovery.img
sudo ./rkflashtool w 0x10000 0x10000 < recovery.img
//safely reboot (into Android)
sudo ./rkflashtool b

Now to get into Linux you have to boot into Android and have again two options:

- Enable Debug Mode, connect OTG USB port to PC, go to Settings->USB->Connect to PC, and then in the PC issue an "adb shell reboot recovery"

- Or, install an Android Terminal emulator (beware there is no Google Play in the RR!) get into it and, with root, issue a: reboot recovery

Since booting back to recovery partition tends to be cumbersome and since I only care about Linux, I have flashed kernel partition and always just boot to Linux!

PS: Just in case you don't have the latest modules and firmware, get these ones into the root (not "root" folder!) of your MicroSD Linux (I insert the uSD card in the PC, open a file explorer as root and copy them at uSD's root).


  1. You are on a roll... great work !!!

  2. work great!
    dekstop 12.04? 13.04?

  3. Can You tell me with rev of you use , because i have problem w USB device loading on booting .

    1. The latest rev. Make sure you can boot with nothing attached to USB, though I didn't find such problem :S

  4. With Wireless chip you have on Radxa?

  5. Have you got the Wifi chip to work ? in Linux

  6. RTL8188EU is supported in linux. It does not support ad-hoc mode well, though:

  7. Hi,

    I'm having troubles to flash radxa linux images. I would like to give it a try to yours. Do you think you can repost the images?

    Thanks in advance,