Hacking on Mele A1000

Here are some instructions how to hack a Mele A1000. Hopefully it will be useful for others.

Note: It is work in progress and not finished yet, please improve it.

Mele A1000 could be bought at:

  1. Aliexpress
  2. DealExtreme WARNING: Ordering from DealExtreme may be slow. Expect 3 - 4 weeks delay before shipping. Search with Google "DealExtreme slow" to get other reports.
  3. Taobao in China, RMB¥469
Specifications:
Inside view (click for full-size)
a1000 inside view
  1. Power consumption less than 5W (android 2.3.3 + youtube video 720p: ~4.6W (without sata hdd))
  2. Video output - HDMI, CVBS, VGA .
  3. Audio output - R+L, SPDIF
  4. 3 usb host port + SDCard slot.
  5. External SATA port (real SATA not USB)
  6. Ethernet.
  7. Wifi b/g/n via a RTL8188CUS USB Module

Internal board has

  1. UART port connector.
  2. USB device port connector
  3. MIC pin. Some resistors & capacitors seem to be missing?
  4. CVBS-IN pin. Some resistors & capacitors seem to be missing?
  5. FEL jumper, unsoldered, 11K1 between flash, dram & pmu). 3.3V logics
  6. RESET?, unsoldered, 12J3 between the big round black ones, next to the big unpopulated connector at the right edge. 5V logics.
  7. I2C? (unsoldered eeprom & unsoldered header, some resistors also needed)

I2C: From the pictures, the 8 pin chip to the left of the A10 appears to be an I2C eeprom and if you add R14,R15(jumper) then I2C is available at the 6 pin connector below the eeprom.

6-pin header (unpopulated) below:

  1. SCL (PB18 - TWI1_SCK)
  2. SDA (PB19 - TWI1_SDA)
  3. GND
  4. ?? (Requires R16 jumper)
  5. ?? (Requires R17 jumper)
  6. Vcc

Connector 10J3 (left edge, 6 pin unpopulated)

  1. ?? AC coupled
  2. ?? AC coupled
  3. GND
  4. PB20 - TWI2_SCK
  5. PB21 - TWI2_SDA
  6. VCC

?? This maybe FM Radio Line In (Missing 2 resistors and capacitor/channel)

Pin 4 and 5 are active without the addition of any components.

PCB Test Points and the corresponding pin

  • TP1-PB5 (I2S_MCLK / AC97_MCLK)
  • TP2-PB6 (I2S_BCLK / AC97_BCLK)
  • TP4-PB8 (I2S_DO0 / AC97_DO)
  • TP6-PB10 (I2S_DO2)
  • TP7-PB11 (I2S_DO3)
  • TP8-PB12 (I2S_DI / AC97_DI)

PE is TS0 / CSI0

  • TP18-PE0
  • TP19-PE1
  • TP20-PE2
  • TP21-PE3
  • TP22-PE4
  • TP23-PE5
  • TP24-PE6
  • TP25-PE7
  • TP26-PE8
  • TP27-PE9
  • TP28-PE10
  • TP29-PE11

The A1000's sys config1.fex


You need additional hardware to connect to the internal connectors:

  1. Internal UART port. (to get console output)

One of the options is to buy a TTL to USB converter and a bunch of jumper wires.

REMARK: The picture above shows the Gnd, Tx and Rx pins on the Mele board, but be sure to cross the Tx and Rx wires at the serial-to-usb converter. That is, Transmit pin on the Mele socket must go to Receive pin on the converter, ditto for Rx to Tx.

  1. Internal USB device port. (to be able to use adb, Android Debug Brigde)

The kind of connector used is often found internally in various devices. For example a very good candidate for finding a suitable cable for the USB connection is a USB mouse. You may need to rearrange the pins a bit however. Normal coloring scheme in USB cables seem to be Black GND, Green D+, White D-, (Red 5V, do not connect to mele). If there are two black then one is shield and should not be connected. See pinout on the picture.

Change the u-boot in the device to support boot from MMC

See https://github.com/linux-sunxi/u-boot-sunxi/wiki for instructions on how to boot from MMC/SDCARD directly. This version of u-boot is standalone and do not require any proprietary bootloaders.

Alternatively if you prefer using Android u-boot chainloaded from Allwinner proprietary bootloaders:

  1. build the u-boot that support boot from MMC.
        git clone http://git.hands.com/u-boot.git
        cd u-boot
        git checkout lichee-dev
        vi include/configs/sun4i.h
    

    Search this file for "mmc config" and make the following modifications:

    1. #if 0 => #if 1 (enable support for mmc)
    2. change #define CONFIG_MMC_SUNXI_SLOT 0

    Compile u-boot.

    make sun4i CROSS_COMPILE=arm-none-linux-gnueabi-

    If compilation was successful you will get the u-boot.bin.

  2. ref the eLinux Hack A1 devices page. use adb push the new u-boot.bin to tv-box.

List of distros for the Mele A1000 / A2000

Transferring SD card images to SD cards of different size

I've written a script (makeSD.sh) to write an SD card image to an SD card of any size (as long of there is enough space).

For those interested, it can be downloaded @ https://github.com/cnxsoft/a10-tools

Usage: ./makeSD.sh /dev/sdb mele-ubuntu.bin

It will completely delete the content on the device, so it has to be used with care. I've tried it with Puppy for Mele A1000 image.

For instructions on how to create an SD card image from windows see Preparing SD cards from windows

Forgetful? Need more memory?

The Mele has 512MB RAM, when you stick ubuntu/debian, you will notice about 320 available to the OS. Various things are stealing it. If you are running headless then you can do the following (you may be able to do the following if not running headless, I haven't tried yet). This information is cribbed from the mailing list so credit where credit is due.

see also: https://github.com/amery/linux-allwinner/issues/18

VIII. fbmem boot option.

The frame buffer takes some, by adding fbmem=1 to your bootargs, you will gain about 32MB, and you should be at 351 in top. (Thanks Henrik).

Update: fbmem=1 does not work for me with allwinner-v3.0-android-v2, but it should be possible to set disp_init_enable=0 in script.fex to save the framebuffer memory.

IX. Kernel compile option:

From Tomasz:

I found some interesting setting in kernel configuration:

System Type -> All winner system configure -> Memory reserved size in KB

I changed value from 70MB to 20MB and set fbmem=1 and i have got 391MB total memory under debian 6 (before was ~350MB)

This writer changed it to 20 (not 20MB) and my RAM now sits at 427 in top. NB. Do not set it to zero, the kernel will not boot. Apparently there are changes you can make to the .bin script, that scavenge a bit more back too. Update to follow. So far no detrimental effect. have been noticed, but YMMV.

Update: This setting is not available with allwinner-v3.0-android-v2 anymore. The alternative is now to disable CONFIG_VIDEO_DECODER_SUN4I, G2D, MALI ... in the kernel config.

It's possible to get the full 512MB available for Linux but adding mem=512M to linux boot command in u-boot, or changing the kernel config:

"Yes, I did it in kernel config, since I don’t know how to change cmdline in bootloader.

CONFIG_CMDLINE=”mem=512M@0×40000000″ # CONFIG_CMDLINE_FROM_BOOTLOADER is not set CONFIG_CMDLINE_EXTEND=y

AFAIK the upper 64M are reserved for MALI GPU, if it is disabled there should be no problem in using them. Still have to test it more extensively."

This has been tested with memtester and there does not seem to be any issues.

X. The fex file and various (including video) options:

If you have a working image but want to change some things like resolution or output device you have to change the scripts.bin file ... see: https://raw.github.com/amery/sunxi-bin-archive/master/mele-a1000/sys_config1.evb.fex this file has some comments that explain output options. search for ";disp init configuration" under that you get explanations what the numbers mean. for example:

screen0_output_type = 4 ; is VGA out

screen0_output_mode = 0 ; the resolution, in this case 0 is 1680*1050