I've been meaning to post this for a few weeks so today I'm going to jot down just the most pertinent information, in hopes that someone may benefit from what I learned.
So a few weeks ago I set out to compile Gnuradio on my Raspberry Pi. It took a lot of digging (googling) but thanks to many users who encountered similar challenges, I was able to piece together the recipe below, that should result in a compiled gnu radio installation.
Although Patch VonBraun's GNURadio build script didn't do the trick, I used it for reference when coming up with the following steps.
In the following section, lines starting with "#" should be executed as the root user. Lines starting with "$" may be executed as your favorite raspberry pi user.
Install prerequisites
# apt-get install python-cheetah libboost-all-dev python-lxml python-wxgtk2.8 python-numpy python-lxml libfftw3-dev libsdl1.2-dev python-scipy python-matplotlib python-tk octave liboctave-dev libgsl0-dev python-sphinx libcppunit-dev libuhd-dev swig python-qt4-dev libqwt-dev git* Raspberry pi wheezy/sid
build and activate an 800MB swap
(Credit to bredman@raspberrypi.org for posting these steps on the forum - thank you)# swapoff
# swapoff -a
# sudo dd if=/dev/zero of=/myswap bs=1024 count=800k
# mkswap /myswap
# free -m
# swapon /myswap
# free -m
Check-out the latest copy of the gnuradio source tree
$ time git clone http://gnuradio.org/git/gnuradio.gitcd into the build directory and run cmake.
$ cmake -Dhave_mfpu_neon=0 -DCMAKE_CXX_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" -DCMAKE_C_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" ../Compile (Takes about 24 hours!)
$ makeInstall
$ sudo make installRemaining Tasks
- Get osmosdr, gr-baz, and any other extras to compile.
are you able to use gnuradio-companion? does the pi have enough horsepower to use gnu radio blocks to do even simple fm demodulation?
ReplyDeleteHi!
ReplyDeleteI compiled on the basis of the above description and the GnuRadio, rtlsdr. The GRC start simple (signal source - audio sink) works, but if it is complex-float conversion, or the like, you can freeze it all. What went wrong? Please help me!
cmake -Dhave_mfpu_neon=0 -DCMAKE_CXX_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" -DCMAKE_C_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
ReplyDeleteCMake Error at CMakeLists.txt:22 (message):
Prevented in-tree build. This is bad practice.
-- Configuring incomplete, errors occurred!
2013-02-09-wheezy-raspbian ,had the same problem.
Deletecompiling can be started by inserting a # in front of line 21,22,23 in file CMakeLists.txt. Sure that i doesn't solve
the problem of this "bad practice" but still allows the script to continue with compiling.
Thank you for providing this info , helped me a lot
Hi fidO!
ReplyDeleteImg raspbian which is used?
works fine with latest and updated raspbian-img.
ReplyDeleteThank you for this guide!
Thanks for the guide, it works flawlessly! I had a little trouble while compiling. That common smsc95xx kernel error. Discovered it while the make run in the kernel log. It slowed down the make process. I had to disable smsc95xx turbo mode at the kernel (cmdline.txt), then continue make from 37%. I think it was because of the mmc0 being written hard. (I'm using an UHS-I card.) Thanks again!
ReplyDelete/It could be better to do this on nfs or an USB-HDD. Oh well, nice to know that the SDHC card I use is tough enough./ :)
ReplyDeleteThis comment has been removed by the author.
ReplyDelete