- Hacking on Mele A1000
- Change the u-boot in the device to support boot from MMC
- List of distros for the Mele A1000 / A2000
- Transferring SD card images to SD cards of different size
- Forgetful? Need more memory?
- CONFIG_CMDLINE_FROM_BOOTLOADER is not set
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:
- DealExtreme WARNING: Ordering from DealExtreme may be slow. Expect 3 - 4 weeks delay before shipping. Search with Google "DealExtreme slow" to get other reports.
- Taobao in China, RMB￥469
Specifications: [[!img Error: Image::Magick is not installed]]
- Power consumption less than 5W (android 2.3.3 + youtube video 720p: ~4.6W (without sata hdd))
- Video output - HDMI, CVBS, VGA .
- Audio output - R+L, SPDIF
- 3 usb host port + SDCard slot.
- External SATA port (real SATA not USB)
- Wifi b/g/n via a RTL8188CUS USB Module
Internal board has
- UART port connector.
- USB device port connector
- MIC pin. Some resistors & capacitors seem to be missing?
- CVBS-IN pin. Some resistors & capacitors seem to be missing?
- FEL jumper, unsoldered, 11K1 between flash, dram & pmu). 3.3V logics
- RESET?, unsoldered, 12J3 between the big round black ones, next to the big unpopulated connector at the right edge. 5V logics.
- 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:
- SCL (PB18 - TWI1_SCK)
- SDA (PB19 - TWI1_SDA)
- ?? (Requires R16 jumper)
- ?? (Requires R17 jumper)
Connector 10J3 (left edge, 6 pin unpopulated)
- ?? AC coupled
- ?? AC coupled
- PB20 - TWI2_SCK
- PB21 - TWI2_SDA
?? 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
The A1000's sys config1.fex
You need additional hardware to connect to the internal connectors:
- Internal UART port. (to get console output)
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.
- 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.
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:
- 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: a. `#if 0` => `#if 1` (enable support for mmc) b. 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.
- ref the eLinux Hack A1 devices page. use adb push the new u-boot.bin to tv-box.
- using rootstock to obtain ubuntu
- prebuilt ubuntu image mele ubuntu image
- Building Debian From Source Code for Mele
- building a Debian kernel
- obtaining puppy linux
- notes on using the mele as a server
- script to build linaro based ubuntu cnx-ubuntu-script
- Build Ubuntu Server (precise) for Mele
- Fedora 18: https://github.com/jwrdegoede/sunxi-fedora-scripts
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
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.
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.
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.
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.
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