Pārlūkot izejas kodu

add hackrf support

next_step
Luigi Cruz pirms 4 gadiem
vecāks
revīzija
44d91fce19
7 mainītis faili ar 69 papildinājumiem un 1 dzēšanām
  1. +1
    -0
      ansible/roles/grub/tasks/main.yaml
  2. +5
    -0
      ansible/roles/hackrf/meta/main.yaml
  3. +11
    -0
      ansible/roles/hackrf/tasks/00_dep.yaml
  4. +27
    -0
      ansible/roles/hackrf/tasks/01_base.yaml
  5. +20
    -0
      ansible/roles/hackrf/tasks/02_soapy.yaml
  6. +4
    -0
      ansible/roles/hackrf/tasks/main.yaml
  7. +1
    -1
      build_grub.sh

+ 1
- 0
ansible/roles/grub/tasks/main.yaml Parādīt failu

@@ -12,6 +12,7 @@
shell: |
set -e
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

- name: Install Linux firmware


+ 5
- 0
ansible/roles/hackrf/meta/main.yaml Parādīt failu

@@ -0,0 +1,5 @@
---
dependencies:
- role: pisdr
- role: gnuradio
- role: soapysdr

+ 11
- 0
ansible/roles/hackrf/tasks/00_dep.yaml Parādīt failu

@@ -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

+ 27
- 0
ansible/roles/hackrf/tasks/01_base.yaml Parādīt failu

@@ -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

+ 20
- 0
ansible/roles/hackrf/tasks/02_soapy.yaml Parādīt failu

@@ -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

+ 4
- 0
ansible/roles/hackrf/tasks/main.yaml Parādīt failu

@@ -0,0 +1,4 @@
---
- include_tasks: 00_dep.yaml
- include_tasks: 01_base.yaml
- include_tasks: 02_soapy.yaml

+ 1
- 1
build_grub.sh Parādīt failu

@@ -10,7 +10,7 @@ LOOP_DEV="/dev/loop5"

printf "Creating image file... "
if [ "$(lsblk | grep $(basename $LOOP_DEV))" ]; then
losetup -d $LOOP_DEV
losetup -d $LOOP_DEV || true
fi
rm -fr $GRUB_IMG
printf "(OK)\n"


Notiek ielāde…
Atcelt
Saglabāt