MeLe A2000: Difference between revisions

From Lundman Wiki
No edit summary
mNo edit summary
Line 108: Line 108:
   
   
  DRAM: 512[    0.000000] Initializing cgroup subsys cpuset
  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.

Revision as of 02:21, 25 June 2012

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

Update: the non-beta release of ICS4 came out, which has settings/display, and lets you chose resolution


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: [1]

./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.