AMLogic-M3 Smart TV Box Investigations

I sold my aging HTPC being tired of lugging the ATX beast between apartments whenever I moved. Figured I would replace it with an ARM computer, being the cheapest available hardware decoding. First attempt was the MK802 out of sheer frugality. Not having investigated it very thoroughly, it turned out to be nearly useless because of a proprietary hardware decoding interface and otherwise unreplacable and terrible software.

Attempt two for ARM is this thing from OvalElephant. It's actually made by Refee and is very similar to the Pivos Xios, two USB ports are not wired up and it has 1GB of memory instead of 512MB. AMLogic themselves is considerably better at the whole GPL thing, the decoder is supported by open source libraries and they have almost reasonable source available for their kernels. It's still a mess of custom device subtrees with little integration with the rest of the kernel, but at least it compiles and seems to work on the hardware targeted by the particular release. Few ARM platforms can say that.

That kernel is for Meson6 dual core version of the chipset, so I've attempted to get it building for the Meson 3 SoC in the Oval Elephant box. There are some older kernels floating around and the device ships with 2.6.34 installed (UART dump of the default boot). From the log, it's obvious the hardware is using u-boot and it mentions reading a file called 'aml_autoscript'. This is just a u-boot script, but you have to use mkimage to create it.

mkimage -A arm -O linux -T script -C none -d your_script.sh aml_autoscript

The u-boot image on this hardware will load that from the root directory of a vfat formatted SD card. mkimage is from either your distro's uboot-tools package or the Meson6 kernel tree. Example script I've used:

fatload mmc 0 82000000 uImage_linux
setenv bootargs root=/dev/block/cardblksd2 rootfstype=ext3 androidboot.resolution=720p rootwait init=/bin/busybox console=ttyS0,115200n8 nohlt logo=osd1,0x84100000,loaded,720p a9_clk=600M clk81=187000000 mem=1024m mac=00:26:ea:99:3c:83
bootm 82000000

This doesn't enirely work. I've tried a number of root fs options, but it seems to ignore that option and simply load the Android image on the NAND flash with the stock kernel. Changing some of the options will result in failed boot of Android, so they do seem to be seen by the running kernel. I've tried Pivos Xios kernels and my own builds of the M6 tree hoping to get a pure Linux image loading but without any success. Pivos' kernels give a CRC error and crash if I repack them with mkimage. My kernels offer no output at all. The kernel from the SD card is loaded however, so it should be possible to modify the compiled image or build from whatever source tree that one is from.

This is where I'm stuck. The hardware does do an okay job stock, but really I'd like to run XBMC without Android on it. Unless a new kernel tree pops up, I'd have to say that the Pivos Xios is a much better choice, especially if you want to hack the device at all. Even the Raspberry Pi offers a slightly better XBMC experience. There are several very annoying bugs in the stock firmware (Android buttons don't go away with videos and some of the up to date Android apps crash due to some malformed configurations), easily fixable with root access but I haven't been able to get that either.

Comments