Arietta G25

Table of Contents

1 Bootloader

http://www.acmesystems.it/compile_at91bootstrap

git clone git://github.com/tanzilli/at91bootstrap.git
cd at91bootstrap
make arietta-128m_defconfig
# make arietta-256m_defconfig
make menuconfig
make CROSS_COMPILE=arm-linux-gnueabi-
cp binaries/at91sam9x5_arietta-sdcardboot-linux-zimage-dt-3.7.bin boot.bin

2 Kernel

http://www.acmesystems.it/compile_linux_3_16

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.1.tar.xz
wget http://www.acmesystems.it/www/compile_linux_3_16/acme.patch
tar xvfJ linux-3.16.1.tar.xz
cd linux-3.16.1
patch -p1 < ../acme.patch
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-arietta_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-arietta.dtb
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage
make INSTALL_MOD_PATH=./modules ARCH=arm modules_install

depmod -a

3 Debian

3.1 Rootfs

[General]
noauth=true
unpack=true
cleanup=true
arch=armel
directory=
debootstrap=Base Tools Firmwares Networking
aptsources=Debian

[Base]
packages=kmod udev locales apt aptitude ntp
keyring=debian-archive-keyring
source=http://http.debian.net/debian
suite=stable

[Tools]
packages=usbutils rsync less screen vim i2c-tools wget curl
keyring=debian-archive-keyring
source=http://http.debian.net/debian
suite=stable

[Firmwares]
packages=firmware-ralink
keyring=debian-archive-keyring
source=http://http.debian.net/debian
suite=stable
components=non-free

[Networking]
packages=ssh net-tools wireless-tools iw iputils-ping ifupdown isc-dhcp-client wpasupplicant
keyring=debian-archive-keyring
source=http://http.debian.net/debian
suite=stable
[ -z "$1" ] && exit 1
set +e
multistrap -f rootfs.conf --dir $1/

We statically create some devices in /dev.

(cd $1/dev; MAKEDEV generic)
cp /usr/bin/qemu-arm-static $1/usr/bin
cp secondstage.sh $1/
rsync -aP ~olivier/ariettaG25/Unpack-0236/lib/modules $1/lib/
echo "You should now launch 'sh /secondstage.sh' in the chroot"
chroot $1/ /bin/sh
cat rootfs-interfaces  >$1/etc/network/interfaces
cat rootfs-inittab    >>$1/etc/inittab
cat rootfs-fstab       >$1/etc/fstab
echo arietta           >$1/etc/hostname
echo g_ether           >$1/etc/modules
echo deb     http://http.debian.net/debian stable main non-free contrib  >$1/etc/apt/sources.list
echo deb-src http://http.debian.net/debian stable main non-free contrib >>$1/etc/apt/sources.list

Simply launch sh /secondstage.sh inside of the chroot, it will do the following.

dpkg --configure -a
dpkg --configure -a
depmod 3.16.1+
passwd
echo "You can now exit the chroot with 'exit'."
rm /secondstage.sh

3.2 Filesystems

/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p2 /     ext4 defaults 0 0
/dev/mmcblk0p3 /home ext4 defaults 0 0
/dev/mmcblk0p4 none  swap sw       0 0

3.3 Network

3.3.1 USB Networking

auto usb0
iface usb0 inet static
  address 192.168.10.10
  netmask 255.255.255.0
  gateway 192.168.10.20

3.3.2 Wireless

auto wlan0
iface wlan0 inet dhcp
   wpa-ssid bumeu
   wpa-psk 2BFCzSqNTP9LriwhPnEvNlhJGGfMVWAn9kE2g2fFkUgnjdmh

3.4 Serial console

T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100

Author: Olivier Schwander

Created: 2014-11-18 mar. 21:14

Emacs 24.4.1 (Org mode 8.2.3c)

Validate