JHBuild is a tool used at gnome.org and freedesktop.org to allow developers to easily setup a development environment. SynCE uses JHBuild to automatically download and compile all packages from SynCE and OpenSync SVN. It installs to any folder you like so you don't have to install to /usr or even /usr/local.

These notes will create a folder called sync in your home folder to hold everything. Feel free to tweak the environment to suit your own needs.

Install JHBuild

mkdir ~/sync
cd ~/sync
svn co http://svn.gnome.org/svn/jhbuild/trunk jhbuild
(cd jhbuild && make -f Makefile.plain install)
mkdir build install checkout

Configure JHBuild

Create a .jhbuildrc file in your home directory and make it like this:

moduleset = 'http://synce.svn.sf.net/svnroot/synce/dist/jhbuild/synce.modules'
checkoutroot = os.path.expanduser('~/sync/checkout')
prefix = os.path.expanduser('~/sync/install')
buildroot = os.path.expanduser('~/sync/build')
addpath('PKG_CONFIG_PATH', os.path.join(prefix, 'lib', 'pkgconfig'))
addpath('PKG_CONFIG_PATH', os.path.join(prefix, 'share', 'pkgconfig'))
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib', 'pkgconfig'))
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig'))
os.environ['INSTALL'] = os.path.expanduser('~/bin/install-check')
os.environ['LD_LIBRARY_PATH'] = os.path.expanduser('~/sync/install/lib')

Install the usb-rndis-lite kernel module

To actually connect to your device, an updated kernel module must be installed. The following description assumes you will download the kernel module to ~/sync/usb-rndis-lite, change to your likings.

Important Note: you must have your Kernel Headers installed and you must have CONFIG_USB_NET_CDCETHER either compiled into your kernel or as a module in your kernel config. (You can find this option in Device Drivers -> USB support -> USB Gadget support -> Ethernet Gadget

When you are sure the above is correct for your current kernel, run the following:

cd ~/sync
svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
cd usb-rndis-lite/
make
su
(enter root password)
./clean.sh
make install
exit

You can now check whether the new modules works by checking your /var/log/messages while connecting your phone. You should see something like:

Dec 30 12:10:38 cartman kernel: usb 2-1: new full speed USB device using uhci_hcd and address 80
Dec 30 12:10:39 cartman kernel: usb 2-1: configuration #1 chosen from 1 choice
Dec 30 12:10:40 cartman kernel: rndis0: register 'rndis_host' at usb-0000:00:0a.1-1, RNDIS device, 80:00:60:0f:e8:00

If you see messages about ipaq, remove the module with

rmmod ipaq

and blacklist the ipaq module so it won't be loaded anymore next time you plugin your phone.

Install SynCE and OpenSync

This will download, build and install (into ~/sync/install) everything for you:

~/bin/jhbuild build opensync-plugin-evolution2 opensync-plugin-synce msynctool

Feel free to use opensync-plugin-kdepim

Installing system wide dbus file of odccm

Since odccm will act as a service on dbus, it must be authorized to do so. This is done as follows:

cd ~/sync
su
(enter root password)
cp checkout/odccm/src/odccm.conf  /etc/dbus-1/system.d/
exit

Trying it out

To see if things actually are working, open a terminal and type in the following:

cd ~/sync/install/sbin
su
(enter root password)
./odccm -f

Now plugin your phone and you should see messages in this terminal showing that odccm recognized the device.

In another terminal type in the following:

~/bin/jhbuild shell

This will make sure that all needed environment variables will be set to correct values.

After this you can type:

pls

and you should see a directory listing from your phone.

FIXME

JonnyLamb/JhBuild (last edited 2008-01-08 19:07:07 by JonnyLamb)