Debian

From Low cost, low power, android ARM system board by Mini-Box.com - pico WiKi
Jump to: navigation, search

Contents

Prep

1. Get two SD cards (A USB drive should also work with the Angstrom kernel, I haven't tested)
2. Install the precompiled Angstrom image on to one of the SD cards and insert it into the MicroSD slot
3. Format the other SD card (Or USB drive) with mkfs.ext3

Creating a Debian environment

This stage creates your Debian root fs.

On your Debian machine

1. use the command:

apt-get install debootstrap

2. then

debootstrap --arch=armel --foreign [stable|testing|unstable] <targetdirectory>

3. Copy the resulting chroot directory to your empty SD card

On your Pico board

4. Mount the SD card in the reader slot on the pico board (The card should be auto mounted to /media/mmcblk1p1)
5. then type:

chroot /path/to/chrootdir

6. then

/debootstrap/debootstrap --second-stage

You should install any apps you might need to access the board, and do any configuration.
I couldn't get the serial console to work at this point so I installed openssh-server and configured my network and users so that when I booted Debian for the first time I could ssh into it.

Building a new kernel

Debian doesn't include a kernel that's workable so you will need to build your own (the pre-compiled image I think will work with squeeze, but I haven't tried). I suggest compiling 3.1rc? if you want to run testing or unstable. 3.0.4 has issues in the atmel-mci driver and 3.1rc? should get some new features soon like a driver for the hardware random number generator.

Required Packages

Patched Kernel

You can find a mini-box.com pre-patched 3.x kernel tree here.

Daniel Palmer keeps a "bleeding edge" 3.x version here.

Switching rootfs

1. using fdisk or similar remove the root partition from Angstrom and create a new root partition with the size you want.
2. format it with mkfs.ext3
3. copy the debian chroot into the new root partition

You should be ready to boot into Debian now :)


Post install configuration

Fix up /etc/fstab

debootstrap creates an empty fstab. You can boot with this but you should configure it at some point. The example below defines root and mounts the bootloader/kernel partition to /boot for easy kernel upgrades.

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mmcblk0p2  /               ext3    defaults        0       0
/dev/mmcblk0p1  /boot/          vfat    defaults        0       0

Disable LCD backlight

If you don't have an LCD you should turn the backlight off. Add this to your /etc/rc.local

echo 0 > /sys/class/backlight/backlight/brightness

Fix MAC address

The board doesn't seem to have anywhere to store it's MAC address so the kernel generates a bogus one on boot up.. this causes issues if you want to have fixed IP allocations over DHCP etc. You can fix this by configuring a MAC address for the interface by inserting something like the following in your /etc/network/interfaces file;

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:04:14:C0:FF:EE

MAC addresses need to be unique on your network!

Fix/add loopback device

You should add a loopback device. Some server daemons that need to bind to the loopback device will fail to install or start (such as mysql). You can fix this by configuring a loopback device by inserting something like the following in your /etc/network/interfaces file;

auto lo
iface lo inet loopback

Serial Console

Enabling a serial console is easy and will allow you to login via one of the UARTs. I have used ttyS0 (RXD0 and TXD0) on J7. The other UART should also work but I haven't checked. A serial console on ttyS0 can be enabled by finding the line that starts with #T0:23.. in your /etc/inittab, un-commenting it and if you want changing the baud rate.

Mine looks like this;

S0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
Personal tools
Namespaces
Variants
Actions
Toolbox