Tags:
create new tag
, view all tags

Compilation of the OpenAirInterface kernel modules

Prerequisites

Before compiling you need to set OPENAIRx_DIR to the root directory of openairx:

set OPENAIR_HOME variable and export the following:
export OPENAIR1_DIR=$OPENAIR_HOME/openair1
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
export OPENAIR_TARGETS=$OPENAIR_HOME/targets/

You sould also set the following paths

export PATH=$PATH:/usr/realtime/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/realtime/lib

You might want to include these in your .bashrc file.

If the latter does not work you can also create a file /etc/ld.so.conf.d/rtai.conf with the content "/usr/realtime/lib" and run "ldconfig"

Moreover you need to load the rtai modules. You can do that by using the attached script start.sh.

Also make sure that asn1 is set up correctly for use with RTAI. See the README in $OPENAIR2_DIR/RRC/LITE/MESSAGES for details.

Openair kernel modules

Achtung! Don't forget to check that your xmmintrin.h has been patched (see OpenAirInterfaceOpenAirKernel26294x86Setups for instance)

The kernel modules (hardware drivers) can be compiled from $OPENAIR_TARGETS/RTAI. The Makefile includes several targets, most notably

  • openair_rf_cbmimo1_softmodem.ko: this is the real-time softmodem running completely in the kernel. This module is no longer supported due to a problem of newer kernel version with SSE instructions (misalignment of data)!
  • oai_user_cbmimo1.ko: this is a stripped down hardware driver for CBMIMO1. This will allow you to run the OCTAVE interface and the user-space modem (with OpenAirLXRT).
  • oai_user_exmimo.ko: same as above for Express MIMO
  • asn1_msg_kern.ko: ASN1 support for openair_rf_cbmimo1_softmodem.ko. This module is no longer supported!
  • nasmesh.ko: Non-access stratum driver.
To install the driver type
 sudo make install_oai_user 

To remove the driver type

 sudo make remove 

Potential Gotchas

When compiling the module, you can safely ignore the warnings at the end of the compilation that several rtai symbols are not found. But, if you see warnings for non RTAI functions, that means that indeed something is wrong in your build process.

When running

 sudo make install_oai_user

you may get several possible errors. If you get "insmod: error inserting 'openair_rf_softmodem.ko': -1 Unknown symbol in module", check with dmesg which symbol is missing. Most likely, one of the rtai module is not inserted. If you get "insmod: error inserting 'openair_rf_softmodem.ko': -1 No such device", that is pretty obvious: the card is not found.

-- FlorianKaltenberger - 19 Apr 2012

Topic attachments
I Attachment Action Size Date Who Comment
Unix shell scriptsh start.sh manage 0.2 K 12 Sep 2012 - 12:08 FlorianKaltenberger  
Topic revision: r24 - 23 Sep 2013 - PhilippeFoubert
 
Copyright 2004-2010 Institut Eurecom & all contributing authors.