Home > Linux, Linux 3.0, Rockchip RK31xx, Ubuntu > Getting Started with Raxda Rock – How to Generate and Flash Ubuntu Saucy Server and Desktop Images

Getting Started with Raxda Rock – How to Generate and Flash Ubuntu Saucy Server and Desktop Images

I’ve already written a guide showing how to build and install Android in Radxa Rock. Today I’m going to build the Linux kernel, generate a Ubuntu server images based latest Ubuntu Linaro server release, flash the image to the NAND flash, and show how to install LXDE or XFCE desktop environment. If you are just interested in installing one of the latest supported images, you can download Android, dual boot (Android/Ubuntu), Ubuntu ALIP, and Router images for Radxa Rock @ http://dl.radxa.com/rock/images/, and skip “build” and “generate” instructions, and just follow the flashing instructions below. All steps in this tutorial will be done in Ubuntu 13.10, and lots of the instructions below follow hwswbits blog and Ubuntu Radxa Wiki.

Build the Linux kernel

Let’s start by building the Linux kernel. I’m assuming you’ve already install development tools in Ubuntu (e.g. apt-get install build-essentials). You can refer to the list at the beginning of the Radxa Rock Android post for packages to install with apt-get.

Let’s create a working directory, get the code, and build the kernel.

mkdir radxa_ubuntu
cd radxa_ubuntu

At this stage, we’ve build the kernel. However, if we use it as is, DNS and some other network functions will not work because CONFIG_ANDROID_PARANOID is enabled in the default config file. Run make arch=ARM menuconfig, and go to Networking support -> Networking options to disable Only allow certain groups to create sockets. Run make again:

Let’s complete this section, by building the kernel modules:

Generate Initrd

The initrd is used at boot time to speed up boot among other things.

Generate Boot.img

In order to create boot.img which will be flashed in the boot partition, we need to download mkbootimg tool, and run the following commands:

That’s all good as we should now have a working boot.img. I’ll upload my boot.img soon. You  can download boot-radxa-20140127.img.xz.

Generate Ubuntu (Linaro) Server Rootfs

We will first create an empty 1GB file (rock_rootfs.img), format it to EXT-4, and mount it as a loop device:

I’ll download and extract the latest Ubuntu Saucy server image from Linaro available as today:

Now we need to copy the kernel modules and firmware to our rootfs:

I’d like Ethernet to work at boot time with DHCP so I edit the relevant file:

and add the two lines:

If you’ve already referred to Radxa Rock Ubuntu wiki, at this stage they use qemu and chroot to install extra package, I’ll skip that part, because it can be done inside the board instead, and I came across some error with qemu when accessing the network:

We still have one more step to create and enable a script to automatically detect the rootfs partition at boot time.

And copy the following to the file:

Make sure the script is executable and edit one of the startup script:

And add the line below before exit 0:

We are done, let’s umount the rootfs:

I’ll upload my Ubuntu Saucy Server rootfs soon.  Download link for Ubuntu Saucy server rootfs: radxa_rock_ubuntu_server_saucy_20140127.img.xz (95.4 MB)

Flashing Ubuntu to Radxa Rock

Now that we’ve got boot.img and rock_rootfs.img, we are ready to flash Ubuntu to the board. If you’ve haven’t installed it already, install RKFlashKit, press the recovery button on Radxa Rock, start RkFlashKit, and flash boot.img and rock_rootfs.img respectively to “boot” and “linuxroot” partitions.
Flash_rootfs_radxa_rockClick on Reboot device, and you should be able to access the console via HDMI or the serial console.

Ubuntu Saucy Server Available RAM and storage

SSH is not installed, but you can call install dropbear or ssh if you want to access the board remotely:

You can now SSH the board with linaro user using the password: linaro.

We’ve got plenty of available RAM:

But there’s only a 1GB flash partition usable with 409MB available.

However, there’s also a 4GB “user” partition:

We can mount it as follows:

And get some extra space:

But we’d still only get 5GB out of a 8GB NAND flash, and there’s not enough space on the rootfs to install a desktop environment.

Increasing Radxa Rock Ubuntu Rootfs Partition Size

Let’s see what can be done to get rid off useless Android partition, and get a 7GB rootfs.

First we need to modify the Android parameter file to change the MTD layout for linux (parameter-linux). Refer to the Android post to get the parameter files in rockdev directory.

Edit parameter-linux as follow with only 2 partitions for boot.img and rock_rootfs.img (linuxroot):

MAGIC: 0x5041524B
ATAG: 0x60000800
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:[email protected](boot),[email protected](linuxroot)

Now get the upgrade_tool (download link), enter recovery mode and flash the parameter file:

Start RkFlashKit again to flash boot.img and rock_rootfs.img again. This time, you should only see two partitions in the tools: boot and linuxroot.

However, the first time I tried to flash rock_rootfs.img, I got the following error message in RkFlashKit:

And after reboot, in the serial console, I got quite a few error message similar to:

A low level format, before using RkFlashKit, and flashing the parameter file fixed the issue:

You may want to run the command above first in any case, because flashing rock_rootfs.img takes nearly 30 minutes… If you do so, the low level format command must be done before flashing all other files in including the parameter, boot, and rootfs files.

After flashing is completed, reboot the board. You’ll notice the rootfs is still 1GB. Simply resize the EXT-4 partition:

Let’s check:

[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mtdblock1  7.3G  546M  6.4G   8% /
udev            924M   84K  924M   1% /dev
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            186M  260K  185M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            927M     0  927M   0% /run/shm
none            100M     0  100M   0% /run/user

Yes! Success! The rootfs partition is 7.3 GB with 6.4GB available.

Installing LXDE or XFCE Desktop Environment

If you just plan to use Radxa Rock as a server, you are done, but if you want to run a desktop environment one more step is needed. Since there are no GPU Linux drivers in RK3188 based devices, installing Unity is probably a very bad idea and would lead to poor performance. Two other lightweight desktop environments are frequently used: LXDE in distributions such as Lubuntu or ALIP, or XFCE in distributions such as Xubuntu.

The good news is that installation is very easy, but it can take a few hours to download and install all required packages. So if you want to skip the part below, you can download the compressed rootfs with Xubuntu-Desktop to flash directly to your board.

Lubuntu (LXDE) requires 378 MB of archives and 1166 MB of additional disk space, and can be installed with the following command:

Xubuntu (XFCE) requires 452 MB of archives and 1370 MB of additional disk space, and can be installed with the following command :

I decided to install Xubuntu desktop, and it took 2 to 3 hours. I’ll upload my Ubuntu Saucy XFCE rootfs soon if you want to skip that part.

Once installation is complete we still have 4.5GB free, but somehow it used nearly 2GB additional space, instead of the 1370 MB promised.

At boot time, you get the the login screen (use “linaro” user with “linaro” password), and the system is very usable. I’ve opened several programs including Gimp, Firefox, Abiword, a terminal window, a game, a music player, and more (See screenshot below), and  everything runs pretty smoothly. Stability may need to be improved however, since I’ve got one random reboot as I accessed SAMBA shares. I could not reproduce the issue.

Xubuntu in Radxa Rock (Click for Original Size)

Xubuntu in Radxa Rock (Click for Original Size)

  1. dr. Bormental
    January 28th, 2014 at 03:09 | #1

    screenshot from youtube (w/statictic activated would be good).

  2. dr. Bormental
    January 28th, 2014 at 03:13 | #2

    dr. Bormental :


  3. Murat
    January 28th, 2014 at 14:11 | #3

    Hope one day they’ll have gpu acceleration that also works in other rk3188 sticks.

  4. January 28th, 2014 at 21:58 | #4

    @dr. Bormental
    YouTube is not really usable. It can play some videos, but it’s just too slow. I think I need to try the Chromebook flash library with Chromium: http://hwswbits.blogspot.com/2013/04/flash-on-picuntu-linux-arm.html

  5. January 29th, 2014 at 11:51 | #5

    I’ve uploaded the binaries, compressed with 7pzip:
    boot.img – http://ubuntuone.com/4vlyMy53bKmi4pQsfb8r3C
    Ubuntu server for Radxa Rock – http://ubuntuone.com/7UzDx4Wf9xlSCU8oNObIxI
    Xubuntu for Radxa Rock – http://ubuntuone.com/2rM59DV6UE7QqcfHcMifNN

  6. January 30th, 2014 at 07:34 | #6

    The Ubuntu server link is coming back as “Page Not Found” now.

  7. January 30th, 2014 at 09:28 | #7

    @Toby Wintermute
    Sorry, the link was wrong. I’ve updated it.

  8. Alex
    February 2nd, 2014 at 20:36 | #8

    Great work, thank you! This is the first source to read of the command to flash the parameter file under Linux.

    However, I did the whole process and it left me with a command line and no network connection although I configured the wired network interface correctly. The Radxa Rock system could be pinged from outside within my home network using its IP address, but could not ping out (error message “Socket – access denied” even as root) and could not resolve a network address (host google.com — timeout; could not the apt addresses for apt-get update). Looks like a tiny permission problem but I cannot figure it out.

    Additionally, I cannot unpack your xz-files. Debian Linux xz from xz-utils cannot recognize the file format, neither can xarchiver. Are they really xz-files (http://en.wikipedia.org/wiki/Xz) ?

    Keep on the good work!


  9. February 2nd, 2014 at 20:49 | #9

    I compressed it with 7z.. I thought xz was also lzma, and I have used 7z to uncompressed xz files before… I should probably have used the extension 7z instead.

    I had the same network problem as you have, using the default kernel kernel, and disabling CONFIG_ANDROID_PARANOID (Only allow certain groups to create sockets) fixed the issue. Are you using my boot.img?

  10. Alex
    February 2nd, 2014 at 23:55 | #10

    Thanks a lot for the quick reply. It must be deep in the night in Thailand.
    As I said, I could not open your packages so I used a self-compiled kernel.
    I am not sure about CONFIG_ANDROID_PARANOID, but I thought I did that. But then maybe I used a different boot.img from an earlier attempt or an original from radxa.

    I will try it again!

  11. Marty
    February 10th, 2014 at 05:41 | #11

    Can boot.img and rock_rootfs.img be flashed to the RK3188 using Windows?

  12. February 10th, 2014 at 11:18 | #12

    Yes sure. Use RkAndroidTool. Don’t forget to flash the parameter file too.

  13. Marty
    February 11th, 2014 at 04:12 | #13

    You have the Linux parameter file here:


    will this change when I use my own compiled boot.img and rock_roofs.img for Linux?

  14. Cristian
    February 14th, 2014 at 03:05 | #14

    Hello, Great Post!! I make my firsts testing with Linaro on ARM, I have a question, if posible (via Windows) to make a copy to .IMG file of the running image ?? That is because I use 4 or 5 for office basic use, and change various settings as language, wifi settings, etc.
    Thanks, Cristian.

  15. Gilles
    February 14th, 2014 at 08:00 | #15

    Is it possible to install the images on a micro SD card (with dd) and boot from that card without altering the onboard NAND memory? Just like on the Cubieboard.

  16. February 14th, 2014 at 09:55 | #16

    Yes, you can use RkFlashKit to backup the rootfs partition after you changed the settings, installed applications…

    Yes. it should be possible, but I haven’t tried it. You should be able to modify the parameter to mount the rootfs from the SD card, and copy the rootfs into your SD card.

    Follow the thread of google group, as details will hopefully emerge there:

  17. Marty
    February 14th, 2014 at 23:51 | #17

    I’ve had past success flashing the CX-919 in Windows using RkAndroidTool. So with that I need to flash my newly built boot.img and rock_rootfs.img along with the standard parameter file from above. What are the Adresses we should be using?

    I used this setup, but it loads slow:

    Address Name Path

    0x00000000 parameter parameter
    0x00008000 boot boot.img
    0x00382000 linuxroot rock_rootfs.img

  18. February 15th, 2014 at 09:56 | #18

    I’ve also noticed it takes a minute to load. But I doubt the addresses in the parameter file have anything to do with the relatively slow boot time.

  19. thehid
    February 15th, 2014 at 17:56 | #19

    Hey cnxsoft, I wrote to you on an other articel. You advised to use the Minix X7 SDK for building a wheezy or ubuntu image. I just downloaded the SDK and extracted the files, bit they looks like the other kernels for rk3188 on github. Would you give me a some more hints, how to build the kernel and boot.img. The rest seems to be manageable with this articel. Many thanks for your help!

  20. February 15th, 2014 at 18:40 | #20

    It should also be the same as above, except you need to use the defconfig for your product. The initrd part may also be different, and you could ask on Minix forums for that part if you can’t make it work.

  21. Marty
    February 16th, 2014 at 02:57 | #21

    Are the addresses I’m using the right ones? Maybe rootfs should go in System which is 0x00282000??

  22. February 16th, 2014 at 09:46 | #22

    You can actually choose any address you want. The respective partitions must just be big enough to store the parameter file, boot.img and the rootfs

  23. Cristian
    February 17th, 2014 at 12:41 | #23

    Hello How are you…

    Can any help me to configure RKAndroidTool to flash my own kernel, I having problems to flash (with RKAndroidTool v1.37 ) my built boot.img (12.960 MB) and rock_rootfs.img (1.048.576 MB) along with the parameter file:

    CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:[email protected](boot),[email protected](linuxroot)

    Address Name Path
    0×00000000 parameter parameter
    0×00008000 boot boot.img
    0×00382000 linuxroot rock_rootfs.img

    This are error on RKToolkit LOG are:
    02:27:55 145 INFO:Start to erase IDB
    02:27:55 146 INFO:Start to lower format
    02:28:06 175 INFO:Lower format OK
    02:28:06 177 INFO:Erasing IDB OK
    02:28:09 960 Image Thread Path(\\?\USB#VID_2207&PID_310B#6&380B6F11&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}),ThreadID=6184
    02:28:09 961 INFO:Start to test device
    02:28:09 961 INFO:Start to run
    02:28:17 974 INFO:Test device OK
    02:28:17 975 INFO:Start to download file
    02:28:17 982 INFO: Start to download files to flash,backup offset=0xffffffff
    02:28:17 988 INFO:Flash Start to download file to flash
    02:28:18 086 Info:RKA_File_Download start,file=boot,offset=0x8000
    02:28:22 969 Info:RKA_File_Download start,file=linuxroot,offset=0x12000
    02:29:28 799 INFO: Download files to flash finished,Total(281709960)B
    02:29:28 799 INFO: Start to check data
    02:29:28 800 INFO:Start to check download data
    02:29:28 815 Error:Compare parameter file failed,Offset(0)
    02:29:28 824 Error: Check parameter file failed
    02:29:28 824 ERROR:Download file failed
    02:29:28 825 ERROR:Image Thread Failed
    02:29:28 827 ERROR:Run failed

    With Server or Desktop boot-linux.img and rootfs-desktop.img or rootfs-server.img downloaded from RADXA site are the same problem. But, If try with “Batch Tool” and radxa images with “-update” Flash are OK.

    Is very apreciated If any can send how are correct param file and RkAndroidTool settings to use for Flash custom Images/RootFs.

    Thanks in Advance, Cristian.

  24. February 17th, 2014 at 12:58 | #24

    Problem is with the parameter file. Try to use the one in that post. Or replace the dash before @0x0000A000(linuxroot) with a proper address.

  25. Ze Sousa
    February 19th, 2014 at 04:00 | #25

    Hello. Please help.

    I bought the rock and I want it to be my Desktop Linux computer, but always worked on Windows so don’t understand much of this.

    I followed the section “Increasing Radxa Rock Ubuntu Rootfs Partition Size” because 1GB is not enough for a decent Operating system and when started the rock, it gave me the following errors in startup command line after a while:

    mount: mounting /dev/block/mtd/by-name/linuxroot on /root failed: Invalid argument
    (… some more mount errors…)

    Googling it for linux I only find comments like “put the CD wathever and run these commands”. But I’m in the rock, no CD drive.
    What shall I do? Please make any answer easy to understand for newbies. Thanks in advance.

  26. February 19th, 2014 at 10:19 | #26

    @Ze Sousa
    How many partition are shown in RKFlashKit?

  27. February 19th, 2014 at 10:31 | #27

    If you have problems with SAMBA share, somebody mentioned adding

    socket options = TCP_NODELAY SO_SNDBUF=65535 SO_RCVBUF=65535

    to the samba config (/etc/samba/smb.conf) appears to fix the issue.

  28. Ze Sousa
    February 20th, 2014 at 03:31 | #28


    I made it from Windows using RKAndroidTool.
    I find that RKFlashKit as a Linux app, I don’t have a Linux machine.

  29. Ze Sousa
    February 20th, 2014 at 05:06 | #29

    Ze Sousa :
    I made it from Windows using RKAndroidTool.
    I find that RKFlashKit as a Linux app, I don’t have a Linux machine.

    More specifically:

    ** start
    1. open RKAndroidTool and connect the rock
    2. erase IDB
    3. run parameter file changed acoordingly to this tutorial
    4. run files linuxroot and boot (only)
    ** end

    Is anything missing here?

  30. February 20th, 2014 at 11:18 | #30

    @Ze Sousa
    It looks correct. Any error messages in RkAndroidTool?

  31. Ze Sousa
    February 20th, 2014 at 19:03 | #31

    Yes, in the verification after run linuxroot and boot.
    But ran it again and everything gone OK.
    I’ll do it again step by step and write down any errors or warnings here.

  32. Ze Sousa
    February 21st, 2014 at 03:33 | #32

    Ze Sousa :
    Yes, in the verification after run linuxroot and boot.
    But ran it again and everything gone OK.
    I’ll do it again step by step and write down any errors or warnings here.

    This time everything went OK.
    Sorry for everything, thank you for your time.

  33. March 16th, 2014 at 10:55 | #33

    Updated images for Android, Linux, and Dual boot, as now available @ http://radxa.com/download/



    Remove the linuxroot partitions for pure Android image, this gives 1.5G more space for /sdcard in Android
    Support the 13 key simple remote from radxa,
    Support 720p HD USB camera, you can now skype on RR
    Support Bluetooth keyboard/mouse
    Support USB OTG host mode, mounting USB disk/HDD via OTG
    Wifi driver stability and improvement
    Enable MTP and adb mode at the same time


    Expand the rootfs to the whole NAND(8G for full version, 4G for lite version)
    Add kernel cmd line to pass mac address for a fixed ip address
    Enable display scale for TVs which has problems with overscan, see display for how to scale the screen
    Support wifi onRR full version(RTL8723au) and lite version(RTL8188ETV) read here to configure it
    Fix rebooting when Ethernet uploading problem see discussion here
    Fix mysql/apache permission issue
    Fix chromium not rendering web page issue
    Add support for Flash player in chromium

  34. July 30th, 2014 at 15:08 | #34

    There’s now a new version: Radxa Rock Pro – http://radxa.myshopify.com/products/radxa-rock-pro

  35. vk4tux
    September 23rd, 2014 at 22:48 | #35

    whoever built
    26-Jun-2014 20:54

    should be shot for not adding cdc-acm usb support, Its the worst arm package out there.
    Sorry I ever got a RadXa.

  36. September 24th, 2014 at 10:11 | #36

    The kernel source code is available, so it should be easy to compile the module or re-compile the kernel with cdc-acm usb support by yourself.

  37. Board27
    September 25th, 2014 at 02:09 | #37

    Hi ,first thanks for the complete tutorial.(the first one that i’ve ever seen) Finally i’ve got here the Rock Pro and just flashed NAND following your istructions with the rootfs img and boot img. (i’ve used RKDevelopment toll for Win) It doesn’t turn on. It remain off status after flash. Maybe i have to add parameter file to tell where the root is? (but shouldn’t be done by .sh script?). Anyway since Ubuntu One file server is down, where can i get those two images to be sure i’ve not make any mistake?

    Thanks in advance!


  38. Kilo01
    September 25th, 2014 at 03:09 | #38


    i’ve just flashed the ubuntu server image from radxa with Bathtools for Win.(i have a radxa pro) Then ssh to it to use it. Can you help me to add snd-usb-audio module and other audio package related? I’ve tried in 1000 ways but stil nothing. I’ve tried to setup up kernel source dir, make menuconfig added sound modules, make , make modules, make modules_install and make install. Everything seems to work during installation of the new kernel, but as soon as reboot, i’ve tried lsmod |grep snd …no trace of snd-usb-audio and sound modules anyway. I don’t know what i’ve mised is the first time i compile a kernel.

  39. September 25th, 2014 at 09:21 | #39

    Radxa provides different imnages for Radxa Rock and Radxa Rock Pro, so it could be the reason.
    Maybe the line “make rk3188_radxa_rock_defconfig” should be “make rk3188_radxa_rock_pro_defconfig”, you need to check the config.

    Sorry, I don’t think I have the binary images anymore.

  40. Kilo01
    September 25th, 2014 at 15:36 | #40

    Thanks,i’ll give it a try again. As soon i’ll get a USB/TTL to know what is going on over there.

    Thanks for all.

  41. January 7th, 2015 at 01:22 | #41

    Yes I did , but if you build an image for arm, including cdc-acm is basic requirement.

  42. Michelangelo
    August 20th, 2015 at 00:26 | #42

    Is possible to install ZeroShell on Radxa?

  1. May 18th, 2014 at 14:20 | #1
  2. May 25th, 2014 at 10:54 | #2
  3. July 2nd, 2014 at 21:20 | #3