Aiccu/InstallingOnChumbyOne

From SixXS Wiki
Jump to: navigation, search

Introduction

The Chumby One is a media device that executes applications developed in Adobe Flash ™ These are hosted in the “Chumby Store” and downloaded into the device after these are registered. However, this particular device, the Chumby One, is already Ipv6 enabled in which it made me wonder. Can it be used as a router through aiccu?

Why the Chumby One?

Well, mostly because I purchased it as a clock, so it currently consumes power and cycles to tell me the time and the weather. However, the device provides means to access directly the Linux operating environment through a secure shell and there are available a gcc compiler toolchain for the device. Being that Chumby One's kernel already has IPv6 support, it is just a matter of compiling aiccu and its dependencies. This enables the device to function as dedicated IPv6 router in addition to waking me up in the morning with a bugle.

Ingredients

Before we start, I have to place the customary warning that performing this operation will void the warranty on the device. However, if you are familiar with Linux/Unix systems, the task itself is not daunting, however, the only way to go for the Chumby is compiling all the components from soup to nuts. Bear in mind that I only tested with a Chumby One that had the following release level: Linux Chubby 2.6.28-chumby #1 PREEMPT Fri Nov 5 18:24:54 PDT 2010 armv5tejl GNU/Linux . It would certainly help to have C, PERL and C++ experience for troubleshooting compilation issues.

Ingredient List

  • Enable sshd and log in as root with the instructions listed in http://wiki.chumby.com/index.php/Chumby_tricks
  • Obtain the chumby GCC tool chain. It can be obtained as described in the Chumby wiki (http://wiki.chumby.com). However, in my case I typed gcc and it asked me “if I wanted to download the toolchain”; type yes and it installs it for you.
  • Create a directory in /mnt/storage/local in which all the software will reside. /mnt/storage/local is the read/write partition in the Chumby. It has about 500 Megabytes of space, plenty for aiccu.
  • Download the following software. You can download it in a computer and transfer it using an USB drive or you can use wget to get it directly (I used the later on my installation). Copy everything under /mnt/storage
   # cd /mnt/storage
   # wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.9.tar.gz
   # wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.gz
   # wget ftp://ftp.gnupg.org/gcrypt/gnutls/gnutls-2.6.6.tar.bz2 
 
  • And of course, download the aiccu source code from sixxs.

Procedure

Compiling libpgp-errors

Compiling libpgp-errors follows the ./configure, make, make install process

# cd /mnt/storage
# tar zxvf libgpg-error-1.9.tar.gz
# cd libgpg-error-1.9
# ./configure –prefix=/mnt/storage/local; make; make install-strip
 

Compiling libgcrypt

Compiling libpgcrypt also follows the ./configure, make, make install process

# cd /mnt/storage
# tar zxvf libgcrypt-1.5.0.tar.gz
# cd libgcrypt-1.5.0
# ./configure –prefix=/mnt/storage/local 
  --with-gpg-error-prefix=/mnt/storage/local; make; make install-strip

 

Compiling GNU TLS

Compiling GNU TLS also follows the ./configure, make, make install process

# cd /mnt/storage
# tar jxvf gnutls-2.6.6.tar.bz2
# cd gnutls-2.6.6
# ./configure –prefix=/mnt/storage/local 
  --with-libgcrypt-prefix=/mnt/storage/local; make; make install-strip

 

Compiling AICCU

Compiling AICCU is already documented in http://www.sixxs.net/wiki/Aiccu/Installation#Compiling_from_Source. The process is the same with the following changes.

After doing the “make clean” do the following changes

# cd to aiccu/unix-console
# vi Makefile
 

Search for “CFLAGS=”; add the following at the end of the line “-I /mnt/storage/local/include -L/mnt/storage/local/lib” and save.

# cd ..
# vi Makefile
 
  • Search for “DESTDIR=” and change it to “DESTDIR=/mnt/storage/local” and save.
# make install 
 

Everything should install in /mnt/storage/local, aiccu will end up in /mnt/storage/local/bin. However aiccu expects to have the conf file in /etc, therefore aiccu must always be called with the aiccu file parameter.

I prefer to install the aiccu in /mnt/storage/local/etc, you can copy the sample file that is in aiccu/doc/aiccu.conf into /mnt/storage/etc and configure it according to http://www.sixxs.net/wiki/Aiccu/Installation#Compiling_from_Source

Being that the ssh lets you log as root; starting aiccu is a matter of logging in as root and type

/mnt/local/storage/bin start /mnt/local/storage/etc/aiccu.conf
 

Caveats, Warnings, and other Nasty Things

  • As mentioned, doing this is not supported by Chumby and will void your warranty.
  • The Chumby does not, does not, does not, does not put a password on root and or default (the user account). Being that IPv6 does not have NAT, leaving it without a password may tempt univited guests to do a rm -rf / ; reboot causing you to be late to work. Be safe, before running aiccu secure all accounts. The procedure to add a password is as follows
    • mount / -o remount,rw,noatime
      • This mounts in read write mode
    • passwd root
      • This will ask for a new password. Make sure you remember it. The only way to recover is erasing the Chumby and installing the OS from scratch.
    • passwd default
      • This will ask for a new password on user default. Make sure that you remember it.
    • mount / -o remount,ro
      • This mounts back in read only mode

Closing Remarks

Well, How does it look like?

Chubby:~ $ uname -an

Linux Chubby 2.6.28-chumby #1 PREEMPT Fri Nov 5 18:24:54 PDT 2010 armv5tejl GNU/Linux

Chubby:~ $ ps -e | grep aiccu

14446 root 0:13 aiccu start /mnt/storage/local/etc/aiccu.conf

32631 papo 0:00 grep aiccu

Chubby:~ $ ifconfig sixxs

sixxs Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 

inet6 addr: 2001:DB8::::2/64 Scope:Global

inet6 addr: fe80:DB8::::2/64 Scope:Link

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1280 Metric:1

RX packets:6872 errors:0 dropped:0 overruns:0 frame:0

TX packets:6562 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:500 

RX bytes:2245399 (2.1 MiB) TX bytes:577766 (564.2 KiB)


 

The address was changed to protect the innocent but going into my IPv6 address w​​ill show you the Chumby status page, and a blue octopus staring back at you.


Other remarks

I did compiled radvd 1.8.1 and configured it. However for some reason it is not broadcasting the whole prefix according to the iPod Touch IPv6 tools. I compiled and installed version 1.7 of radvd and it works fine. I am currently routing through the Chumby with automated configuration.