Ubuntu 12.04 Server ARMHF Image for Mele A1000/A2000

I’ve seen quite a few people who want to use the Mele A1000 – or its brother the Mele A2000 – media player as a server (Sacrilege!). Since recent ARM servers are running Ubuntu 12.04, and Tom Gall has (conveniently) posted the live-build config necessary to generate Ubuntu 12.04 Server image this week, I thought I’d give it a try on Mele A1000.

The image generated is a headless system running Apache 2 and sshd (openssh_server). I’ll detail the steps I followed to generate this image first, so if you just want to try the SD card image, scroll down at the end of the post.

The first step is to generate Ubuntu Linaro Server rootfs, by following the Live-Build instructions on Linaro website together with Tom’s live build config. I’ve followed those steps in a machine running Ubuntu 12.04.

Let’s install the required packages:

Configure the build and start the build:


After a while, you’ll get the rootfs with the file name binary-tar.tar.gz which I renamed to ubuntu-server-12.06-armhf.tar.gz . If you want to skip that step, you can download ubuntu-server-12.06-armhf.tar.gz (180 MB).

Now we want to build the hardware packs for Mele A1000 using the server config in order to get as much as memory as possible for Linux. For this purpose, I’ve created a new config (mele-a1000-server) that disables video output in order to increase the memory available for Linux.

First install the scripts:


Then build the hardware packs:


You just find the hardware pack in a patch similar to bld_a10_hwpack_2012.06.21/mele-a1000-server_hwpack_2012.06.21.7z. Here’s the binary which you can also use for another server distribution.

Now you can create an SD card running Ubuntu Server as follows:


At this stage, you’ll need to a serial terminal to use the image, because eth0 is not enabled by default and sshd keys are missing. Let’s complete a few more step so that it can be used with the serial adapter.
Insert the SD card in Mele A1000, connect to the terminal via Putty / Minicom and once you get to the prompt, edit /etc/network/interfaces and add:


The other “issue” is that although sshd is running, it can’t be accessed because the keys haven’t been generated. Running those commands will generate the keys:


or simply run:


That’s all. We now have a (fully?) functional Ubuntu precise server running in Mele A1000 with 435 MB total memory, 106 MB used and 328 MB free:


[Update: It is possible to get the full 512MB memory for Linuxby adding “mem=512M” to extraargs in u-boot. The changes have been committed to github. Here’s the hardware pack for 512MB memory]

As promised at the beginning of the post, here’s the server SD card image (Nearly 1GB 121 MB*) that you can copy to an SD card using dd or Win32DiskImager. As long as you have a DHCP server running on your LAN, you should be able to login to the Mele A1000 via ssh using linaro user with the password linaro.

* After using the command


on the ext4 partition of the SD card, I managed to reduce the compressed size of the SD card image from ~1 GB to ~120 MB!

141
Leave a Reply

avatar
141 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
20 Comment authors
PamplinaUndertakermeherepamplina Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
mac me
Guest
mac me

hey if the wifi, and gpu can be switched off in the kernel/fex it will make a great low power low cost replacement for my little plugs … hopefully running debian wheezy .. come on A1000 boards arrive at my house soon soon !!!

As i understand it as it stands the A1000 is pretty useless for anything meaty linux video wise until decent drivers are available .. prob. months away …

Mark
Guest
Mark

Is this platform really practical for a server? What kind of Iperf performance have you seen using ethernet?

e8hffff
Guest
e8hffff

It’s amazing no one has yet made a image that burns into the main device memory. A stage that will need to be crossed to gain speed increases.

e8hffff
Guest
e8hffff

@ Mark

The big pitfull is 32bit. No mainstream ARM chip yet 64bit.

A server running say PHP is nice to have 64bit integers for speed, constants and other computation reasons.

ARM wont be big in server fields until they are 64bit.

e8hffff
Guest
e8hffff

“To use this image, you’ll need to a serial terminal, because eth0 is not enabled by default.”

Other words you need a device connected to the USB? A UART Dongle some have made or been supplied by Mele reseller.

Others words if you don’t have an UART Dongle then don’t download this.

mac me
Guest
mac me

@e8hffff

you can get these for $20 incl shipping from the guy on Aliexpress) from ebay … comes via HK post so far better than china post .. so in my case I paid GBP 1.78 (uk ebay) for the item plus cables incl shipping and it works perfectly (i ordered a couple extra at this price as spares 😉

Mark
Guest
Mark

@ cnxsoft
Thanks for running those iperf benchmarks. It’s about what I expected. I briefly tested a gigabit USB->ethernet adapter on an A10 tablet and got even lower @ ~25 Mbit/sec.

How was the CPU usage during your tests? Was it maxed out?

Yury
Guest
Yury

Could you explain how to customize the kernel configuration to get the maximum memory?

Vayu
Guest
Vayu

@ cnxsoft
I had to add explicit “mem” option to get all memory, otherwise it was using only 448M for some reason.

Vayu
Guest
Vayu

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

CONFIG_CMDLINE=”[email protected]
# 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.

GermanNorbert
Guest
GermanNorbert

Very good Job. Exactly what I am locking for.

Respect !!!!!!!

GermanNorbert
Guest
GermanNorbert

By the way – What is the password for user ‘root’ in the Image?

GermanNorbert
Guest
GermanNorbert

I found a way with sudo -su passwd to change the root password.

And now my next question. Is it possible that there no drivers for usb and/or sata in the Image?

I can’t see my Stick on the usb port and also not my FAT32 formatted Sata-HD in the doc.

I tried to install samba. It works but no drives where found.

Thanks in advance

GermanNorbert
Guest
GermanNorbert

Youre right i use a 2.5 ” Sata drive 160 GB.

The other mention i can only check later because I am at work now (still for 3h)

GermanNorbert
Guest
GermanNorbert

Sorry. In the moment is no time for the mele. I watch the European Championchip Germany against Italy

It don’t loks good for germany.

We will see us tomorrow

Vayu
Guest
Vayu

@ cnxsoft
I have similar experience (I waited 46 iterations).

It might be useful to completely disable drivers which need reserved memory (and related). Because now Mali reserves memory only implicitly (in boot parameter) and loading the driver is likely to crash the system. G2D seems to be quite broken, because it does not reserve memory at all, while it should take about 16M.

CONFIG_SUN4I_G2D
CONFIG_VIDEO_SUN4I_CEDAR
CONFIG_MALI
CONFIG_LYCHEE_LCD_SUN4I
CONFIG_LYCHEE_HDMI_SUN4I
CONFIG_SND_SUN4I_SOC_HDMIAUDIO

and all video-output related (maybe I missed some)

Vayu
Guest
Vayu

@ cnxsoft
Ah, sorry I missed the custom kernel commit.

CONFIG_SND_SUN4I_SOC_HDMIAUDIO is hidden under CONFIG_SOUND and CONFIG_SND_SOC
I didn’t have a chance to try it. Though suspect it wont work…

Vayu
Guest
Vayu

It also might be a good idea to disable some android modules. I disabled these in my config (which is based on yours)
# CONFIG_ANDROID_BINDER_IPC is not set
# CONFIG_ANDROID_LOGGER is not set
# CONFIG_ANDROID_TIMED_OUTPUT is not set
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set

Especially ANDROID_LOW_MEMORY_KILLER is not something anyone would like to see on a server machine.

GermanNorbert
Guest
GermanNorbert

Hello, I am back again,

in the interim I have intensely tried my SATA-Hd to run.

Unfortunately, without success 🙁

Can somebody maybe help me??

Yury
Guest
Yury

@ GermanNorbert
Module sw_ahci_platform.ko not loading automatically,
If you want the module SATA loading automatically then edit /etc/modules and at the sw_ahci_platform in a line.
But in this case does not always happen automount, and build a new kernel with built-in SATA module, now all ok.
Sorry for my english.

GermanNorbert
Guest
GermanNorbert

@ Yury

I have integrated the module like you have described.
Also testet libahci and libata.
Unfortunately, it does not function, nevertheless.

lsmod indicates the module sw_ahci_platform as loaded, but the harddisk is to be found nowhere.

fdisk -l dosent show the disk and no entry in /dev

Has tested 2 harddisks.

I can not make a new Kernel (Newbe).
Can this maybe do someone else for me?

Here is a part from dmesg
[ 130.610000] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
[ 130.630000] ata1: irq_stat 0x00000040, connection status changed
[ 130.640000] ata1: SError: { DevExch }
[ 130.650000] ata1: limiting SATA link speed to 1.5 Gbps
[ 130.660000] ata1: hard resetting link
[ 132.900000] ata1: SATA link down (SStatus 1 SControl 310)
[ 132.900000] ata1: EH complete

(This part repeats endless in the syslog)

GermanNorbert
Guest
GermanNorbert

@ cnxsoft

Many thanks! I think that is the right place to get the problem solved.

Yury
Guest
Yury

@ cnxsoft
I only add CIFS modules, and code pages for Russian language.

Yury
Guest
Yury

@ cnxsoft
My hdd 160Gb Hitachi:
HDD: 5K320-160
MODEL: HTS543216L9A300

GermanNorbert
Guest
GermanNorbert

@ cnxsoft

how can I find out this?

by the way, I am on the holidays till Monday

SJ
Guest
SJ

Hi there

I’m compiling myself a debian root kernel / fs and it works well. The only problem I have is that I can’t get the 512 MB ram (or maybe less) but I just end up with about 320 MB ram available.

Could you point out what exactely is needed to change?

trackback

[…] on AllWinner A10, you’ll be able to tinker with it, and install Ubuntu or Debian, use it as a server, build your own Android distribution (CyanogenMod), use it as a digital signage, and even install […]

mac me
Guest
mac me

hi,

i have a stable headless (not tested sata yet) debian wheezy armhf running now which i compiled from scratch and have only about 360MB total mem .. i have used my own armhf kernel/rootfs and boot.scr/script.bin

what do i need to modify to get 512MB RAM or as close to it as possible .. presumably i need to change whats selected/settings in the compilation process ?

thx

ian

Frank
Guest
Frank

Hi,

I have the same question as mac me. Yet I would like to run X. Do you have a mele-a1000 config where 512MB are available? I tried to find the correct file yesterday but could not grep to the correct spot. Now I read you edited the server.config. HDMI would be a sweet thing. 🙂

Greetings, Frank

mac me
Guest
mac me

.. i read from the comments here where there was too’ing and fro’ing over kernel config changes and I wondered if there was a final kernel config fully optimised for the 512mb .. hence my qu.

.. i did try just just for fun adding the extra mem512MB uboot change but as expected it made no diff

.. i’ll have a try next at using the mele deb arm hf as a build machine to setup and build hopefully a 512 lean headless setup with the kernel config as guide

thx