Libdvdread.plus: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Welcome to the FXP.One project.
=== MeLE A2000 ===


=== Mele file storage ===


Before you start, this is not just another FTP/FXP client. It does not
http://www.lundman.net/ftp/mele/
work that way.




FXP.One consists of an engine, and
=== Status ===
you would need (at least) one GUI to control it.


Current status with the Mele A2000, Allwinner A10.


==FXP.One engine==
Official release: Android 4 ICS, 4.0.8.
Kernel: 3.0.31+


The idea was to put all the hard code into an engine that is really
'''Positive:'''
easy to interface with. This has worked surprisingly well, in that you
* Video playback 1080p
can FTP/FXP entirely by using "telnet". This means writing a client,
* MKV playback
which is essentially just a Display Shell, quite trivial. This
* TS playback
includes people who wants to just script clients, like by using perl,
* YouTube
python and so on.
* Android market and Games (Angry Birds etc)


This also means you do NOT have to run the engine on the same machine that you run the GUI client(s).
'''Negative:'''
* <s>Network Streaming</s> Fixed. NIC has been patched to allow smooth 1080p steaming
* Audio. The settings; '''CODEC''' no sound, but probably on RCA. '''HDMI''' choppy sound, unusable. If made to work, only '''stereo''' on HDMI. '''SPDIF''' not working, does not turn on. (No red light)
* Bitstreaming; Unconfirmed since SPDIF is not functional. But can the hardware bitstream TrueHD, and DTS-MA ?
* 10bit video does not play (not supported by hardware, CPU too slow for software)
* AVI/XviD does not play (not supported by hardware, CPU too slow for software)


For example, if you had a stable host, perhaps even with a static IP
Currently, it is no good for mediaplayer. But if all you want is a toy to play youtube, some android games, and only stereo sound, it is definitely capable.
making the credentials for authentication easier, you could run the
engine there. Then connect to it by the client of your choice.


You can disconnect this client (the engine will keep working if you do
not tell it to stop) and start a new (and possibly different) client
elsewhere, and resume control of your previous work.


But you can run the engine and client at the same time, and quitting
=== Android 4 ICS wired NIC patch ===
at the same time, making it appear like a normal FTP/FXP client.


I have been working on trying to improve the '''wemac''' NIC driver in the Mele A2000 Allwinner A10 hardware, which will stutter when playing 720p/1080p over network. The current patch makes it much better, such that I think it is usable now. There is a '''mynewerimage.img''' image in the storage area, that you can '''dd''' to the '''nandc''' device. I will work on submitting the patch upstream.


'''If you are looking for a Windows binary, please download the bundle from the latest [[UFxp]] client'''
For example, if you boot miniand image:


==Compiling and Install the engine==
# modprobe nand    # nand.ko on my storage area too
  % wget http://www.lundman.net/ftp/fxp-one-1.4.tar.gz
# wget http://lundman.net/ftp/mele/mynewerimage.img
  % tar -xvf fxp-one-1.4.tar.gz
# dd if=/dev/nandc of=mele_nandc_backup.bin bs=65536
  % cd FXP.One/
# dd if=mynewerimage.img of=/dev/nandc bs=65536
  % ./configure
# sync
  % make
# reboot -f
  % make install


Now create your SSL keys
And take out the SD card to boot Android again. If you do this using Android, the device node is /dev/block/nandc


  % openssl req -new -x509 -nodes -out lion.pem -keyout lion.pem
=== Android 4 ICS official Mele image ===


The official Mele Android ICS image is out, called '''Mele_HTPC_Android_4.0_V1.rar''' which you need to use PhoenixCard to "burn". Once installed, you can use '''audiopatch1.3.apk''' to enable some sound features. Otherwise it seems quite similar to A10 firmware.


Create your .FXP.One folder and copy lion.pem into it
For those not using Windows, I also made a '''dd''' image: '''Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2''' [http://lundman.net/ftp/mele/Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2] Just dd the whole thing to your raw device.


  % mkdir .FXP.One && cp lion.pem .FXP.One/ 
=== Android 4 IceCreamSandwich ===


Start the FXP.One engine
'''Update: the non-beta release of ICS4 came out (for the A10, not Mele's release), which has settings/display, and lets you chose resolution '''


  % FXP.One
For Unix and clones:
wget http://www.lundman.net/ftp/mele/homlet_4.0_v1.0_20120609_dd.img.lzma
7z x homlet_4.0_v1.0_20120609_dd.img.lzma
sudo dd if=homlet_4.0_v1.0_20120609_dd.img of=/dev/sdX bs=1M
sync


(Please use gnuMake; which might be called make, gmake, gnumake etc on your system)
Where you need to replace X in /dev/sdX by the correct letter for your SD card reader.
Now insert the SD card in your Mele, and wait until the LED stops blinking, remove the SD card and restart the device. Et voila!
(Read more: [http://www.cnx-software.com/2012/06/18/mele-a1000a2000-android-4-0-image-released/#ixzz1ylfoeKQc]) See I kept the paste URL cos I'm nice! :)


This should always compile the '''FXP.One engine'''. If ''configure'' can find the correct '''CDK''' library and '''ncurses''' on your system it will also compile the '''ncurses''' client '''FXP.cOne'''. Otherwise it will skip compiling this client.


'''Openssl-devel'''If you see a error like this:
''checking whether we need extra options to link OpenSSL... configure: error: Found linkable OpenSSL in , but it doesn't run, even with -R.  Maybe specify another using --with-ssl-dir?''


You will need to openssl-devel for your system. On most Red Hat Variants it can be done with yum.  
There is also an audiopatch for the ICS4 image to get sound to work. Copy over '''audiopatch1.2.apk''' (adb, or physical media) to your ICS4, install and run.


yum -y install openssl-devel
Not convinced it makes any difference for me. Audio appears not to work still.


'''''SSL Issues'''''
It appears the contents on audiopatch1.2 is pretty much just libswa.so. Not entirely sure what it thinks to do with it, but if I do a '''find''' from root, there is no such library, before and after running patch.


If your trying to connect from your client and get errors about ssl it probably means that they versions of ssl you have on your engine and your client are not compatible.
I copied the file by hand:


For example on the client end we have ssl version OpenSSL 0.9.8e-fips-rhel5 and on the server and OpenSSL 09.8k on another. There are many reasons why this will not work and many more why it should. In this case you will need to compile OpenSSL 0.9.8K on the server you wish to use FXP.Oned on and build FXP.Oned against that version of ssl. It the example below we will build openssl-0.9.8k in a local directory and compile FXP.Oned to use it.  
busybox cp /data/data/com.android.audiopatch/files/libswa.so /system/lib/


To do this go to the openssl.org downloads page and download the version you want to use.  
and I get sound playing videos with some audio formats now. Like, TV MKV releases.
 
=== Mele A2000 ===
 
I purchased a MeLE A2000 from Tom over at [http://www.aliexpress.com/product-fm/546571245-Mele-A2000-TV-box-Allwinner-A10-hackable-device-wholesalers.html aliexpress], and been playing around with it as well. First I wanted to install ICS4, to do that I downloaded the '''android_4.0.img''' file from the 'net. Alas, there is a large volume of confusing information on what to do with this.
 
[http://www.lundman.net/ftp/mele/ http://www.lundman.net/ftp/mele/]
[https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012 https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012]
 
For the MeLE A2000, I also downloaded '''PhoenixCardV303(win7)''' and installed that in my VirtualBox Win7 system, forwarded the OSX USB drive and told it to install '''android_4.0.img'''.
 
[https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012 https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012]
[http://www.lundman.net/ftp/mele/ http://www.lundman.net/ftp/mele/]
 
After that, I inserted the SD card into Mele, and rebooted.
 
The power LED will blink RED + BLUE for a while, then power LED will turn off.
 
Take out SDcard, and reboot MeLE. It will now boot ICS, but only on HDMI@720p.
 
I can confirm BubbleUPNP + 2160pPlayer will play 1080p MKVs over network. Nice!
 
 
=== Google Market/Play ===
 
I installed one of the Terminal programs, and told adb to use TCP (haven't bothered to open my mele yet). Using adb and the instructions found [http://www.slatedroid.com/topic/30855-scripts-allwinner-a10-tablets-google-play-script/ allwinner a10 scripts] I loaded Google Market/Play to the mele.
 
 
 
=== Changing resolution ===
 
This refers to the Beta ICS4. Probably is not useful any more, but I will leave it here for reference.
 
Changing resolution can be done by modifying the boot time scripts that the A10 uses. Usually done on a separate boot partition. For example, the Mele image has the files:
 
mount /dev/mmcblk0p1 /mnt
ls -l /mnt/
evb.bin
 
git clone https://github.com/amery/sunxi-tools
cd sunxi-tools
make
./bin2fex /mnt/evb.bin > evb.fex   
 
Edit the file any odd way you want, changing '''screen0_output_type''' and '''screen0_output_mode'''. See modes here: [https://github.com/amery/linux-allwinner/blob/allwinner-v3.0-android-v2/include/linux/drv_display_sun4i.h#L132]
 
./fex2bin evb.fex > /mnt/evb.bin
 
 
If you are running the Android 4 (ICS) Beta that was released, to change the resolution to HDMI 1080p, you can do this. Using either a terminal program on Android (ConnectionBot for example) or the USB Console (if connected).
 
On the mele root shell
setprop service.adb.tcp.port 5555
stop adbd
start adbd
netstat -na      # Check that it is listening on port 5555
 
On remote adb machine
adb connect 192.168.xxx.xxx    # Put in the Mele's IP
adb shell
adb> mount -t vfat /dev/block/nanda /mnt/obb
adb> exit
adb push script-HDMI-1080p60.bin /mnt/obb/
adb shell
adb> cd /mnt/obb
adb> busybox cp script-HDMI-1080p60.bin script.bin
 
If you don't want to edit the script file yourself, you can download my prepared one:
[http://www.lundman.net/ftp/mele/script-HDMI-1080p60.bin script-HDMI-1080p60.bin]
 
=== U-boot ===
 
Since I added ZFS to u-boot for CuBox, and also patched in Samsungs EXT4 patches, I built hno's u-boot to test.
 
https://github.com/lundman/uboot-allwinner/tree/zfs
 
wget http://lundman.net/ftp/mele/sunxi-spl.bin
dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8        # Obviously, '''sdc''' is my SDcard, change device to applicable.
wget http://lundman.net/ftp/mele/u-boot.bin
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32          # Obviously, '''sdc''' is my SDcard, change device to applicable.
 
U-Boot 2012.04.01-g39085db-dirty (May 29 2012 - 02:29:31) Allwinner Technology
CPU:  SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
MMC:  SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
sun4i#zfsload
zfsload - load binary file from a ZFS filesystem
 
sun4i#zfsload mmc 0:2 0x48000000 /boot/@/uImage
Loading file "/boot/@/uImage" from mmc device 0:2 xxa2
zfs fsname = '/boot/' snapname='<NULL>' filename = '/uImage'
4230340 bytes read
sun4i#bootm 0x48000000
## Booting kernel from Legacy Image at 48000000 ...
  Image Name:  Linux-3.0.8+
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:    4230276 Bytes = 4 MiB
  Load Address: 40008000
  Entry Point:  40008000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
OK
Starting kernel ...
DRAM: 512[    0.000000] Initializing cgroup subsys cpuset
 
 
=== Android Kernel ===
 
I wanted to replace the ICS4 kernel with my own, for the nic fixes. These are the steps I took:
 
git clone https://github.com/amery/linux-allwinner
git branch lichee-3.0.8-sun4i
make sun4i_crane_defconfig
Check that .config has
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
 
The wemac nic was panicing on boot everytime, until I changed this:
 
drivers/net/sun4i/sun4i_wemac.c
#define PHY_POWER 0  /* was 1 */
 
make uImage
 
From android, I used ConnectBot to make a copy of the 'boot' partition, nandc.
 
adb shell
adb> dd if=/dev/block/nandc of=/mnt/sdcard/nandc bs=65536
adb pull /mnt/sdcard/nandc
 
Then split it up into kernel and ramfs, you can find split_bootimg.pl my storage area (url above)
 
# ./split_bootimg.pl nandc
Page size: 2048 (0x00000800)
Kernel size: 8410564 (0x008055c4)
Ramdisk size: 975609 (0x000ee2f9)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing nandc-kernel ... complete.
Writing nandc-ramdisk.gz ... complete.
 
The idea is to make a new kernel, that looks roughly the same as nandc-kernel, and re-use the nandc-ramdisk.gz
 
Once the compile has finished, we make a new image. According to the nandc ANDROID! header, the base address for Mele is 0x40000000
 
# mkbootimg --base 40000000 --kernel arch/arm/boot/Image --ramdisk ../nandc-ramdisk.gz -o ../mynewimage.img
 
Now I boot into Miniand image on SD card, use my nand.ko to load the device for /dev/nand*. You can find my Miniand kernel '''uImage''' and '''nand.ko''' in the storage area too. The default Miniand kernel did not come with nand driver.
 
# modprobe nand.ko
# dd if=mynewimage.img of=/dev/nandc bs=2048
# sync
# reboot
 
and remove the SD card to boot Android. If you want to undo, and go back to ICS4, put '''nandc''' file instead of '''mynewimage.img''' in the '''dd''' line above.
 
=== Mele's Wired Network Interface ===
 
The wired nic in the Mele is a '''wemac''' from Davidcom. It is unfortunately quite poor. You will get decent 100MB speeds from it, but it uses the CPU. If you do any transfers while trying to watch video (including watching video over network) it will stutter for 1080p. Interestingly if you use SD, or USB while watching, it has no problem.
 
The WIFI driver sits on the USB bus and is not affected by this.
 
Using a USBEthernet dongle (I tried an Apple brand) also works without issues.
 
 
=== ZFS on Android ===
 
I have already ported ZFS to ARM, so that should just work if you compile ZFS with your kernel. But I also wanted to see if I can get ZFS to work with Android. The modules do load ok, but execution does not work:
 
# cd /mnt/sdcard/
# insmod spl.ko && insmod zavl.ko&&insmod znvpair.ko&&insmod zunicode.ko&&insmod zcommon.ko&&insmod zfs.ko&&insmod zpios.ko&&cp zpool /mnt/obb/&&chmod 755 /mnt/obb/zpool
# cd /mnt/obb
# strace -f ./zpool create melepool /dev/block/sda1   
open("/dev/block/sda1", O_WRONLY|O_EXCL|O_LARGEFILE) = 6
write(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
fdatasync(6)                            = 0
close(6)                                = 0
open("/melepool", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = -1 ENOENT (No such file or directory)
ioctl(3, ITE_GPIO_IN
 
and it hangs.
 
 
=== djmount for Android ===
 
So one option is to have a mediaplayer with UPNP ability, like that of BubbleUPNP or PlugPlayer. However, both of these do poorly with Mele's remote control. With Bubble you can not click on Directories to enter them, but have to Mouse-Mode in/out to do so.
 
So one option is to mount all UPNP devices as a directory. Since Mele's kernel already comes with FUSE, I compiled '''djmount''' for it (patched version with >2GB size fixed).
 
% adb push djmount /mnt/obb
% adb shell
# cd /mnt/obb
# chmod 755 djmount
# ./djmount  -o allow_other /mnt/sdcard/Pictures                # No reason to pick "Pictures" I just wanted an existing directory
# ls -l Pictures/                               
-r--r--r-- root    root          49 2000-01-01 20:00 devices
dr-xr-xr-x root    root              2000-01-01 20:00 llink-daemon UPNP Media Server (MediaServer) : 1
   
   
  http://openssl.org/source/
  # ls -l Pictures/llink-daemon\ UPNP\ Media\ Server\ \ \(MediaServer\)\ \:\ 1/
  wget http://openssl.org/source/openssl-0.9.8k.tar.gz
  dr-xr-xr-x root    root              2000-01-01 20:00 DVD
  tar -xvzf openssl-0.9.8k.tar.gz
dr-xr-xr-x root    root              2000-01-01 20:00 Game of Thrones
  cd openssl-0.9.8k
dr-xr-xr-x root    root              2000-01-01 20:00 Music
./configure
  dr-xr-xr-x root    root              2000-01-01 20:00 Video
make
  -r--r--r-- root    root    14010368 2000-01-01 20:00 movie.m4v
 
And indeed, if you use the File browser in ICS4, you can just enter that directory, and play any video. Note that '''djmount''' is pretty slow on listing directories, and I think we might want to look at speeding that up if we are to use it long term. Also, increase the cache timeout from 60s to something much higher, like 10 minutes.
 


Now go back to your FXP.Oned directory,
make clean
./configure LIBS=-ldl --with-ssl-dir=/home/erin/srcs/openssl-0.9.8k
make
make install


==Running the engine==
=== PS3EYE WebCam ===


I wanted to see if the PS3 Eye would work with Mele, and Skype.


'''You will most likely need to create an SSL certificate for the engine since the default is only to accept secure connections.'''
Video:


# insmod gspca_main.ko                               
# insmod gspca_ov534.ko videomode=13     


Since the engine will be saving your remote FTP site information, as
That makes the camera work with Skype and '''Zoom Camera''' app. When I tried one of the 640x480 modes it just hangs, so currently it is 320x240@60.
well as any User/Passwords you chose on disk, you should consider
encrypting these files.


FXP.One engine will do this for you. When you start the engine, it
Audio:
will as for a "Key". This is the Key that it will use to encrypt all
its data files. If you do not want encryption, just press return.


For the first time you run FXP.One, just make up whatever Key you
No idea. The device shows:
want.


When you start the engine in future, you have to specify the correct
# cat /proc/asound/cards                             
Key or it will not be able to read your data files. (And you will not
0 [sun4icodec    ]: sun4i-CODEC - sun4i-CODEC
be able to login).
                      sun4i-CODEC  Audio Codec
1 [sun4isndhdmi  ]:  - sun4i-sndhdmi
                      sun4i-sndhdmi
2 [CameraB409241  ]: USB-Audio - USB Camera-B4.09.24.1
                      OmniVision Technologies, Inc. USB Camera-B4.09.24.1 at usb-sw-ehci-1.3, high sp
3 [sun4isndspdif  ]:  - sun4i-sndspdif
                      sun4i-sndspdif


To start again, you need to delete all .FXP.One files, and the engine
And we get the device nodes:
will create these again.


When the user file does not exist, the FXP.One engine will
# ls -l /dev/snd/
automatically create a login as "admin" with password "admin".
crw-rw---- system  audio    116,  0 2012-07-03 14:12 controlC0
crw-rw---- system  audio    116,  32 2012-07-03 14:12 controlC1
crw-rw---- system  audio    116,  64 2012-07-03 14:12 controlC2
crw-rw---- system  audio    116,  96 2012-07-03 14:12 controlC3
crwxrwxrwx system  system  116,  24 2012-07-03 14:12 pcmC0D0c
crwxrwxrwx system  system  116, 16 2012-07-03 14:12 pcmC0D0p
crw-rw---- system  audio    116,  48 2012-07-03 14:12 pcmC1D0p
crw-rw---- system  audio    116,  88 2012-07-03 14:12 pcmC2D0c
crw-rw---- system  audio    116, 112 2012-07-03 14:12 pcmC3D0p
crw-rw---- system  audio    116,  33 2012-07-03 14:12 timer


But no idea how to tell Android to use the USB device as the main microphone.


NOTE: If you edit .FXP.One.settings file, you can change the option
# setprop usb.audio.cap.device pcmC0D0c
"ssl=1". By default it will only allow SSL connections. If you change
# setprop media.audio.in.mode usb
it to "ssl=0" you make it optional. This allows you to telnet to the
engine should you wish to check it out. Please read the
"engine/API.txt" for more information on the FXP.One protocol.


NOTE: Please be aware that all skiplist, movefirstlist and passlists
Neither of those work.
are separated by the "/" character.
That is, "fmovefirst=*.sfv/*.nfo".

Latest revision as of 13:11, 21 July 2012

MeLE A2000

Mele file storage

http://www.lundman.net/ftp/mele/


Status

Current status with the Mele A2000, Allwinner A10.

Official release: Android 4 ICS, 4.0.8. Kernel: 3.0.31+

Positive:

  • Video playback 1080p
  • MKV playback
  • TS playback
  • YouTube
  • Android market and Games (Angry Birds etc)

Negative:

  • Network Streaming Fixed. NIC has been patched to allow smooth 1080p steaming
  • Audio. The settings; CODEC no sound, but probably on RCA. HDMI choppy sound, unusable. If made to work, only stereo on HDMI. SPDIF not working, does not turn on. (No red light)
  • Bitstreaming; Unconfirmed since SPDIF is not functional. But can the hardware bitstream TrueHD, and DTS-MA ?
  • 10bit video does not play (not supported by hardware, CPU too slow for software)
  • AVI/XviD does not play (not supported by hardware, CPU too slow for software)

Currently, it is no good for mediaplayer. But if all you want is a toy to play youtube, some android games, and only stereo sound, it is definitely capable.


Android 4 ICS wired NIC patch

I have been working on trying to improve the wemac NIC driver in the Mele A2000 Allwinner A10 hardware, which will stutter when playing 720p/1080p over network. The current patch makes it much better, such that I think it is usable now. There is a mynewerimage.img image in the storage area, that you can dd to the nandc device. I will work on submitting the patch upstream.

For example, if you boot miniand image:

# modprobe nand     # nand.ko on my storage area too
# wget http://lundman.net/ftp/mele/mynewerimage.img
# dd if=/dev/nandc of=mele_nandc_backup.bin bs=65536
# dd if=mynewerimage.img of=/dev/nandc bs=65536
# sync
# reboot -f

And take out the SD card to boot Android again. If you do this using Android, the device node is /dev/block/nandc

Android 4 ICS official Mele image

The official Mele Android ICS image is out, called Mele_HTPC_Android_4.0_V1.rar which you need to use PhoenixCard to "burn". Once installed, you can use audiopatch1.3.apk to enable some sound features. Otherwise it seems quite similar to A10 firmware.

For those not using Windows, I also made a dd image: Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2 [1] Just dd the whole thing to your raw device.

Android 4 IceCreamSandwich

Update: the non-beta release of ICS4 came out (for the A10, not Mele's release), which has settings/display, and lets you chose resolution

For Unix and clones:

wget http://www.lundman.net/ftp/mele/homlet_4.0_v1.0_20120609_dd.img.lzma
7z x homlet_4.0_v1.0_20120609_dd.img.lzma
sudo dd if=homlet_4.0_v1.0_20120609_dd.img of=/dev/sdX bs=1M
sync

Where you need to replace X in /dev/sdX by the correct letter for your SD card reader. Now insert the SD card in your Mele, and wait until the LED stops blinking, remove the SD card and restart the device. Et voila! (Read more: [2]) See I kept the paste URL cos I'm nice! :)


There is also an audiopatch for the ICS4 image to get sound to work. Copy over audiopatch1.2.apk (adb, or physical media) to your ICS4, install and run.

Not convinced it makes any difference for me. Audio appears not to work still.

It appears the contents on audiopatch1.2 is pretty much just libswa.so. Not entirely sure what it thinks to do with it, but if I do a find from root, there is no such library, before and after running patch.

I copied the file by hand:

busybox cp /data/data/com.android.audiopatch/files/libswa.so /system/lib/

and I get sound playing videos with some audio formats now. Like, TV MKV releases.

Mele A2000

I purchased a MeLE A2000 from Tom over at aliexpress, and been playing around with it as well. First I wanted to install ICS4, to do that I downloaded the android_4.0.img file from the 'net. Alas, there is a large volume of confusing information on what to do with this.

http://www.lundman.net/ftp/mele/ 
https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012

For the MeLE A2000, I also downloaded PhoenixCardV303(win7) and installed that in my VirtualBox Win7 system, forwarded the OSX USB drive and told it to install android_4.0.img.

https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012
http://www.lundman.net/ftp/mele/ 

After that, I inserted the SD card into Mele, and rebooted.

The power LED will blink RED + BLUE for a while, then power LED will turn off.

Take out SDcard, and reboot MeLE. It will now boot ICS, but only on HDMI@720p.

I can confirm BubbleUPNP + 2160pPlayer will play 1080p MKVs over network. Nice!


Google Market/Play

I installed one of the Terminal programs, and told adb to use TCP (haven't bothered to open my mele yet). Using adb and the instructions found allwinner a10 scripts I loaded Google Market/Play to the mele.


Changing resolution

This refers to the Beta ICS4. Probably is not useful any more, but I will leave it here for reference.

Changing resolution can be done by modifying the boot time scripts that the A10 uses. Usually done on a separate boot partition. For example, the Mele image has the files:

mount /dev/mmcblk0p1 /mnt
ls -l /mnt/
evb.bin
git clone https://github.com/amery/sunxi-tools
cd sunxi-tools
make
./bin2fex /mnt/evb.bin > evb.fex    

Edit the file any odd way you want, changing screen0_output_type and screen0_output_mode. See modes here: [3]

./fex2bin evb.fex > /mnt/evb.bin


If you are running the Android 4 (ICS) Beta that was released, to change the resolution to HDMI 1080p, you can do this. Using either a terminal program on Android (ConnectionBot for example) or the USB Console (if connected).

On the mele root shell

setprop service.adb.tcp.port 5555
stop adbd
start adbd
netstat -na       # Check that it is listening on port 5555

On remote adb machine

adb connect 192.168.xxx.xxx    # Put in the Mele's IP
adb shell
adb> mount -t vfat /dev/block/nanda /mnt/obb
adb> exit
adb push script-HDMI-1080p60.bin /mnt/obb/
adb shell
adb> cd /mnt/obb
adb> busybox cp script-HDMI-1080p60.bin script.bin

If you don't want to edit the script file yourself, you can download my prepared one: script-HDMI-1080p60.bin

U-boot

Since I added ZFS to u-boot for CuBox, and also patched in Samsungs EXT4 patches, I built hno's u-boot to test.

https://github.com/lundman/uboot-allwinner/tree/zfs
wget http://lundman.net/ftp/mele/sunxi-spl.bin
dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8        # Obviously, sdc is my SDcard, change device to applicable.

wget http://lundman.net/ftp/mele/u-boot.bin
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32          # Obviously, sdc is my SDcard, change device to applicable.
U-Boot 2012.04.01-g39085db-dirty (May 29 2012 - 02:29:31) Allwinner Technology 

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

sun4i#zfsload
zfsload - load binary file from a ZFS filesystem
sun4i#zfsload mmc 0:2 0x48000000 /boot/@/uImage
Loading file "/boot/@/uImage" from mmc device 0:2 xxa2
zfs fsname = '/boot/' snapname='<NULL>' filename = '/uImage'
4230340 bytes read

sun4i#bootm 0x48000000
## Booting kernel from Legacy Image at 48000000 ...
  Image Name:   Linux-3.0.8+
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    4230276 Bytes = 4 MiB
  Load Address: 40008000
  Entry Point:  40008000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
OK

Starting kernel ...

DRAM: 512[    0.000000] Initializing cgroup subsys cpuset


Android Kernel

I wanted to replace the ICS4 kernel with my own, for the nic fixes. These are the steps I took:

git clone https://github.com/amery/linux-allwinner
git branch lichee-3.0.8-sun4i
make sun4i_crane_defconfig

Check that .config has

CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set

The wemac nic was panicing on boot everytime, until I changed this:

drivers/net/sun4i/sun4i_wemac.c
#define PHY_POWER 0   /* was 1 */
make uImage

From android, I used ConnectBot to make a copy of the 'boot' partition, nandc.

adb shell
adb> dd if=/dev/block/nandc of=/mnt/sdcard/nandc bs=65536
adb pull /mnt/sdcard/nandc

Then split it up into kernel and ramfs, you can find split_bootimg.pl my storage area (url above)

# ./split_bootimg.pl nandc
Page size: 2048 (0x00000800)
Kernel size: 8410564 (0x008055c4)
Ramdisk size: 975609 (0x000ee2f9)
Second size: 0 (0x00000000)
Board name: 
Command line: 
Writing nandc-kernel ... complete.
Writing nandc-ramdisk.gz ... complete.

The idea is to make a new kernel, that looks roughly the same as nandc-kernel, and re-use the nandc-ramdisk.gz

Once the compile has finished, we make a new image. According to the nandc ANDROID! header, the base address for Mele is 0x40000000

# mkbootimg --base 40000000 --kernel arch/arm/boot/Image --ramdisk ../nandc-ramdisk.gz -o ../mynewimage.img

Now I boot into Miniand image on SD card, use my nand.ko to load the device for /dev/nand*. You can find my Miniand kernel uImage and nand.ko in the storage area too. The default Miniand kernel did not come with nand driver.

# modprobe nand.ko
# dd if=mynewimage.img of=/dev/nandc bs=2048
# sync
# reboot

and remove the SD card to boot Android. If you want to undo, and go back to ICS4, put nandc file instead of mynewimage.img in the dd line above.

Mele's Wired Network Interface

The wired nic in the Mele is a wemac from Davidcom. It is unfortunately quite poor. You will get decent 100MB speeds from it, but it uses the CPU. If you do any transfers while trying to watch video (including watching video over network) it will stutter for 1080p. Interestingly if you use SD, or USB while watching, it has no problem.

The WIFI driver sits on the USB bus and is not affected by this.

Using a USBEthernet dongle (I tried an Apple brand) also works without issues.


ZFS on Android

I have already ported ZFS to ARM, so that should just work if you compile ZFS with your kernel. But I also wanted to see if I can get ZFS to work with Android. The modules do load ok, but execution does not work:

# cd /mnt/sdcard/
# insmod spl.ko && insmod zavl.ko&&insmod znvpair.ko&&insmod zunicode.ko&&insmod zcommon.ko&&insmod zfs.ko&&insmod zpios.ko&&cp zpool /mnt/obb/&&chmod 755 /mnt/obb/zpool
# cd /mnt/obb
# strace -f ./zpool create melepool /dev/block/sda1    
open("/dev/block/sda1", O_WRONLY|O_EXCL|O_LARGEFILE) = 6
write(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
fdatasync(6)                            = 0
close(6)                                = 0
open("/melepool", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = -1 ENOENT (No such file or directory)
ioctl(3, ITE_GPIO_IN

and it hangs.


djmount for Android

So one option is to have a mediaplayer with UPNP ability, like that of BubbleUPNP or PlugPlayer. However, both of these do poorly with Mele's remote control. With Bubble you can not click on Directories to enter them, but have to Mouse-Mode in/out to do so.

So one option is to mount all UPNP devices as a directory. Since Mele's kernel already comes with FUSE, I compiled djmount for it (patched version with >2GB size fixed).

% adb push djmount /mnt/obb
% adb shell
# cd /mnt/obb
# chmod 755 djmount
# ./djmount  -o allow_other /mnt/sdcard/Pictures                # No reason to pick "Pictures" I just wanted an existing directory
# ls -l Pictures/                                 
-r--r--r-- root     root           49 2000-01-01 20:00 devices
dr-xr-xr-x root     root              2000-01-01 20:00 llink-daemon UPNP Media Server (MediaServer) : 1

# ls -l Pictures/llink-daemon\ UPNP\ Media\ Server\ \ \(MediaServer\)\ \:\ 1/
dr-xr-xr-x root     root              2000-01-01 20:00 DVD
dr-xr-xr-x root     root              2000-01-01 20:00 Game of Thrones
dr-xr-xr-x root     root              2000-01-01 20:00 Music
dr-xr-xr-x root     root              2000-01-01 20:00 Video
-r--r--r-- root     root     14010368 2000-01-01 20:00 movie.m4v

And indeed, if you use the File browser in ICS4, you can just enter that directory, and play any video. Note that djmount is pretty slow on listing directories, and I think we might want to look at speeding that up if we are to use it long term. Also, increase the cache timeout from 60s to something much higher, like 10 minutes.


PS3EYE WebCam

I wanted to see if the PS3 Eye would work with Mele, and Skype.

Video:

# insmod gspca_main.ko                                
# insmod gspca_ov534.ko videomode=13       

That makes the camera work with Skype and Zoom Camera app. When I tried one of the 640x480 modes it just hangs, so currently it is 320x240@60.

Audio:

No idea. The device shows:

# cat /proc/asound/cards                              
0 [sun4icodec     ]: sun4i-CODEC - sun4i-CODEC
                     sun4i-CODEC  Audio Codec
1 [sun4isndhdmi   ]:  - sun4i-sndhdmi
                     sun4i-sndhdmi
2 [CameraB409241  ]: USB-Audio - USB Camera-B4.09.24.1
                     OmniVision Technologies, Inc. USB Camera-B4.09.24.1 at usb-sw-ehci-1.3, high sp
3 [sun4isndspdif  ]:  - sun4i-sndspdif
                     sun4i-sndspdif

And we get the device nodes:

# ls -l /dev/snd/
crw-rw---- system   audio    116,   0 2012-07-03 14:12 controlC0
crw-rw---- system   audio    116,  32 2012-07-03 14:12 controlC1
crw-rw---- system   audio    116,  64 2012-07-03 14:12 controlC2
crw-rw---- system   audio    116,  96 2012-07-03 14:12 controlC3
crwxrwxrwx system   system   116,  24 2012-07-03 14:12 pcmC0D0c
crwxrwxrwx system   system   116,  16 2012-07-03 14:12 pcmC0D0p
crw-rw---- system   audio    116,  48 2012-07-03 14:12 pcmC1D0p
crw-rw---- system   audio    116,  88 2012-07-03 14:12 pcmC2D0c
crw-rw---- system   audio    116, 112 2012-07-03 14:12 pcmC3D0p
crw-rw---- system   audio    116,  33 2012-07-03 14:12 timer

But no idea how to tell Android to use the USB device as the main microphone.

# setprop usb.audio.cap.device pcmC0D0c
# setprop media.audio.in.mode usb

Neither of those work.