The Aria G25 is a nice embedded board, ideal to tinker with it, see http://www.acmesystems.it/aria.
The Terra as motherboard for the Aria is perfect for prototyping. This page is about how to set up a minimal Linux system on it.
There is already a lot of information on the vendors page about the topic (see http://www.acmesystems.it/developers) this page describes how to install Linux/RootFS/Busybox on the board.
The easiest way on Ubuntu (or derivatives) is to install the toolchain using apt-get
:
$ sudo apt-get install gcc-arm-linux-gnueabi
$ sudo apt-get install g++-arm-linux-gnueabi
$ sudo apt-get install binutils-arm-linux-gnueabi
On the microSD card, the first partition must be FAT (FAT16 works), a second partition is advised for the rootfs. Finally a third to store data. I am using a 4GB microSD with the following partition table. Use the command:
to get the output:
Disk /dev/sdi: 3957 MB, 3957325824 bytes
16 heads, 32 sectors/track, 15096 cylinders, total 7729152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdi1 * 2048 67583 32768 6 FAT16
/dev/sdi2 67584 2164735 1048576 83 Linux
/dev/sdi3 2164736 7729151 2782208 83 Linux
Note: the device /dev/sdi
may have another designation for you, check dmesg
.
Format the file systems. ext3
may not be the best choice for embedded systems, feel free to use others. If you do, don’t forget to alter the kernel configuration to support other filesystems.
$ sudo mkfs.vfat -F 16 -n kernel /dev/sdi1
$ sudo mkfs.ext3 -L rootfs /dev/sdi2
$ sudo mkfs.ext3 -L home /dev/sdi3
Probably not necessary but useful, filesystem checks:
Now mount all of them (easiest way: remove and plug the microSD card back into the card writer).
As described here you can build the bootloader from source. Or take the precompiled version (for the 256MB Aria G25) from here: ariaboot-256.tar.gz (you might want to change the MAC address in macaddr.txt
).
Unpack and copy them to the FAT partition of the microSD card (you probably must use sudo):
(see also http://www.acmesystems.it/ariag25_compile_linux_2_6_39)
Download the necessary packages:
http://www.acmesystems.it/www/ariag25_compile_linux_2_6_39/ariag25.config.tar.gz
with minor changes: no NTFS, less modules/more monolithic): linux-2.6.39-config-ariag25.tar.gzUnpack the kernel:
Unpack and apply the patch (in the extracted linux-2.6.39
directory):
Unpack the kernel configuration (a .config
file):
Build the kernel:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
Modules are not necessary for this installation.
Copy the built kernel to the first partition:
Prepare the root file system (mounted at /media/rootfs
):
$ cd /media/rootfs
$ sudo mkdir -p proc sys boot dev lib home var tmp dev etc etc/init.d
$ sudo cp -rap /usr/arm-linux-gnueabi/lib/*.so.* /media/rootfs/lib
$ cd dev
$ sudo mknod console c 5 1
$ sudo mknod null c 1 3
$ sudo mknod tty c 5 0
$ sudo mknod tty1 c 4 1
$ sudo mknod tty2 c 4 2
$ sudo mknod tty3 c 4 3
$ sudo mknod tty4 c 4 4
$ sudo mknod ttyS0 c 253 0
$ sudo mknod ttyS1 c 253 1
$ sudo mknod ttyS2 c 253 2
$ sudo mknod ttyS3 c 253 3
$ sudo chmod 777 *
Download the necessary packages:
Unpack the tarball:
Configure and build it:
$ cd busybox-1.21.0
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
Install it on the microSD card:
null::sysinit:/bin/busybox hostname -F /etc/hostname
::sysinit:/etc/init.d/rcS
::ctrlaltdel:/bin/umount -a -r
::respawn:/sbin/getty 115200 console
aria
root::0:0:root:/root:/bin/sh
root:x:0:
users:x:1000:
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
debugfs /sys/kernel/debug debugfs noauto,defaults 0 0
none /var tmpfs rw,noexec 0 0
none /tmp tmpfs rw 0 0
none /dev/shm tmpfs defaults 0 0
/dev/mmcblk0p1 /boot vfat ro,noauto,defaults 0 0
/dev/mmcblk0p3 /home ext3 defaults 0 0
# /etc/profile
alias remountro='/bin/mount -o remount,ro,noatime /dev/root /'
alias remountrw='/bin/mount -o remount,rw,noatime /dev/root /'
alias l='ls -l'
#!/bin/sh
# filesystems
/bin/mount -t proc none /proc
/bin/mount -t sysfs none /sys
/bin/mount /var
if [ ! -d /var/log ] ; then
/bin/mkdir -m 0755 /var/log
fi
if [ ! -d /dev/pts ] ; then
/bin/mkdir -m 0755 /dev/pts
fi
if [ ! -d /dev/shm ] ; then
/bin/mkdir -m 0755 /dev/shm
fi
/bin/mount -a
# scan sys and populate dev
/sbin/mdev -s
# syslog
/sbin/syslogd -S -D -O /var/log/messages
# configure network
/sbin/ifconfig lo up
/sbin/ifconfig eth0 192.168.1.10
# cleanup
/bin/mount -o remount,ro,noatime /dev/root /