Arietta G25 with Debian 8 (jessie)

Inspired through the Raspberry Pi I searched for an embedded Linux device with a very low power consumption which can work many hours with a LiPoly battery.
The best solution for I found was a small module called „Arietta G25“ from acmesystems in Italy.

Based on many tutorials on their website I tried to build my own System based on Debian 8 with a few enhancements. These are:

  • WIFI
  • Python3 Development Environment
  • Support for small TFT Display with resistive Touchscreen
  • OneWire (Master)
  • I2C (Master)
  • ADC (for Touchscreen
  • PWM Support

My solution has been build on Ubuntu 15.04 and is my first approach to build my own embedded system.

All published code is case sensitive!

Start

I assume that you are using a fresh installed Ubuntu 15.04 distribution.

To build your own embedded system you need at first a few packages to compile your bootloader and Kernel. Furthermore you need  a tool to build your customized Debian distribution.

sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi multistrap qemu qemu-user-static binfmt-support dpkg-cross

Bootloader

After installing the required dependencies we will start to compile our Bootloader.

The Booltloader is under development by Sergio Tanzilli from acmesystems, so be sure that you always download the latest version from Github.

git clone git://github.com/tanzilli/at91bootstrap.git
cd at91bootstrap

Based on the Arietta Board you bought, you’ll have to define the memory of the board. I bought a 256MB module, so I have to choose arietta-256m_defconfig.

make arietta-256m_defconfig

If this process is finished without any errors you can compile the Bootloader with the following command:

make CROSS_COMPILE=arm-linux-gnueabi-

Compiling the Bootloader should take only a few seconds to be finished. Insert a freshly prepared Micro-SD Card in your PC (as described here) and copy the boot.bin into the Boot Partition of your SD Card.

cp binaries/at91sam9x5_arietta-sdcardboot-linux-zimage-dt-3.7.bin /media/$USER/KERNEL/boot.bin

Check if it’s copied correctly onto your SD Card. Now you can leave the directory an we can move forward to compile our own Linux Kernel.

cd ..

Kernel

To build your own Kernel, with the additions I wrote at the beginning of my article, we need first download the Kernel we wanna use from kernel.org and uncompress it to our Home-Directory.  

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.20.tar.xz
tar xvfJ linux-3.18.20.tar.xz
cd linux-3.18.20

 

To be continued….

 

For the people who can’t wait, here’s the full file:

Feel free to download the configuration files….

sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi multistrap qemu qemu-user-static binfmt-support dpkg-cross

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

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.20.tar.xz
tar xvfJ linux-3.18.20.tar.xz
cd linux-3.18.20
cd drivers/video
git clone https://github.com/notro/fbtft.git
# Add to drivers/video/Kconfig this line: source "drivers/video/fbtft/Kconfig"
# Add to drivers/video/Makefile this line: obj-y += fbtft/
# Place the attached file 'acme-arietta_defconfig' in ./arc/arm/configs/
cd ../..
# Enable 'CGROUPS': http://cgit.freedesktop.org/systemd/systemd/tree/README
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-arietta_defconfig
# Place the attached file 'acme-arietta.dts' in ./arch/arm/boot/dts/
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-arietta.dtb
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage
make modules -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
make modules_install INSTALL_MOD_PATH=./modules ARCH=arm
cp arch/arm/boot/dts/acme-arietta.dtb /media/$USER/KERNEL/
cp arch/arm/boot/zImage /media/$USER/KERNEL/
cd ..

mkdir multistrap
cd multistrap
# Place the attached file 'multistrap_arietta.conf' in ./multistrap/
sudo multistrap -a armel -f multistrap_arietta.conf
sudo cp /usr/bin/qemu-arm-static target-rootfs/usr/bin
sudo mount -o bind /dev/ target-rootfs/dev/
sudo LC_ALL=C LANGUAGE=C LANG=C chroot target-rootfs dpkg --configure -a
# Answer the question about the default system shell with 'no'
# Place the attached file 'arietta.sh' in ./multistrap/
chmod +x arietta.sh
# Modify the parameters for your WIFI connection (SSID and PSK) within the file
sudo ./arietta.sh
sudo chroot target-rootfs passwd
sudo rm target-rootfs/usr/bin/qemu-arm-static
sudo rsync -axHAX --progress target-rootfs/ /media/$USER/rootfs/
sudo rsync -avc linux-3.18.20/modules/lib/. /media/$USER/rootfs/lib/.
cd ..

### After first boot
depmod --all
locale-gen en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *


*

Go to Top