Arduino 0018 on Gentoo amd64

Hello,

I'd thought I would post the notes on how I installed the Arduino software on my Gentoo amd64 system. I followed the instructions on the Arduino web pages but found some slight deviations in my installation.

cheers,
Anthony

Note that I use my own plain Sun JDK java installation (so no java packages from gentoo).

Arduino setup on Gentoo amd64

Part of "emerge --info"

Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 x86_64)

System uname: Linux-2.6.34-gentoo-r1-x86_64-AMD_Turion-tm_64_X2_Mobile_Technology_TL-60-with-gentoo-1.12.13
Timestamp of tree: Wed, 18 Aug 2010 16:45:02 +0000
app-shells/bash: 4.0_p37
dev-lang/python: 2.5.4-r3, 2.6.5-r3, 3.1.2-r4
dev-util/cmake: 2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.65
sys-devel/automake: 1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6b
virtual/os-headers: 2.6.30-r1

Instructions below based on Arduino web-site and my own mucking about.

Make sure the following is enabled in the kernel in order to talk to the Arduino board:

Device Drivers --->
USB Support --->
USB Serial Converter Support --->
USB FTDI Single Port Serial Driver

Building into the kernel is also an option.

rxtx

This is needed for java to talk to a serial port.

I installed rxtx-2.2pre2 from source. It requires the presence of the following line in /usr/include/linux/version.h

#define UTS_RELEASE "2.6.34-gentoo-r1"

The last string is the kernel version which can be obtained from 'uname -a'. Note that using this in version.h is not recommended, but it does allow the compilation of rxtx.

The jar is in $JAVA_HOME/jre/lib/ext/ and should be added to CLASSPATH

The libraries are in $JAVA_HOME/jre/lib/amd64 and should be added to
LD_LIBRARY_PATH

Gentoo packages to emerge

crossdev
avrdude

Toolchain from crossdev

Ensure that the file /etc/make.conf has the following line:

PORTDIR_OVERLAY="/usr/local/portage"

If this directory does not exist yet:

mkdir -pv /usr/local/portage

USE='-openmp' crossdev -t avr -s4 -S --g 4.3.4 --without-headers

NOTE: this does not work for me without the -openmp USE keyword. The version of gcc (--g) does not seem to be necessary. Leaving this option out also worked, which in my case would led to using gcc-4.4.4-r1 (17.08.2010).

ln -s /usr/lib64/binutils/avr/2.20.1/ldscripts /usr/avr/lib/ldscripts

Arduino itself

obtain arduino-0018.tgz

unpack

In the lib folder remove librxtxSerial.so and RXTXcomm.jar and symlink to the ones in the JAVA_HOME

In the hardware/tools/ folder remove avrdude and replace with symlink to /usr/bin/avrdude

Add the user to the uucp group

DONE!