skip to content
UKHASnet Wiki
User Tools
Register
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Register
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
guides:rtlsdr_decoder_windows
There are a variety of ways this could be achieved. This is currently a Work In Progress You can download a copt of rtl_fm (and the other tools from http://sdr.osmocom.org/trac/attachment/wiki/rtl-sdr/RelWithDebInfo.zip) Precompiled binaries for windows (WIP) ====== Cross Compile from Raspbian ====== Create a folder to keep the compiled libraries in. <code> mkdir ${HOME}/mingw mkdir ${HOME}/mingw/pkgconfig </code> ===== Install Toolchain ===== On Jessie use: <code>sudo apt-get install mingw-w64</code> On Wheezy you may need to downgrade the binutils package so use <code>sudo apt-get install mingw-w64 binutils=2.22-8+deb7u2</code> ===== Compile required libs ===== ==== Zlib ==== Zlib is required by curl, This will build a static lib only (the .dll requires some extra stuff) Download and extract <code> wget http://zlib.net/zlib-1.2.8.tar.gz tar xzf zlib-1.2.8.tar.gz cd zlib-1.2.8 </code> Configure (this isn't standard autoconf) <code> CC=i686-w64-mingw32-gcc \ AR=i686-w64-mingw32-ar \ RANLIB=i686-w64-mingw32-ranlib \ CFLAGS=-O2 \ ./configure --prefix=${HOME}/mingw/zlib </code> Build and Install <code> make LDSHAREDLIBC= make install </code> //NB: The LDSHAREDLIBC= option on make removed -lc on some parts of the compilation that causes issues.// Create symlinks for pkg-config (not currently used) <code> ln -s ../zlib/lib/pkgconfig/zlib.pc ${HOME}/mingw/pkgconfig </code> ==== OpenSSL ==== OpenSSL is required by Curl. TODO: Consider using openssl-1.0.2h.tar.gz as this should have longer support than the 1.0.1 series. Download and extract <code> wget http://www.openssl.org/source/openssl-1.0.1t.tar.gz tar xzf openssl-1.0.1t.tar.gz cd openssl-1.0.1t </code> Configure (this isn't standard autoconf) <code> ./Configure mingw --prefix=${HOME}/mingw/openssl --cross-compile-prefix=i686-w64-mingw32- </code> Build and install <code> make DIRS='crypto ssl engines' depend make DIRS='crypto ssl engines' all make DIRS='crypto ssl engines' install_sw </code> Create symlinks for pkg-config (not currently used) <code> ln -s ../openssl/lib/pkgconfig/openssl.pc ${HOME}/mingw/pkgconfig ln -s ../openssl/lib/pkgconfig/libssl.pc ${HOME}/mingw/pkgconfig ln -s ../openssl/lib/pkgconfig/libcrypto.pc ${HOME}/mingw/pkgconfig </code> ==== Curl ==== Download and extract <code> wget http://curl.haxx.se/download/curl-7.49.0.tar.gz tar xzf curl-7.49.0.tar.gz cd curl-7.49.0/ </code> Configure <code> ./configure --prefix=${HOME}/mingw/curl \ --with-zlib=${HOME}/mingw/zlib \ --with-ssl=${HOME}/mingw/openssl \ --without-ldap-lib --disable-manual --enable-ipv6 \ --build=i686-pc-linux-gnu --host=i686-w64-mingw32 \ --enable-static --disable-shared </code> Build and Install <code> make make install </code> Create symlinks for pkg-config (not currently used) <code> ln -s ../curl/lib/pkgconfig/libcurl.pc ${HOME}/mingw/pkgconfig </code> ===== Compile Decoder ===== <code> i686-w64-mingw32-gcc -std=gnu99 -o UKHASnet-decoder.exe UKHASnet-decoder.c -DGATEWAY_ID=\"UKHASGW\" \ -DCURL_STATICLIB -static \ -I../libs/curl/include -L../libs/curl/lib \ -L../libs/openssl/lib -L../libs/zlib/lib \ -lcurl -lssl -lcrypto -lz -lws2_32 -lgdi32 </code> ===== Cross Compile rtl-sdr ===== ==== pthreads-w32 ==== <code> wget ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz tar xzf pthreads-w32-2-9-1-release.tar.gz cd pthreads-w32-2-9-1-release make CROSS=i686-w64-mingw32- clean GC-inlined </code> <code> mkdir -p ${HOME}/mingw/pthreadsw32/{include,lib} cp {pthread.h,sched.h,semaphore.h} ${HOME}/mingw/pthreadsw32/include cp {libpthreadGC2.a,pthreadGC2.dll} ${HOME}/mingw/pthreadsw32/lib ln -s libpthreadGC2.a ${HOME}/mingw/pthreadsw32/lib/libpthread.a </code> ==== libusb ==== <code> wgt http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.20/libusb-1.0.20.tar.bz2 tar xjf libusb-1.0.20.tar.bz2 cd libusb-1.0.20/ </code> <code> ./configure --prefix=${HOME}/mingw/libusb \ --build=i686-pc-linux-gnu --host=i686-w64-mingw32 </code> <code> make make install </code> <code> ln -s ../libusb/lib/pkgconfig/libusb-1.0.pc ${HOME}/mingw/pkgconfig </code> ==== rtl-sdr ==== <code> sudo apt-get install autoconf libtool git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr autoreconf -i mkdir build-win32 cd build-win32 </code> <code> CFLAGS=-I${HOME}/mingw/pthreadsw32/include \ LDFLAGS=-L${HOME}/mingw/pthreadsw32/lib \ LIBUSB_CFLAGS=-I${HOME}/mingw/libusb/include/libusb-1.0 \ LIBUSB_LIBS='-L${HOME}/mingw/libusb/lib -lusb-1.0' \ ../configure --prefix=${HOME}/mingw/rtl-sdr \ --build=i686-pc-linux-gnu --host=i686-w64-mingw32 </code> <code> make make install </code> ====== Compile on Windows ======
guides/rtlsdr_decoder_windows.txt
ยท Last modified: 2020/06/27 23:02 (external edit)
Page Tools
Show page
Old revisions
Backlinks
Back to top