format ExpressMIMO

update TODO
Cedric Roux
2016-01-18 11:31:27 +01:00
parent 61d52391e7
commit d27fca7ad8
2 changed files with 60 additions and 25 deletions

@@ -1,45 +1,81 @@
---+ ExpressMIMO2 drivers and firmware
# ExpressMIMO2 drivers and firmware
This page shows how to get started with the ExpressMIMO2 family of cards.
---++ Prerequisites
Before compiling you need to set OPENAIRx_DIR to the root directory of openairx, see the file =oaienv= in the top director of OAI or do something like:
<pre>set OPENAIR_HOME variable and export the following:
## Prerequisites
Before compiling you need to set `OPENAIRx_DIR` to the root directory
of `openairx`, see the file `oaienv` in the top director of OAI or do something like:
Set `OPENAIR_HOME` variable and export the following:
```shell
export OPENAIR1_DIR=$OPENAIR_HOME/openair1
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
export OPENAIR_TARGETS=$OPENAIR_HOME/targets/
```
</pre>
Also, you should check that Linux has properly identified the card by doing:
%BLACK%%NAVY% %ENDCOLOR%%ENDCOLOR% Also, you should check that Linux has properly identified the card by doing
<pre>lspci
</pre>
```shell
lspci
```
where you should see something like
<pre>01:00.0 Signal processing controller: Xilinx Corporation Default PCIe endpoint ID</pre>
---++ Scripts
You should see something like:
Everything can also be compiled comfortably from the directory $OPENAIR_TARGETS/RT/USER using "make drivers". There is a script init_exmimo2.sh which loads the driver and initializes the firmware after auto-detecting the version of the card.
---++ <span style="color: #630000; font-size: 20px; line-height: 1em;">To compile Openair kernel modules yourself</span>
`01:00.0 Signal processing controller: Xilinx Corporation Default PCIe endpoint ID`
To operate the ExpressMIMO2 cards, you need one hardware driver (linux kernel module). This driver is located in $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom. RTAI is no longer required to build this driver. RTAI is only required for the real-time operation of the card (see below).
## Scripts
To build the driver just call "make" from $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom. It will produce a file "openair_rf.ko" in the same directory. Insert the module using "sudo insmod openair_rf.ko". If you do a =dmesg=, you should see some kernel logs which trace the initial dialogue between the LEON3 processor in ExpressMIMO2 and the openair_rf driver in the host PC.
---++ Firmware upload
Everything can also be compiled comfortably from the directory `$OPENAIR_TARGETS/RT/USER`
using `make drivers`. There is a script `init_exmimo2.sh` which loads the driver and
initializes the firmware after auto-detecting the version of the card.
Before using the card, the firmare needs to be loaded in the card. The program to do this is located in $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT. To build the tool call "make" from that directory.
## To compile Openair kernel modules yourself
In the same directory there is the compiled firmware for ExpressMIMO2 (sdr_expressmimo2). If you want to compile the firmware from scratch, look into the openair0 SVN repository, folder exmimo2/software/sdr.
To operate the ExpressMIMO2 cards, you need one hardware driver (linux kernel module).
This driver is located in `$OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom`. RTAI is no
longer required to build this driver. RTAI is only required for the real-time operation
of the card (see below).
To load the firmware into the card, type "updatefw -s 0x43fffff0 -b -f sdr_expressmimox", where x has to be replaced with the Express MIMO board version.
To build the driver just call `make` from `$OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom`.
It will produce a file `openair_rf.ko` in the same directory. Insert the module using
`sudo insmod openair_rf.ko`. If you do a `dmesg`, you should see some kernel logs which
trace the initial dialogue between the LEON3 processor in ExpressMIMO2 and the openair_rf
driver in the host PC.
Again by doing =dmesg= you can check that the card is operational. You should see the message "[LEON card0]: ready".
## Firmware upload
---++ Potential Gotchas
Before using the card, the firmare needs to be loaded in the card. The program to do this
is located in `$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT`. To build the tool call
`make` from that directory.
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.
In the same directory there is the compiled firmware for ExpressMIMO2 (`sdr_expressmimo2`).
If you want to compile the firmware from scratch, look into the `openair0` SVN repository,
folder `exmimo2/software/sdr`.
When inserting the driver 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.
To load the firmware into the card, type `updatefw -s 0x43fffff0 -b -f sdr_expressmimox`, where `x`
has to be replaced with the Express MIMO board version.
-- User.FlorianKaltenberger - 22 Apr 2013
Again by doing `dmesg` you can check that the card is operational. You should see the message
`[LEON card0]: ready`.
## 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 inserting the driver you may get several possible errors. If you get:
`insmod: error inserting 'openair_rf_softmodem.ko': -1 Unknown symbol in module`
Then 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`
Tthat is pretty obvious: the card is not found.
-- @florian.kaltenberger - 22 Apr 2013

@@ -34,7 +34,6 @@ Here are the pages that need to be converted.
* [EurecomEquipmentStatus](EurecomEquipmentStatus)
* [EurecomMimoOpenairSounder](EurecomMimoOpenairSounder)
* [EurecomTuB](EurecomTuB)
* [ExpressMIMO](ExpressMIMO)
* [ExpressMIMO2](ExpressMIMO2)
* [ExpressMIMOCalibration](ExpressMIMOCalibration)
* [ExpressmimoFlashProgram](ExpressmimoFlashProgram)