/
Baf modules

Baf modules

Each Userapp can constist of several modules. These modules have a certain filesystem layout and thus they hook into the apps system.

Modules can be cross compiled via the baf tool, they can also be downloaded and installed from our webserver.

Free modules to be downloaded

baf is the tool to list, search or download modules.

baf help module

shows the module specific commands.

 

To list all available modules you can use:

baf module list

To install a module you can use:

baf module install asterisk-bin

 

Asterisk-Bin

Precompiled Asterisk (currently Version 1.8.3).

T38modem

T38modem Binary. It connects via SIP to either asterisk or isgw and provides a modem interface, which can be used by applications like efax or hylafax.

efax

efax binaries. A very simple fax sender and receiver tool.

hylafax

Hylafax libs and binaries. A very advanced Faxserver.

Create your own module

baf provides the complete cross compile toolchain to compile your own program for your userapp.

The path of the gcc toolchain can be found in the baf installation directory:

$(INSTALLPREFIX)/baf/toolchain/bin/

INSTALLPREFIX is by default /usr/local/share

The gcc compiler tools are prefixed with

arm-linux-

for example gcc and ar are then:

arm-linux-gcc arm-linux-ar

make sure to have $(INSTALLPREFIX/baf/toolchain/bin) in your path:

PATH=$(INSTALLPREFIX)/baf/toolchain/bin:$PATH

 

Hello World binary for berofix

Let's say you want to compile hello-world for berofix, you can do:

echo -ne "#include <stdio.h>\nint main()\n {\n printf(\"Hello World\\\n\");\n }\n" > /tmp/hello-world.c arm-linux-gcc /tmp/hello-world.c -o /tmp/hello-world

Now you can check the type of your newly created binary:

file /tmp/hello-world

It should print out something like:

/tmp/hello-world: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

This program can now be copied to berofix and can be executed there. It can also be put into an apps "bin" directory, be packaged and later be executed in the berofix system.

Related content

If you need scheduled remote assistance, you can request our on-demand support services: https://www.beronet.com/support