@@ -12,6 +12,7 @@ | |||||
shell: | | shell: | | ||||
set -e | set -e | ||||
grub-install --target=x86_64-efi | grub-install --target=x86_64-efi | ||||
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& net.ifnames=0 biosdevname=0/' /etc/default/grub | |||||
GRUB_DISABLE_OS_PROBER=true update-grub | GRUB_DISABLE_OS_PROBER=true update-grub | ||||
- name: Install Linux firmware | - name: Install Linux firmware | ||||
@@ -0,0 +1,5 @@ | |||||
--- | |||||
dependencies: | |||||
- role: pisdr | |||||
- role: gnuradio | |||||
- role: soapysdr |
@@ -0,0 +1,11 @@ | |||||
--- | |||||
- name: Install Dependencies | |||||
apt: | |||||
name: "{{ item }}" | |||||
loop: | |||||
- libusb-1.0-0-dev | |||||
- pkg-config | |||||
- libfftw3-dev | |||||
- ninja-build | |||||
- cmake | |||||
- build-essential |
@@ -0,0 +1,27 @@ | |||||
--- | |||||
- name: Git checkout | |||||
git: | |||||
repo: "https://github.com/mossmann/hackrf.git" | |||||
dest: "{{ install_dir }}/hackrf" | |||||
version: master | |||||
recursive: yes | |||||
depth: 1 | |||||
- name: Build | |||||
shell: | | |||||
set -e | |||||
cd {{ install_dir }}/hackrf/host | |||||
mkdir -p build | |||||
cd build | |||||
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake \ | |||||
-DINSTALL_UDEV_RULES=ON ../ | |||||
ninja install | |||||
ldconfig | |||||
echo "$(pwd)" >> {{ config_dir }}/build.dirs | |||||
- name: Install UDEV Rules | |||||
shell: | | |||||
set -e | |||||
cd {{ install_dir }}/LimeSuite/udev-rules | |||||
./install.sh | |||||
echo "/etc/udev/rules.d/53-hackrf.rules" >> {{ config_dir }}/udev.paths |
@@ -0,0 +1,20 @@ | |||||
--- | |||||
- name: Git checkout | |||||
git: | |||||
repo: https://github.com/pothosware/SoapyHackRF.git | |||||
dest: "{{ install_dir }}/SoapyHackRF" | |||||
version: master | |||||
recursive: yes | |||||
depth: 1 | |||||
- name: Build | |||||
shell: | | |||||
set -e | |||||
cd {{ install_dir }}/SoapyHackRF | |||||
mkdir -p build | |||||
cd build | |||||
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake \ | |||||
-DCMAKE_CXX_FLAGS=-latomic ../ | |||||
ninja install | |||||
ldconfig | |||||
echo "$(pwd)" >> {{ config_dir }}/build.dirs |
@@ -0,0 +1,4 @@ | |||||
--- | |||||
- include_tasks: 00_dep.yaml | |||||
- include_tasks: 01_base.yaml | |||||
- include_tasks: 02_soapy.yaml |
@@ -10,7 +10,7 @@ LOOP_DEV="/dev/loop5" | |||||
printf "Creating image file... " | printf "Creating image file... " | ||||
if [ "$(lsblk | grep $(basename $LOOP_DEV))" ]; then | if [ "$(lsblk | grep $(basename $LOOP_DEV))" ]; then | ||||
losetup -d $LOOP_DEV | |||||
losetup -d $LOOP_DEV || true | |||||
fi | fi | ||||
rm -fr $GRUB_IMG | rm -fr $GRUB_IMG | ||||
printf "(OK)\n" | printf "(OK)\n" | ||||