The following is my last two days' experience of using bluz-4.18 on arm-xscale.
I did it with 完颜 TX.
mkdir -p /nfsroot/arm-xscale-linux-gnu/steven_root/ <= It is the root file system of my arm-xscale board.
export PKG_CONFIG_LIBDIR/nfsroot/arm-xscale-linux-gnu/steven_root/lib/pkgconfig <= It is to configue my cross compile pkg-config.
pkg-config --list-all
** bluez-4.18 is based on dbus and glib and dbus is based on expat (a xml paser lib), so we must cross compile expat, dbus and glib first.
1.cross compile expat-2.0.1
./configure --host=arm-xscale-linux-gnu --prefix=/nfsroot/arm-xscale-linux-gnu/steven_root/
make & make install
2.cross compile dbus-1.0.3 (* Here we first use verion 1.0.3, but we found this verion is too low to compile dbus-gib.0.78 )
echo ac_cv_have_abstract_sockets=yes>arm-linux.cache
./configure --host=arm-xscale-linux-gnu --cache-file=arm-linux.cache --with-xml=libxml/expat --with-x=no --prefix=/nfsroot/arm-xscale-linux-gnu/steven_root/
make & make install
3.corss compile glib-2.18
echo ac_cv_type_long_long=yes>arm-linux.cache
echo glib_cv_stack_grows=no>>arm-linux.cache
echo glib_cv_uscore=no>>arm-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux.cache
echo ac_cv_func_posix_getgrgid_r=yes>>arm-linux.cache
./configure --host=arm-xscale-linux-gnu --cache-file=arm-linux.cache --prefix=/nfsroot/arm-xscale-linux-gnu/steven_root/
make
* It fails to cross compile the "gio", so we have to do some modification to the gio/Makefile.
* At line1252 and 1257, I deleted word "--internal".
make & make install
4.cross compile bluez-4.18
./configure --host=arm-xscale-linux-gnu --prefix=/nfsroot/arm-xscale-linux-gnu/steven_root/ --disable-audio --enable-test
make & make install
5. How to run bluz-4.18 on arm-xscale
#insmod bluetooth.ko
#insmod hci_uart.ko
#insmod l2cap.ko
#insmod rfcomm.ko
#/bin/busybox adduser messagebus <<- 板子自带的busybox中无 adduser 命令, 这个busybox是我自己交叉编译的.
#/bin/busybox adduser passwd
#dbus-daemon --system
#bluetoothd.
#hciattach -s 115200 ttyS1 bcsp 115200
#hciconfig hci0 reset
#hciconfig -a
#hcitool scan
To be added those steps using obex functions.