Difference between revisions of "PiHPSDR compile ubuntu"
From HPSDRwiki
(→Reboot system) |
(→Setup gpio group) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=== Install System Reqirements === | === Install System Reqirements === | ||
− | <pre>sudo apt install build-essential git</pre> | + | <pre>sudo apt install -y build-essential git</pre> |
=== Install piHPSDR prerequisites === | === Install piHPSDR prerequisites === | ||
− | <pre>sudo apt install libfftw3-dev libgtk-3-dev libasound2-dev libusb-1.0-0-dev libgpiod-dev libi2c-dev</pre> | + | <pre>sudo apt install -y libfftw3-dev libgtk-3-dev libasound2-dev libusb-1.0-0-dev libgpiod-dev libi2c-dev</pre> |
=== Setup gpio group === | === Setup gpio group === | ||
− | + | The GPIO devices are installed with root ownership. To be able to run as a user we create a '''gpio''' group that we can be a member of and also create a udev rule to create the gpio devices with a group id of '''gpio''' and set the permissions to read/write for the owner and group. | |
<pre>sudo addgroup --system gpio</pre> | <pre>sudo addgroup --system gpio</pre> | ||
Line 36: | Line 36: | ||
=== Reboot system === | === Reboot system === | ||
− | Reboot the system to have the gpio group changes and the SPI interface changes have effect. | + | Reboot the system to have the gpio group and permissions changes and the SPI interface changes have effect. |
− | ===Fetch WDSP and piHPSDR source code === | + | ===Fetch WDSP and piHPSDR source code from github === |
+ | |||
+ | I would recommend creating a directory '''github''' to download the source into: | ||
+ | |||
+ | <pre>mkdir github</pre> | ||
+ | <pre>cd github</pre> | ||
+ | |||
+ | Download the source: | ||
<pre>git clone https://github.com/g0orx/wdsp.git</pre> | <pre>git clone https://github.com/g0orx/wdsp.git</pre> | ||
+ | |||
+ | <pre>git clone https://github.com/g0orx/pihpsdr.git</pre> | ||
+ | |||
+ | === Compile WDSP === | ||
+ | |||
+ | <pre>cd ~/github/wdsp</pre> | ||
+ | <pre>make clean</pre> | ||
+ | <pre>make -j4</pre> | ||
+ | <pre>sudo make install</pre> | ||
+ | |||
+ | Copy libwdsp.so to the pihpsdr install directory: | ||
+ | |||
+ | <pre>cp libwdsp.so ~/github/pihpsdr/release/pihpsdr</pre> | ||
+ | |||
+ | === Compile pihpsdr === | ||
+ | |||
+ | <pre>cd ~/github/pihpsdr</pre> | ||
+ | <pre>make clean</pre> | ||
+ | <pre>make -j4</pre> | ||
+ | <pre>make release</pre> | ||
+ | |||
+ | === Install pihpsdr === | ||
+ | |||
+ | <pre>cd ~</pre> | ||
+ | <pre>tar xvf ~/github/pihpsdr/release/pihpsdr.tar</pre> | ||
+ | <pre>cd pihpsdr</pre> | ||
+ | <pre>sh ./install.sh</pre> |
Latest revision as of 09:48, 3 December 2020
PiHPSDR - Setting up and compiling on Ubuntu 20.10 64 bit
Install System Reqirements
sudo apt install -y build-essential git
Install piHPSDR prerequisites
sudo apt install -y libfftw3-dev libgtk-3-dev libasound2-dev libusb-1.0-0-dev libgpiod-dev libi2c-dev
Setup gpio group
The GPIO devices are installed with root ownership. To be able to run as a user we create a gpio group that we can be a member of and also create a udev rule to create the gpio devices with a group id of gpio and set the permissions to read/write for the owner and group.
sudo addgroup --system gpio
sudo adduser $USER gpio
Set gpio ownership and permissions on bootup
Create /etc/udev/rules.d/90-gpio.rules with:
KERNEL=="gpio*", OWNER="root", GROUP="gpio", MODE="660"
Disable SPI interface
Edit /boot/firmware/config.txt and find the line with:
dtparams=spi=on
and change to:
dtparams=spi=off
Reboot system
Reboot the system to have the gpio group and permissions changes and the SPI interface changes have effect.
Fetch WDSP and piHPSDR source code from github
I would recommend creating a directory github to download the source into:
mkdir github
cd github
Download the source:
git clone https://github.com/g0orx/wdsp.git
git clone https://github.com/g0orx/pihpsdr.git
Compile WDSP
cd ~/github/wdsp
make clean
make -j4
sudo make install
Copy libwdsp.so to the pihpsdr install directory:
cp libwdsp.so ~/github/pihpsdr/release/pihpsdr
Compile pihpsdr
cd ~/github/pihpsdr
make clean
make -j4
make release
Install pihpsdr
cd ~
tar xvf ~/github/pihpsdr/release/pihpsdr.tar
cd pihpsdr
sh ./install.sh