This document shows how to cross-compile bluez for an arm-processor on an i686 processor. It can be used as starting point if you have to cross-compile bluez yourself. date/version: 01 Feb. 2005, v0.1.1 author: Marco Trudel If you need help, please use the bluez-user list. ------------------------------------------------------------ This document assumes you have the toolchain installed in /usr/local/arm. Version 2.95.3 is used in this description. That means a directory called "/usr/local/arm/2.95.3/arm-linux" exists. Bluez will be installed into /opt/bluez (feel free to choose another location). Ensure that the crosscompile binaries are in $PATH. For example, do: export PATH="$PATH:/usr/local/arm/2.95.3/bin" ########## 1. compile bluez-libs ########## - extract bluez-libs and change into the directory - configure the makefiles for cross-compiling. run: ./configure --build=i686-pc-linux-gnu \ --host=arm-linux \ --sysconfdir=/opt/bluez/etc \ --prefix=/opt/bluez - Check the output. Some interesting lines: checking for arm-linux-gcc... arm-linux-gcc checking whether the C compiler works... yes checking whether we are cross compiling... yes - Explanation of the switches: --build the build platform --host the target platform --sysconfdir where bluez will expect etc (feel free to use /etc) --prefix where bluez will be installed to - run "make", "make install" ########## 2. compile bluez-utils ########## - extract bluez-utils and change into the directory - configure the makefiles for cross-compiling. run: ./configure --build=i686-pc-linux-gnu \ --host=arm-linux \ --sysconfdir=/opt/bluez/etc \ --prefix=/opt/bluez \ LDFLAGS=-L/opt/bluez/lib - run "make" and "make install" ######### 3. final steps, tests ########## Please note: This mini-howto assumes you have a bluetooth enabled kernel. If you haven't already, install it now. Depending on your setup, you might be interested in every kb of diskspace to save. With -s stripping and removing of unnecessary files, it's possible to save ~350kb... - copy /opt/bluez to your target platform. - add "/opt/bluez/lib" to /etc/ld.so.conf and, run "ldconfig" - run "./hcid -n" in /opt/bluez/sbin Check the output. If everything works well, abort hcid and start it withhout "-n". - "/opt/bluez/bin/hcitool dev" should show you your devices - "/opt/bluez/bin/hcitool scan" perform an inquiry scan