The OpenBinder package includes a build system that can be used for compiling the source code, running tests, and generating the documentation. While the basic source code has over time run on a variety of platforms (including BeOS, Windows, and PalmOS Cobalt), this package only supports building for Linux.
The source code has been tested against GCC 3.3.5. Other versions of GCC may cause problems. It also requires flex 2.5.31 and bison 1.875d.
The Binder kernel module has been tested against Linux kernels 2.6.10 and 2.6.12. Earlier kernels are not supported. The kernel module is only required for multi-process functionality; the user-space code will operate without it being present, though without the ability to communicate between processes.
Building the documentation from source requires the Doxygen tool, available at http://www.doxygen.org/.
$ tar -xzf openbinder-0.8.tar.gz $ cd openbinder-0.8 $ make
This will proceed to build the pidgen tool (the Binder's IDL compiler), compile the interfaces, build the Binder shared library (libbinder.so), and then build the Binder packages that are included.
Assuming there are no errors, you can use the "test" target to run some tests in the Binder system:
$ make test
You can also use the "runshell" target to run the Binder Shell, an interactive command line shell that lets you interact with the Binder system:
$ make runshell ... /# ls contexts/ packages/ processes/ services/ who_am_i /# c=$[new org.openbinder.tools.commands.BPerf] Result: sptr<IBinder>(0x80967d4 17BinderPerformance) /# inspect $c Result: "org.openbinder.app.ICommand" -> sptr<IBinder>(0x80967d4 17BinderPerformance)
See Binder Shell Tutorial for more information on the Binder Shell. Use the "make help" target for a brief summary of the features available in the build system.
To build the kernel module, you will need to have built your kernel so that its headers are available. If that has been done, then you should be able to use the "loadmodules" target to compile the Binder kernel module and install it on your system:
$ make loadmodules ... Loading Binder module... You may need to enter your password ERROR: Module binderdev does not exist in /proc/modules sudo insmod /home/hackbod/lsrc/open-source/openbinder/main/dist/modules/binder/binderdev.ko Binder module successfully intalled.
After this has been completed, you can again run the "test" and "runshell" targets, and now you will be running these in a multiprocess environment:
$ make runshell ... /# p=$[new_process my_process] Result: IBinder::shnd(0x2) /# c=$[new -r $p org.openbinder.tools.commands.BPerf] Result: IBinder::shnd(0x3)
$ make docs
The documentation will be generated into the directory build/docs/...