MediaTek USB-UART on Gemini-PDA 
Kernel development for any device without having a serial console, in my experience, is a real pain, and makes life extremely hard. Chances the device won't boot at one point are pretty high, so without a serial console you're pretty much in the dark in those cases.

I got the Gemini-PDA from the Indiegogo campaign. I used to have the Psion in the old days, where I used the Psion 3c as well as the Psion Series 5. The idea of having a device with that same Psion form factor, the same quality keyboard and up-to-date software sounded like a geek dream, so I backed the project.

Soldering a serial console on the mainboard can be done, but that did not seem such a good idea to me, since I want to actually use the Gemini as my primary phone at one point.

I wanted a more non-intrusive way of having a serial console and found this interesting blog. This article describes an UART over USB functionality that apparently most MediaTek devices have.

Here is the list of materials I used to get UART over USB working on the Gemini-PDA:
Make sure you use a USB cable that has 4 wires. The (cheap) charging cables will only have 2 wires, which obviously won't work. I cut the USB-A on one side, stripped the 4 wires and connected the dupont plugs to the wires.

Usually an USB cable is wired as follows:
  • Red - VCC
  • White - Data-
  • Green - Data+
  • Black - GND
To be on the safe side, check which wires are GND and VCC using a multimeter.

When connecting the UART directly on the mainboard the absolute maximum power for the data lines would have been 1.8V, but since we're using plain USB, the data lines are powered at 3.3V max, and VCC is powered at 5v.

The VCC connection is needed for the MediaTek preloader to detect the cable. Once detected, the USB port will be automatically switched into UART mode.

Finally connect the FTDI cable and the USB-A cable, where you link Data- (white) to TX (green), Data+ (green) to RX (white), and of course VCC and GND.

Here are the steps to make it all work:
  • Switch off the Gemini-PDA
  • Connect the USB-C adapter and the USB-A to FTDI cable
  • Plug in the FTDI cable in your desktop PC
  • Start any terminal emulator, and connect to the FTDI at 921600 baud. I use miniterm like this:
    # /dev/ttyUSB0 921600 -f direct
  • Plug in the USB-C adapter in the left USB port of your Gemini-PDA
After plugging in the cable in your Gemini-PDA you should immediately see output on your terminal, indicating that the preloader started, and detected the cable successfully.

[ 1 comment ] ( 287 views )   |  permalink  |   ( 3 / 394660 )
LibreELEC test build for RK3288 
I created a testbuild for anyone wanting to try LibreELEC on RK3288.

First image is a firmware update.img which can be flashed with upgrade_tool in Linux, or AndroidTool in Windows. This installs the image to eMMC flash storage. Beware that this firmware image is especially for the Ugoos UT3+ device. It contains boot, kernel, recovery and LibreELEC system all in one. It partitions the Ugoos UT3+ into a small (read-only) system partition, and a large 13Gb user partition. After flashing the image it should boot you straight into LibreELEC.

Second image is one for the more adventurous types out there, wanting to try LibreELEC on some other RK3288 device. You have to be comfortable with setting up a linux distro, and you're pretty much on your own. You need a working kernel to start off with. Make sure you have that. Download the tarball archive here. It contains a seperate SYSTEM and KERNEL image. The KERNEL is the Ugoos UT3+ one. You need to make your device boot the SYSTEM partition. You can use the initramfs found here to do so. Depending on the location you're installing the SYSTEM partition, you might need to change the initramfs. You also might need to set the STORAGE location manually in the initramfs.

I'm still in the process of getting all the source code into github, so please bear with me there.

[Update] 2017-03-14 Updated firmware available

Latest test image can be found here. This image has lots of hardware fixes. Wifi works, power LED and hopefully the CPU fan as well. There was a bug in the initial resize of the user partition which caused issues in the startup wizard. This has been fixed as well.

[Update] 2017-02-23 Updated firmware available

Latest test image can be found here. This image should work when flashed from Windows as well as Linux. After flashing completes, the device is rebooted. On first boot, the user partition is automatically resized, and although the device should reboot automatically after that, it seems to hang. So on first boot, the trick is to wait for lets say a minute, then unplug the power, and finally replug the power to boot into LibreELEC. I know this is somewhat of a hassle, but it works, and hey, this is an early test version :)

Be aware of the fact that the image is for testing purposes only. There are still lots of things to fix...

[Update] 2017-02-21 Source code available

I've uploaded everything you need to create your own LibreELEC build on github here. For now it has only been tested on the Ugoos UT3+ (RK3288). Just clone the repository and run the script ''. It will generate a flashable firmware image that will run LibreELEC from eMMC.

I also updated the links above, pointing to the latest test images. The image contains LibreELEC 8.0.0 which is about to be released as a final version officially.

[ 15 comments ] ( 1747 views )   |  permalink  |   ( 3 / 300632 )
LibreELEC on Rockchip RK3288 

Due to various reasons, it has been ages since I last wrote something here. I've been working on several projects, which pretty much consumed all my spare time. I won't bother you with all the boring details.

I'm currently using a custom made Kodi distro on a couple of RK3128 and RK3229 devices, which is what I use at home as media player on daily basis. I must say, these low-end devices work pretty well. They are Android based, which adds somewhat of overhead, since I'm only using Kodi most of the time. As a media player, for me it pretty much plays eveything that I throw at it. Of course, these aren't top notch devices, but my requirements aren't top notch as well. As long as it streams 1080p HD content without too much problems, I'm happy. My huge full fledged Intel i3 HTPC hasn't been powered on for quite a while, which is an indication these small devices are a good replacement.

I've been fiddling a lot with low-end RK3128 and RK3229 devices for quite some time, and by now the RK3228 is becoming more or less the new low-end so it seems. Prices have dropped significantly, which will probably mean more RK3228-based devices will show up. Interestingly, Rockchip has started to become a little more open in terms of community support. More and more source code can be found on github, and some Rockchip employees are actively participating on IRC, which I think is a really good development. Now big-name PC vendor Asus has quietly released the Tinker Board, a Raspberry Pi-like development board, available for around EUR 60 as I write this. Hopefully that means more developers will join in to make support for Rockchip better.

As said, my current media players are still running Android. I looked into ways to get rid of that, since I only use Android to launch Kodi. It would be nice to replace Android with a more dedicated, media centric platform. I fiddled with AndroidTV for a while, but dropped it, since I couldn't fit all the pieces together to get it working. One of my long-time favorite media platform is OpenELEC. The Intel i3 HTPC I mentioned is running it. On all the previous attempts I did to get OpenELEC running on Rockchip devices, I only partially succeeded.

This time I started with LibreELEC, which is 'an evolution of the popular OpenELEC project' according to the project 'About' page. It has the same build system that I know from previous OE endeavors. I like the simplicity of it, it is easy to extend and/or adjust.

Most of the LE distro builds without any problems. I had a basic linux distro up and running in no time on my RK3128. That is, using a serial console I was able to boot into a linux command line. Kodi didn't start since it needs hardware acceleration. For the RK3128 as well as the RK3229 this means it needs support for the Mali-400 (Utgard) GPU. Both these SOCs still use the 3.10 kernel, which seems to be no longer supported by Rockchip, and although there is support in the Linux mainline kernel, there are parts that still need closed source proprietary drivers. This makes it difficult to develop on. Therefore I switched to the RK3228 as a target. This SOC uses a Mali-T764 (Midgard) GPU. A Linux 4.4 kernel is available on github as well as Mali user space binaries matching the kernel driver.

I used the Ugoos UT3+ as a target, which was kindly donated to me by Ugoos long ago. I got a serial console working by soldering wires onto the serial pads as described here, and connecting it to my USB to Serial breakout board. The stock Ugoos Android still uses the old 3.10 linux kernel. Since source code for the 4.4 linux kernel is available with proper RK3228 support, I wanted to use that. This means that the serial console was pretty much essential. Without one, you're totally blind in *ANY* kernel development. I decompiled the kernel device tree from the 3.10 kernel, and used that as a base for the 4.4 kernel. After some fiddling that gave me a working 4.4 kernel. There were still things that needed to be fixed and improved here and there, but it was good enough to continue work on LibreELEC.

Having a kernel in place, the basic LE distro was up and running on the Ugoos in no time. Like on the RK3128, it booted into a text-only terminal console. In order for Kodi to work, Mali hardware acceleration support was needed. It took me some time to figure out how to fit the pieces together, but as always, if you know how to do this, it turns out to be quite simple.

As you can see on the screenshot, LibreELEC is running nicely on my Ugoos now. I haven't tested everything yet, but first looks show that full HD movie playback is smooth, sound works, Ethernet, touch screen. Kernel needs some more love, because Wifi isn't working yet, among other things. But apart from that I think LibreELEC has a lot of potential on the RK3288.

I need to clean up my code, but then I'll upload the code on github so you can give it a try as well if you want.

[ 8 comments ] ( 10702 views )   |  permalink  |   ( 3 / 294027 )
Rockchip GPL Kernel Upgrade to 3.0.101 Released 
I have just uploaded all the kernel changes I made in the last couple of months. It is kind of a "big bang" commit. Sorry about that. There are too many changes to mention them all separately. Mali support is also included.

Also, any of you with touch screen monitors out there, please give it a try. Most linux distributions are not ready (yet) for touch screen monitors, but basic support should work!

Give it a try, and make sure to share additions or changes you make. The more this code is adopted, the better it will become. So please support my initiative to get a common code base for the Rockchip platform!

Support for more devices will be added soon, among other things.

I hope you like it. Make sure to leave your comments below, and feel free to use that little orange "Donate" button on the left of the screen at any time ;-)

The kernel source can be found here

[ 36 comments ] ( 6100 views )   |  permalink  |   ( 3 / 370950 )
Mali working on Rockchip RK3188 Quad Cores... 
This is just to say that it is done, Mali is working. More to follow!

[ 10 comments ] ( 4097 views )   |  permalink  |   ( 3 / 385897 )
Rockchip GPL Kernel source released 
There haven't been any updates for quite some time here. But that doesn't mean that nothing has happened lately... on the contrary!

Today I released a new kernel for the Rockchip SOCs. It is based on version 3.0.72 of the linux kernel, and merges have been done with code from several Rockchip kernels out there. Apart from that, all the latest Rockchip patches have been applied. Support for several devices has been added already, and changes have been made to add more devices easily later.

Tests have been done on the Tronsmart MK908 and the Kingnovel K-R42 (aka MK888), on which the kernel works stable and all onboard components are fully functional. More devices will be added later, among which are the Rikomagic MK802IV and the Radxa Rock. These are all RK3188 Quad core devices. I hope to find some time to add support for some of the dual core RK3066 devices later as well.

As part of the kernel I've also added the 3.0.72+ kernel modules that are still closed source, like the Mali and the Wifi drivers. These modules are needed if you want to use the kernel on an existing Android system. Know that we are working hard to make the changes necessary to get rid of those closed source modules, in order to create a fully 100% open sourced GPL kernel for the Rockchip platform. Parts are already in there (like Mali support), but more work has to be done in order to get it all working.

Give it a try, and make sure to share additions or changes you make. In the meantime we are trying hard to make this kernel even better, with added support for more devices and embedded support for Mali, Wifi, Bluetooth and other things. We also started working on several distributions other than Android. Think about Ubuntu and OpenELEC.

I hope you like it. Make sure to leave your comments below, and feel free to use that little orange "Donate" button on the left of the screen at any time ;-)

The kernel source can be found here

[ 23 comments ] ( 2227 views )   |  permalink  |   ( 2.9 / 289931 )
MK908 Kernel upgrade to 3.0.72+ 
There's still a lot of work to be done, but I've managed to upgrade the stock 3.0.36+ kernel to version 3.0.72+. As you can see it runs Android, and it does so perfectly well. Butter smooth, very fast and stable!

I'll start adding more functionality now. Overclocking already works, and I couldn't fry an egg on it yet, so maybe I have to push it a bit further.

Update: I forgot to say, this kernel still has everything 100% working on the MK908. Wifi, Bluetooth, Mali, the whole lot.

Stay tuned for more!

[ 9 comments ] ( 1488 views )   |  permalink  |   ( 3 / 268800 )
MK908 Kernel... 100% Working, including Wifi and Bluetooth. Finally! 
I've uploaded the source code for the quad core RK3188 based MK908 on my github. This is the kernel source we've all been waiting for. It is fully functional and has Wifi and Bluetooth working out of the box.

It is pretty unchanged, I only changed the config a bit, setting the DDR SDRAM speed to 500MHz for instance and removing the camera support, freeing up some memory.

I'll add more features to the kernel later, so stay tuned.

[ 16 comments ] ( 2374 views )   |  permalink  |   ( 2.9 / 373929 )
These are exciting times! 
I know, it has been a while since I posted something here. So it might look like nothing much happens here at Omegamoon headquarters. But believe me, the opposite is true.

Since respected Picuntu developer Alok got his hands on the rk3188 kernel, a small team of developers have spent much of their free time delving through the kernel code. It has been hard to keep a good balance between work, hobby and a healthy family life the last couple of weeks.

The team that has been working together across the world consists of Alok and Galland (known for their Picuntu work), Astralix (from CrewrRKTablets) and myself. Results were many sleepless nights slowly making progress or sometimes banging our heads against a brick wall. In order to do some groundwork we got support from Perry, one of the owners and founder of KSK Electrics, who kindly donated several rk3188 devices to the team members.

Others have posted their rk3188 success-stories online already. I saw an Ubuntu implementation and overclocked kernels already. Very nice! Itís good to see that apparently there are more people working on these devices, which is a good thing! Our small team has a long list of things that still need to be fixed, or things we would like to see support for. On top of this list is Wifi networking and bluetooth support. We think our current implementation of kernel and OS is not yet ready for primetime, but my guess is that this won't take long. Until that time, please bear with us!

Iíll try to post a few things that might be interesting for others as well. We have modded the MK908 and the S400 to get a serial console for instance, and... well, we have more in store. These are exciting times!

[ 14 comments ] ( 19326 views )   |  permalink  |   ( 3.1 / 353390 )
OpenELEC distribution for RK3x in the making... 
I have been working on the 3.0.36+ kernel sources for the RK3x for a while now. I focus development on the MK808(B) for now, since I have a serial console available on those devices. For me the serial console is a must-have for kernel development. It makes it so much easier to find out what is causing a (fatal) kernel error, and it helped me out several times during development. I uploaded the current kernel sources to my github for anyone willing to give it a try as well. Be careful though. You have to be aware that (for now) the recent stock Android 3.0.36+ based images won't boot with the custom kernel. Cause of this is the Mali driver. It seems there are differences between the kernel driver I use and the userspace binary that is part of the stock kernel. Seems they don't match, resulting in a kernel oops during the boot process.

I also started with the development of a RK3x release of OpenELEC v3.0. For any of you that don't know OpenELEC, it is being advertised as a small Linux distribution built from scratch as a platform to turn your computer into an XBMC media center. I'm already using OpenELEC on a heavy weight quad-core Intel based machine. I use it as a dedicated media center, and it would be really something if this huge machine could be replaced with one of the noiseless(!) and extremely low powered mini RK3x devices.

I managed to build the complete OpenELEC distribution, replaced the (Android) boot.img and kernel and put the OpenELEC distribution on a SD card. Current status is that the kernel is booting nicely and the good news is that OpenELEC is starting as well, but the X-Server is causing some problems, so it needs more work. I still need to incorporate the Mali X11 driver as well.

I tried to test the OpenELEC distribution on the quad core RK3188 based MK908 as well, but since the boot process is being killed due to the X-Server not starting currently nothing shows up on screen. Maybe I need to try to get the serial console mod working for the MK908 just to see if the custom kernel boots on the RK3188 as well, using all cores...
I feel another solder session coming up :-)

[ 10 comments ] ( 4278 views )   |  permalink  |   ( 3 / 381710 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next> Last>>