Changes between Version 8 and Version 9 of Resources/Notes/Krypton Usage


Ignore:
Timestamp:
May 11, 2020, 12:57:03 AM (5 years ago)
Author:
msherman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Resources/Notes/Krypton Usage

    v8 v9  
    66=== Installation / Starting of PCIe driver ===
    77From the COSMOS console, load an image that has a compatible UHD & kernel driver already installed. The image baseline-uhd.ndz or similar can be used.
    8 {{{
    9 console> omf load -i baseline-uhd.ndz  -t sdr2-lg1.sb1.cosmos-lab.org
    10 console> omf tell -a on -t sdr2-lg1.sb1.cosmos-lab.org
     8{{{#!shell-session
     9console:~# omf load -i baseline-uhd.ndz  -t sdr2-lg1.sb1.cosmos-lab.org
     10console:~# omf tell -a on -t sdr2-lg1.sb1.cosmos-lab.org
    1111}}}
    1212
    1313Now ssh into the Krypton host and verify it is able to detect the radio on the PCIe bus. Use ''lspci'' to list all the devices that are detected.
    14 {{{
     14{{{#!shell-session
    1515root@sdr2-lg1:~# lspci
    1616}}}
    1717
    1818In the output of lspci, search for ''Signal processing controller: National Instruments PXIe/PCIe Device''. This means the host computer's PCIe controller sees the Krypton radio. Now download and install the PCIe driver so the UHD applications access the radio. Complete details on this driver is [https://files.ettus.com/manual/page_ni_rio_kernel.html here].
    19 {{{
     19{{{#!shell-session
    2020root@sdr2-lg1:~# wget http://files.ettus.com/binaries/niusrprio/niusrprio-installer-18.0.0.tar.gz
    2121root@sdr2-lg1:~# tar -zxf niusrprio-installer-18.0.0.tar.gz
     
    2424
    2525After the installation is complete start the driver by loading it into the kernel modules.
    26 {{{
     26{{{#!shell-session
    2727root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start
    2828Making sure drivers are up to date...
     
    3737
    3838At this point use ''uhd_find_devices'' and ''uhd_usrp_probe'' query the radio.
    39 {{{
     39{{{#!shell-session
    4040root@sdr2-lg1:~# uhd_find_devices --args="type=x300"
    4141[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501; UHD_3.14.0.HEAD-0-g6875d061
     
    6767
    6868To update the FPGA following these steps.
    69 {{{
     69{{{#!shell-session
    7070root@sdr2-lg1:~#  /usr/local/lib/uhd/utils/uhd_images_downloader.py
    7171root@sdr2-lg1:~# uhd_image_loader --args "type=x300"
     
    7676
    7777'''Note:''' If the Krypton host is rebooted, the driver modules are NOT automatically reloaded into the kernel. So the command ''/usr/local/bin/niusrprio_pcie start'' has to be run on the Krypton host everytime it is power-cycled or rebooted.
    78 {{{
     78{{{#!shell-session
    7979root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start
    8080}}}
     
    8484While trying to build the NI driver following the instructions above, you may encounter an error regarding the ''do_munmap'' function not having enough input arguments. To fix, issue the following command to open the problematic C code file in nano:
    8585
    86 {{{
     86{{{#!shell
    8787nano /var/lib/nikal/5.0.0-29-generic/nikal/nikal.c
    8888}}}
     
    9090In nano, use CTRL-W to search for "do_munmap" and locate the following function:
    9191
    92 {{{
     92{{{#!c
    9393static inline int nNIKAL240_do_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
    9494{
     
    105105Note that the third and final call to ''do_munmap'' is missing the fourth parameter. Add NULL as the fourth parameter so that the line reads as the following:
    106106
    107 {{{
     107{{{#!c
    108108   return do_munmap(mm, addr, len, NULL);
    109109}}}