Tuesday, June 10, 2014

Minix Neo X8H HW tinkering first impressions

I just got my hands on a Minix Neo X8-H TV Box, along with an M1 airmouse, courtesy of Minix, with the aim of porting Linux to it (Amlogic Quad-Core processor this time).


First impressions


I won't bother you with the specs, which you can review at Minix' X8-H product page. However, from a subjective point of view I can say Android 4.4 Kitkat feels pretty fast and stable and, despite the youth of this processor, I haven't run into any problems while using it.

However nobody should be surprised here, since Minix was the one that honestly repudiated releasing for its devices the embarrassingly fake "Android Kitkat Betas" that plagged chinese Rockchip sticks at the beginning of this year.


One thing that I found immature though was the H/W video decoding, since using MX Player I was absolutely unable to avoid seeing the subtitles in MKV movies, no matter how many forced/unforced subtitles checkmarks I removed. This does not happen when using a Rockchip TV box, so a newer Amlogic firmware should have to fix this.


The M1 airmouse is small, looks slick, and has an accurate response, I really like it.

However, when I removed the USB receiver from the X8-H, I found myself with the plastic cap in one hand and the electronic PCB still connected to the USB port... so better handle it with care.




The serial console


That said and, after fellow developer Omegamoon dared open it first and find the UART pins, I went about to do the same since, as you may already know, the UART (or serial console) is necessary for first tinkering with ROMs/Linux, due to being the place where all debug output is dumped to, way before you get anything on screen. And, of course, no kernel compilation works the first time, at least not for me :P

Apart from that, and until flash reading/writing through USB from a PC Linux is provided with tools by Amlogic, the best way to flash and reflash this device is to use the "u-boot" bootloader, through the serial console. U-boot is what runs after power-on but just before any kernel, Android or Linux, is loaded. In fact, u-boot is in charge of loading the kernel.

Hitting Enter on the serial console while the X8-H boots is enough to get a u-boot prompt instead of booting to Android.



PCB inside Neo X8-H


Just as its smaller brother, the Neo X7, the internals of this device boasts quality. And you may say: Why?

Well, let me recount a few items that you will NOT find on other cheap TV boxes that usually suffer from reboots in the middle of your favorite movie:

- The processor has a large heatsink of quality metal on it (instead of crappy tapes)
- The memory has that large heatsink also over it. What? The memory also has a heatsink!
- The large heatsink has another heatsink on top of it! What? Yes, attached to the top of the box!


Minix Neo X8-H PCB

Not enough?
- There is an embedded battery to keep the RTC time while powered off
- Count the number of capacitors, coarsely that's a major plus for stability.
- They even soldered pins for the UART serial console!! (bottom left)

Yes, the UART pins are right there for us tinkerers:

UART RX/TX pins plus power pins


So, with just a 3 pin [low-profile] connector broken in two, I was able to get them out:

Black for Ground, Red for X8H's TX, Blue for RX.

With a rather ugly cutout at the back of the box (upssss):




And, finally, connecting it to my PC through a Serial2USB board, the full boot log was available, including access to the u-boot console (boot log here).




Quick tests


The u-boot version is reported as this bizarrerie: U-boot-00001-g473771c-dirty
As far as I know it should be the year followed by the version within that year, so I guess somebody must have changed it, obscuring the source code it's based on.

u-boot log on Minix Neo X8-H

Once booted, Android reports kernel version 3.10.33, which is the latest one openly provided by Amlogic, and which, after some comparisons I believe is based on Linaro Stable Kernel tree for Android, which currently has the same version.

Unfortunately, I have found a few of the same device-specific kernel source modifications by Amlogic people, so typical of Rockchip kernels. That is ugly, prevents mainlining (using the official kernel and easily updating it), and is really badly looked upon.


On the bright side, this kernel is very modern and, magnificently, it is device-tree based.

What's that you say? Well, a device-tree file would allow you to use the very same kernel (no recompiling ever!) among all devices using, at least, the same Amlogic processor.
You just need to flash a different device-tree file! It's like an index telling the kernel what does the box in question have inside and where to find it.

Previously, on the dark ages that Rockchip sent us to, every vendor wildly modified the kernel source with its own, often buggy, little specifics, which caused an explosion of RK kernels everywhere, a chaos where you used a different kernel for each device and went crazy to keep them all up to date.



I have done some quick tests like extracting the device-tree file. Here you can see the device-tree of Minix Neo X8-H, which you can compare to the one posted by CNX-Software for the Tronsmart Vega S89 device-tree, it's interesting!


Another thing I've done is test the capabilities of u-boot, like being a client for a TFTP server on my PC, where I plan to place my kernel compilations, to download and flash to the Neo X8-H, like in this example:

u-boot getting new file for the X8-H from a TFTP server

I have been told that Minix may soon be releasing the source code its TV box is using, which is again one of the nice things we can expect from Minix, who has already released it before.

Once that is done I'll go on to recompiling and trying to get Linux into this beast! Stay tuned for the instructions!




13 comments:

  1. Great post. What Linux distro do you favour for this platform?

    ReplyDelete
    Replies
    1. Until 2D/3D accel. is dealt with (and this CPU carries a new MALI core afaik), I prefer to use a light window manager like XFCE or LXDE, to not bog down the CPU with fancy gfx, my personal choice is Xubuntu :)

      Delete
  2. I will follow your progress.
    Good luck.

    ReplyDelete
  3. I will also follow your progress.
    - Hack The Planet

    ReplyDelete
  4. I was going to say Xubuntu, very clean and I have used it on the virtual Air-print servers we use, lets any printer show up on apple devices (ipad) and mobile devices, 20 gig vhd zips to 2gig, based on this guys Raspbery Pi info, http://rohankapoor.com/2012/06/configuring-the-raspberry-pi-as-an-airprint-server/
    I have played with about 5 minix neo x8h and and about 6 neo x7 and mini, they are great, just developing one for a shop display, smooth video and unit doesn't even get warm, boots without any worries, even when inpatient shop keepers just switch off the power.
    please let us know when you get a image we can try, linux,
    nice one,

    regards

    ReplyDelete
  5. Hi man, great work, have you tried Linux yet? I got one and Android is not working for me.

    ReplyDelete
  6. Nice work with your tinkering so far.

    I am following your pursuits with interest.

    Not sure if you are aware of Stane's work, but he has Linux running on a few Amlogic quad core S802 boxes. Perhaps this can assist your endeavours?

    http://www.stane1983.com/amlinux/

    I can't wait for your next update!

    ReplyDelete
  7. any updates to the progress of this?

    ReplyDelete
  8. Hi congrats for the post!!

    I have a question (sorry if im in the rong place) i would like to change the x8 kernel to run with my LG Overlay.
    I already have VID and PID but i have no idea how to change the kernel and make it run.
    Can someone help me please?

    Thank you very much!

    ReplyDelete
  9. Hey, seems we're pursuing the same goal. I have cheap and easy access to Minix Neo X6, which is similar to X8 - I'm tracking my progress on their forums here: http://www.minixforum.com/forums/neo-x6-custom-roms-kernels-and-discussion.80/

    I've done a quick compare for you on how the device tree you shared differs from the standard (linaro?) ones and posted it on their X8 forum here: http://www.minixforum.com/threads/x8-device-tree.9793/ Morale of the story... so far it looks like using the wrong tree could fry something.

    ReplyDelete
  10. Hi, where i can download the kernel source and config file to compile a kernel for the Minix Neo X8H HW.
    I will use the kernel with a debian system.

    ReplyDelete
  11. Did you ever get this working?

    ReplyDelete
  12. Please Help Me !!!
    Where can I find an original u-boot.bin for minix x8-H

    ReplyDelete