Headless home server on a MK809III
After my raspberry pi went down under the load of OwnCloud and some other applications, I decided to find a more powerful replacement for it. My search came to a MK809III stick featuring a quad core ARM9 known as RK3188 with 2GB RAM and 8GB internal NAND. This HW seemed just brilliant for my headless home server, specially with a price of 35 Euros!
So I just bought it. The first mission is however to replace its android with a headless linux in order to use the most out of its resources. After some searching I realized that for this reason I have to do just more than simply downloading a ROM and installing it as most of the ROMs outside did suffer from the fact of varying HW configuration between different versions and different producers. For me non of the existing ROMs worked until I found some good stuff related to Raxda Rock, a similar hardware intended for development.
The Raxda Rock is not exactly the same as HW I have, but it is a good starting point.
This should be pretty straight forward, if you know what to do and how to do. First take a look here. The page is very short but very valuable.
I could not use the packed version (probably because I did not setup the serial console) using the RKBathTool. It was flashed successfully but after booting nothing happened after the 4 linux tux were displayed.
I used the RKDevelopTool with following config using the unpacked files form the above referenced page:
Loader -> RK3188Loader(L)_V2.10.bin Parameter -> parameter_fbcon Kernel -> kernel_full.img Boot -> boot.img Recovery -> recovery_full.img
and these ones were unselected:
I also changed the parameter file to get as much space as possible from internal NAND:
FIRMWARE_VER:4.4.2 MACHINE_MODEL:rk30sdk MACHINE_ID:007 MANUFACTURER:RK30SDK MAGIC: 0x5041524B ATAG: 0x60000800 MACHINE: 3066 CHECK_MASK: 0x80 KERNEL_IMG: 0x60408000 #RECOVER_KEY: 1,1,0,20,0 CMDLINE:console=ttyFIQ0 console=tty0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x0000c000(boot),0x00008000@0x00004000(kernel),0x00010000@0x00014000(recovery),-@0x00012000(system)
After erasing the IDB and doing the flash process, I was able to boot into the miniroot prompt like this:
Until here I had only one problem and that was the absence of drivers for my AP6210 drivers. Which I decided to ignore for now.
Installing Ubuntu Core
The rest could have gone like this tutorial on installing ubuntu 14.04 but as I did not have access to internet on stick, I was forced to download the ubuntu image on a PC on a USB stick and put it into the MK809.
One other difference to that tutorial was also different size of NAND on my device. I had to realize which blocks do I have. The list of my available blocks on NAND was like following:
miniroot# cat /proc/mtd dev: size erasesize name mtd0: 00400000 00004000 "misc" . . . mtd11: 122400000 00004000 "linuxroot"
and I decided for mtd11 on which I made the partition and mounted it. For unpacking the image, I simply mounted the USB stick (was under
/dev/sda accessible) as
miniroot# mkdir /home miniroot# mount /dev/sda /home
/home is then where the tarball can be found for installation. The rest goes as tutorial says without problem.
I also set the autoboot so that system loads into Ubuntu in case of not predicted restarts.
I was trying here to experience with my MK809III a bit and to see how hard is it to install a hand-crafted system on it.
It was actually very easy, if you know what you want and how to do that. I installed Ubuntu Core and it worked very well. Everything was inside the internal NAND and the machine ran very fast. However I did not manage to setup the internal AP6210 WiFi. This is mainly because the kernel provided beside miniroot is not compiled for HW that I had.
In order to overcome this problem, I tried followings:
I tried to load the relevant module for this kernel. It didn’t work. I’m not sure why but the
/lib/modules/path did not exist at all (maybe because Ubuntu Core is a bare minimum rootfs). I’m not even sure if I have to expect such modules to be delivered by ubuntu core.
I tried to use the core of different other linux distros which have been provided for MK802IV with miniroot (flash
boot.imgfrom miniroot instead of their own
boot.img). But again no success:
The kernel from PicUntu 4.5 NAND version loaded but with a load of
FlashReadyRetry error!!, row = XXXXX. It did not detect my nand, nor my WiFi.
PicUntu 5.1 which was provided as a single update.img, could not be flashed using the RKBachTool as the tool said the HW does not match.
The kernel from a old linuxium booted but did not recognize NAND even though it said “nand” in the name of kernel. I suspect this can be the result of new HW on MK809III compared to MK802IV. However this kernel did recognize the WiFi device.
after all these, I suspect my final solution is to compile a kernel on my own and try it with miniroot.comments powered by Disqus