Minimal Debian "Server" image for the Allwinner A10 and A20 devices

1. Download the image file

A20: 2014-10-14

  • Linux 3.4.103-r0-s20-rm1+ "server" kernel
  • dist-upgrade'd to the latest Debian Wheezy + security updates;

A20: 2014-02-18b

  • Fixed the SMP issue in the A20 version

A20: 2014-02-18

  • Fixed the boot-up problem in the A20 version

Both: 2014-02-17

  • Linux 3.4.79-r0-s-rm1+ "server" kernel for the A10, 3.4.79-r0-s20-rm1+ for the A20;
  • dist-upgrade'd to the latest Debian Wheezy + security updates;

A10: 2018-05-17

  • Linux 3.4.104-r0-s-rm2+ "server" kernel;
  • dist-upgrade'd to the latest Debian Jessie + security updates;
  • no systemd; remove /etc/apt/preferences.d/systemd if you want to install it.

Download for the A10 here

Download for the A20 here

thanks to exp-tech.de for providing A20 hardware for development

Note: if you enjoy these images you're welcome to support the development and hosting by making a donation; a detailed listing of donations received so far is publicly available.

See release notes of previous updates

2. Extract and write the downloaded image to an SD card

A 2GB SD card (or larger) is required. If there is an interest, I could consider making images which fit onto smaller cards, but then users with larger cards will have to resize partitions manually, which is a hassle. Anyway, SD cards are so cheap nowadays, there is little reason to use anything smaller than a 2GB card for your system.

As the 'root' user, run:

bzip2 -dc a10-debian-server-2gb*.bz2 > /dev/sdX

On Windows you can unpack the .bz2 archive using e.g. 7-Zip; then you can write it to an SD card using Win32DiskImager.

If your network has no DHCP server, you will have to mount the second partition on the SD card to set up a static network configuration in /etc/network/interfaces as needed. Running blockdev --rereadpt /dev/sdX might be required in this case before mounting, so that the system even realizes there are now partitions on the SD card.

Make sure to always run sync before removing your SD card (and of course unmount all SD partitions if you mounted any).

3. Change the bootloader to a device-specific one

  • On the A10 images this is required to gain access to full 1 GB of RAM and not just 512MB by default.
  • Also this is required on some devices to even boot this image at all, e.g. on “MK802 II”

Note: You will need a GNU/Linux machine to do the steps which replace the bootloader; if you do not already have one, you can try just booting the image “as is”, and postpone this step to after your A10 device already boots into Debian.

Download an archive matching your device from http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/u-boot-sunxi-latest/ (for A10 devices which do not have a specific package, you can try u-boot-sunxi-a10_mid_1gb; for A20 ones in the same situation try u-boot-sunxi-cubieboard2.)

Unpack it with tar -xf u-boot-*.tar.xz;

Write the new bootloader to the SD card (replace /dev/sdX with your device name):

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

4. Insert the SD card into your device and power it on

There will be no display output after booting this image, you are supposed to access the system over SSH only. If you intend to use the graphics portion of the Allwinner chip, you will need to replace the kernel with a "Desktop" or "Video" variant.

The Debian system on it uses a fairly recent kernel, which in addition to the A10 built-in NIC supports most (or all) of the USB Ethernet dongles.

  • With a device featuring Ethernet, like a Mele A1000 or A2000, connect your ethernet cable to the onboard NIC;
  • With a device lacking Ethernet, e.g. an MK802 or Mini-X, you will need to use an USB Ethernet dongle.

After powering-on and booting (which can take about 3 minutes, depending on the speed of your SD card), the system will launch a DHCP client on both eth0 and eth1, and will try to obtain an address. The reason there are two of them, is to support both types of devices, as eth0 is always taken up by the A10's built-in NIC, so on devices like the MK802 the first usable (by an USB dongle) interface name will be eth1. If you use your SD card on only one type of device, you can comment-out the unneeded interface in /etc/network/interfaces later.

5. Find out which IP your device got

If you didn't set up a static configuration, check your DHCP server logs or a list of current leases, to see which IP the newly-booted device has obtained.

6. Login into your new Debian system

Using the IP you found, login via ssh to it;

  • username: root
  • password: password

7. Install your device's script.bin

script.bin is the hardware configuration file that resides on a partition in the A10 devices' onboard flash and is tailored to its particular specs, e.g. the operating frequency of RAM. My image currently ships with a script.bin that is expected to generally work on any A10 device. But to eliminate any possibility of stability issues or reduced performance, you should copy that file from the internal NAND flash of your board to the SD card, so that it is used when booting from the card.

As the root user, do the following:

cp /boot/script.bin /boot/script.bak
mkdir /mnt/nanda
mount /dev/nanda /mnt/nanda
cp /mnt/nanda/script.bin /boot/
umount /dev/nanda
sync
reboot

Note that if you have any separately powered USB devices connected (e.g. a hub), a reboot may not work correctly, so you may have to unplug cables from the device and plug them back in to get it to reboot.

If after a reboot the SD image no longer boots, you can move the SD card to some other computer, mount its first partition and restore script.bak by renaming it back to script.bin.

8. Optional: Switch to a root FS on an USB or SATA HDD/SSD

Next steps

I suppose you are somewhat familiar with installing Debian systems, so this won't be anything new for you. Some reminders/ideas on what you might want to do next:

  • passwd to change your root password;
  • apt-get update
  • aptitude dist-upgrade
  • Run dpkg-reconfigure locales to set your locale;
  • Run dpkg-reconfigure tzdata to select your timezone;

Send feedback!

I would love to know what you feel is lacking in the provided image or in this installation instruction.

Also it would be very useful if you could find time to simply send in a brief message: “This worked for me on a [such and such model of A10 device with this model of USB Ethernet NIC]”. Of course by all means feel free to contact me in case this all did not work for you (also with a brief description of your hardware).

Thanks.

See also


a10/debian.txt · Last modified: 2018-05-20 13:46 UTC by rm