浏览代码

multiple changes

next_step
Luigi Cruz 4 年前
父节点
当前提交
5e3c01a021
共有 62 个文件被更改,包括 615 次插入271 次删除
  1. +1
    -1
      ansible/00_base.yaml
  2. +6
    -2
      ansible/01_headless.yaml
  3. +1
    -1
      ansible/02_desktop.yaml
  4. +1
    -1
      ansible/03_grub.yaml
  5. +4
    -10
      ansible/03_tegra.yaml
  6. +0
    -1
      ansible/group_vars/all.yaml
  7. +5
    -0
      ansible/roles/airspy/meta/main.yaml
  8. +10
    -0
      ansible/roles/airspy/tasks/00_dep.yaml
  9. +24
    -0
      ansible/roles/airspy/tasks/01_base.yaml
  10. +19
    -0
      ansible/roles/airspy/tasks/02_soapy.yaml
  11. +4
    -0
      ansible/roles/airspy/tasks/main.yaml
  12. +5
    -0
      ansible/roles/airspyhf/meta/main.yaml
  13. +10
    -0
      ansible/roles/airspyhf/tasks/00_dep.yaml
  14. +24
    -0
      ansible/roles/airspyhf/tasks/01_base.yaml
  15. +19
    -0
      ansible/roles/airspyhf/tasks/02_soapy.yaml
  16. +4
    -0
      ansible/roles/airspyhf/tasks/main.yaml
  17. +0
    -38
      ansible/roles/base/tasks/main.yaml
  18. +0
    -1
      ansible/roles/desktop/tasks/main.yml
  19. +3
    -0
      ansible/roles/gnuradio/meta/main.yaml
  20. +40
    -0
      ansible/roles/gnuradio/tasks/00_dep.yaml
  21. +18
    -0
      ansible/roles/gnuradio/tasks/01_base.yaml
  22. +2
    -55
      ansible/roles/gnuradio/tasks/main.yaml
  23. +0
    -1
      ansible/roles/grub/tasks/main.yaml
  24. +5
    -0
      ansible/roles/limesdr/meta/main.yaml
  25. +14
    -0
      ansible/roles/limesdr/tasks/00_dep.yaml
  26. +27
    -0
      ansible/roles/limesdr/tasks/01_base.yaml
  27. +20
    -0
      ansible/roles/limesdr/tasks/02_gnuradio.yaml
  28. +3
    -56
      ansible/roles/limesdr/tasks/main.yaml
  29. +39
    -0
      ansible/roles/pisdr/tasks/main.yaml
  30. +0
    -0
      ansible/roles/pisdr/templates/etc/pisdr/build.dirs
  31. +0
    -0
      ansible/roles/pisdr/templates/etc/pisdr/optimizations_amd64.cmake
  32. +0
    -0
      ansible/roles/pisdr/templates/etc/pisdr/optimizations_arm64.cmake
  33. +0
    -0
      ansible/roles/pisdr/templates/etc/pisdr/udev.paths
  34. +5
    -0
      ansible/roles/plutosdr/meta/main.yaml
  35. +16
    -0
      ansible/roles/plutosdr/tasks/00_dep.yaml
  36. +43
    -0
      ansible/roles/plutosdr/tasks/01_base.yaml
  37. +20
    -0
      ansible/roles/plutosdr/tasks/02_soapy.yaml
  38. +19
    -0
      ansible/roles/plutosdr/tasks/03_gnuradio.yaml
  39. +5
    -0
      ansible/roles/plutosdr/tasks/main.yaml
  40. +5
    -0
      ansible/roles/rtlsdr/meta/main.yaml
  41. +10
    -0
      ansible/roles/rtlsdr/tasks/00_dep.yaml
  42. +24
    -0
      ansible/roles/rtlsdr/tasks/01_base.yaml
  43. +20
    -0
      ansible/roles/rtlsdr/tasks/02_soapy.yaml
  44. +4
    -0
      ansible/roles/rtlsdr/tasks/main.yaml
  45. +4
    -0
      ansible/roles/soapysdr/meta/main.yaml
  46. +13
    -0
      ansible/roles/soapysdr/tasks/00_dep.yaml
  47. +19
    -0
      ansible/roles/soapysdr/tasks/01_base.yaml
  48. +19
    -0
      ansible/roles/soapysdr/tasks/02_remote.yaml
  49. +19
    -0
      ansible/roles/soapysdr/tasks/03_gnuradio.yaml
  50. +4
    -67
      ansible/roles/soapysdr/tasks/main.yaml
  51. +0
    -1
      ansible/roles/tegra_post/tasks/main.yaml
  52. +0
    -1
      ansible/roles/tegra_pre/tasks/main.yaml
  53. +3
    -0
      ansible/roles/uhd/meta/main.yaml
  54. +11
    -0
      ansible/roles/uhd/tasks/00_dep.yaml
  55. +21
    -0
      ansible/roles/uhd/tasks/01_base.yaml
  56. +2
    -29
      ansible/roles/uhd/tasks/main.yaml
  57. +14
    -0
      ansible/standalone.yaml
  58. +0
    -1
      ansible/tasks/cleanup.yaml
  59. +0
    -1
      ansible/tasks/mount.yaml
  60. +0
    -1
      ansible/tasks/umount.yaml
  61. +4
    -0
      ansible/tasks/update-apt.yaml
  62. +3
    -3
      build.sh

+ 1
- 1
ansible/00_base.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Install base system
hosts: pisdr
connection: chroot
@@ -7,5 +6,6 @@
- include: tasks/mount.yaml
roles:
- base
- pisdr
post_tasks:
- include: tasks/umount.yaml

+ 6
- 2
ansible/01_headless.yaml 查看文件

@@ -1,14 +1,18 @@
---

- name: Install headless system
hosts: pisdr
connection: chroot
pre_tasks:
- include: tasks/mount.yaml
- include: tasks/update-apt.yaml
roles:
- uhd
- gnuradio
- soapysdr
- limesdr
- airspy
- airspyhf
- rtlsdr
- plutosdr
post_tasks:
- include: tasks/umount.yaml
- include: tasks/umount.yaml

+ 1
- 1
ansible/02_desktop.yaml 查看文件

@@ -1,10 +1,10 @@
---

- name: Install desktop system
hosts: pisdr
connection: chroot
pre_tasks:
- include: tasks/mount.yaml
- include: tasks/update-apt.yaml
roles:
- desktop
post_tasks:

+ 1
- 1
ansible/03_grub.yaml 查看文件

@@ -1,10 +1,10 @@
---

- name: Install GRUB patches
hosts: pisdr
connection: chroot
pre_tasks:
- include: tasks/mount.yaml
- include: tasks/update-apt.yaml
roles:
- grub
post_tasks:


+ 4
- 10
ansible/03_tegra.yaml 查看文件

@@ -1,19 +1,13 @@
---

- name: Install Tegra patches
hosts: pisdr
connection: chroot
pre_tasks:
- include: tasks/mount.yaml
tags:
- always
- {include: 'tasks/mount.yaml', tags: 'always'}
- {include: 'tasks/update-apt.yaml', tags: 'always'}
roles:
- {role: 'tegra_pre', tags: 'pre'}
- {role: 'tegra_post', tags: 'post'}
post_tasks:
- include: tasks/cleanup.yaml
tags:
- post
- include: tasks/umount.yaml
tags:
- always
- {include: 'tasks/cleanup.yaml', tags: 'post'}
- {include: 'tasks/umount.yaml', tags: 'always'}

+ 0
- 1
ansible/group_vars/all.yaml 查看文件

@@ -1,5 +1,4 @@
---

user:
shell: /bin/bash
name: "{{ lookup('env', 'PISDR_USER') }}"


+ 5
- 0
ansible/roles/airspy/meta/main.yaml 查看文件

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

+ 10
- 0
ansible/roles/airspy/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,10 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- libusb-1.0-0-dev
- ninja-build
- cmake
- build-essential

+ 24
- 0
ansible/roles/airspy/tasks/01_base.yaml 查看文件

@@ -0,0 +1,24 @@
---
- name: Git checkout
git:
repo: https://github.com/airspy/airspyone_host.git
dest: "{{ install_dir }}/Airspy"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/Airspy
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: |
echo "/etc/udev/rules.d/52-airspy.rules" >> {{ config_dir }}/udev.paths

+ 19
- 0
ansible/roles/airspy/tasks/02_soapy.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout
git:
repo: https://github.com/pothosware/SoapyAirspy.git
dest: "{{ install_dir }}/SoapyAirspy"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/SoapyAirspy
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 4
- 0
ansible/roles/airspy/tasks/main.yaml 查看文件

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

+ 5
- 0
ansible/roles/airspyhf/meta/main.yaml 查看文件

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

+ 10
- 0
ansible/roles/airspyhf/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,10 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- libusb-1.0-0-dev
- ninja-build
- cmake
- build-essential

+ 24
- 0
ansible/roles/airspyhf/tasks/01_base.yaml 查看文件

@@ -0,0 +1,24 @@
---
- name: Git checkout
git:
repo: https://github.com/airspy/airspyhf.git
dest: "{{ install_dir }}/AirspyHF"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/AirspyHF
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: |
echo "/etc/udev/rules.d/52-airspyhf.rules" >> {{ config_dir }}/udev.paths

+ 19
- 0
ansible/roles/airspyhf/tasks/02_soapy.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout
git:
repo: https://github.com/pothosware/SoapyAirspyHF.git
dest: "{{ install_dir }}/SoapyAirspyHF"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/SoapyAirspyHF
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 4
- 0
ansible/roles/airspyhf/tasks/main.yaml 查看文件

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

+ 0
- 38
ansible/roles/base/tasks/main.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Update sources.list
template:
src: etc/apt/sources.list
@@ -69,42 +68,5 @@
groups: sudo,sys,video,uucp,lp,input,audio,plugdev
state: present

- name: Creates PiSDR directories
file:
path: "{{ item }}"
state: directory
loop:
- "{{ config_dir }}"
- "{{ install_dir }}"

- name: Update build directories
template:
src: "etc/pisdr/{{ item }}"
dest: "{{ config_dir }}/{{ item }}"
owner: root
group: root
mode: 0764
loop:
- "build.dirs"
- "udev.paths"

- name: Update CMake optimization for ARM64
template:
src: etc/pisdr/optimizations_arm64.cmake
dest: "{{ config_dir }}/optimizations.cmake"
owner: root
group: root
mode: 0644
when: ansible_architecture == "aarch64"

- name: Update CMake optimization for AMD64
template:
src: etc/pisdr/optimizations_amd64.cmake
dest: "{{ config_dir }}/optimizations.cmake"
owner: root
group: root
mode: 0644
when: ansible_architecture == "x86_64"

- name: Ensure default multi-user target
shell: systemctl set-default multi-user.target

+ 0
- 1
ansible/roles/desktop/tasks/main.yml 查看文件

@@ -1,5 +1,4 @@
---

- name: Install ubuntu desktop minimal
apt:
name: ubuntu-desktop-minimal


+ 3
- 0
ansible/roles/gnuradio/meta/main.yaml 查看文件

@@ -0,0 +1,3 @@
---
dependencies:
- role: pisdr

+ 40
- 0
ansible/roles/gnuradio/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,40 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- swig
- libzmq3-dev
- libfftw3-dev
- libgsl-dev
- libsdl1.2-dev
- libusb-1.0-0-dev
- libasound2-dev
- portaudio19-dev
- libportaudio2
- pulseaudio
- libjack-dev
- libgmp-dev
- libsdl1.2-dev
- liblog4cpp5-dev
- libqwt-qt5-dev
- libqt5opengl5-dev
- python3-numpy
- python3-mako
- python3-sphinx
- python3-lxml
- python3-pyqt5
- python3-yaml
- python3-click
- python3-click-plugins
- python3-zmq
- python3-scipy
- python3-pip
- python3-gi
- python3-gi-cairo
- gobject-introspection
- gir1.2-gtk-3.0
- ninja-build
- cmake
- build-essential

+ 18
- 0
ansible/roles/gnuradio/tasks/01_base.yaml 查看文件

@@ -0,0 +1,18 @@
---
- name: Git checkout
git:
repo: "https://github.com/gnuradio/gnuradio.git"
dest: "{{ install_dir }}/gnuradio"
version: maint-3.8
recursive: yes

- name: Build
shell: |
set -e
cd {{ install_dir }}/gnuradio
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 2
- 55
ansible/roles/gnuradio/tasks/main.yaml 查看文件

@@ -1,56 +1,3 @@
---

- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- swig
- libzmq3-dev
- libfftw3-dev
- libgsl-dev
- libsdl1.2-dev
- libusb-1.0-0-dev
- libasound2-dev
- portaudio19-dev
- libportaudio2
- pulseaudio
- libjack-dev
- libgmp-dev
- libsdl1.2-dev
- liblog4cpp5-dev
- libqwt-qt5-dev
- libqt5opengl5-dev
- python3-numpy
- python3-mako
- python3-sphinx
- python3-lxml
- python3-pyqt5
- python3-yaml
- python3-click
- python3-click-plugins
- python3-zmq
- python3-scipy
- python3-pip
- python3-gi
- python3-gi-cairo
- gobject-introspection
- gir1.2-gtk-3.0

- name: Git checkout
git:
repo: "https://github.com/gnuradio/gnuradio.git"
dest: "{{ install_dir }}/gnuradio"
version: maint-3.8
recursive: yes

- name: Build
shell: |
set -e
cd {{ install_dir }}/gnuradio
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs
- include_tasks: 00_dep.yaml
- include_tasks: 01_base.yaml

+ 0
- 1
ansible/roles/grub/tasks/main.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Install generic Linux kernel
apt:
name: linux-image-generic


+ 5
- 0
ansible/roles/limesdr/meta/main.yaml 查看文件

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

+ 14
- 0
ansible/roles/limesdr/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,14 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- swig
- libsqlite3-dev
- libi2c-dev
- libusb-1.0-0-dev
- libwxgtk3.0-gtk3-dev
- freeglut3-dev
- ninja-build
- cmake
- build-essential

+ 27
- 0
ansible/roles/limesdr/tasks/01_base.yaml 查看文件

@@ -0,0 +1,27 @@
---
- name: Git checkout
git:
repo: "https://github.com/myriadrf/LimeSuite.git"
dest: "{{ install_dir }}/LimeSuite"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/LimeSuite
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

- name: Install UDEV Rules
shell: |
set -e
cd {{ install_dir }}/LimeSuite/udev-rules
./install.sh
echo "/etc/udev/rules.d/64-limesuite.rules" >> {{ config_dir }}/udev.paths

+ 20
- 0
ansible/roles/limesdr/tasks/02_gnuradio.yaml 查看文件

@@ -0,0 +1,20 @@
---
- name: Git checkout gr-limesdr
git:
repo: "https://github.com/myriadrf/gr-limesdr.git"
dest: "{{ install_dir }}/gr-limesdr"
version: gr-3.8
recursive: yes
depth: 1

- name: Build gr-limesdr
shell: |
set -e
cd {{ install_dir }}/gr-limesdr
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

+ 3
- 56
ansible/roles/limesdr/tasks/main.yaml 查看文件

@@ -1,57 +1,4 @@
---

- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- swig
- libsqlite3-dev
- libi2c-dev
- libusb-1.0-0-dev
- libwxgtk3.0-gtk3-dev
- freeglut3-dev

- name: Git checkout
git:
repo: "https://github.com/myriadrf/LimeSuite.git"
dest: "{{ install_dir }}/LimeSuite"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/LimeSuite
mkdir -p build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-latomic ../
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/64-limesuite.rules" >> {{ config_dir }}/udev.paths

- name: Git checkout gr-limesdr
git:
repo: "https://github.com/myriadrf/gr-limesdr.git"
dest: "{{ install_dir }}/gr-limesdr"
version: gr-3.8
recursive: yes
depth: 1

- name: Build gr-limesdr
shell: |
set -e
cd {{ install_dir }}/gr-limesdr
mkdir -p build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-latomic ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs
- include_tasks: 00_dep.yaml
- include_tasks: 01_base.yaml
- include_tasks: 02_gnuradio.yaml

+ 39
- 0
ansible/roles/pisdr/tasks/main.yaml 查看文件

@@ -0,0 +1,39 @@
---
- name: Creates PiSDR directories
file:
path: "{{ item }}"
state: directory
loop:
- "{{ config_dir }}"
- "{{ install_dir }}"

- name: Update build directories
template:
src: "etc/pisdr/{{ item }}"
dest: "{{ config_dir }}/{{ item }}"
owner: root
group: root
mode: 0764
loop:
- "build.dirs"
- "udev.paths"

- name: Update CMake optimization for ARM64
template:
src: etc/pisdr/optimizations_arm64.cmake
dest: "{{ config_dir }}/optimizations.cmake"
owner: root
group: root
mode: 0644
force: no
when: ansible_architecture == "aarch64"

- name: Update CMake optimization for AMD64
template:
src: etc/pisdr/optimizations_amd64.cmake
dest: "{{ config_dir }}/optimizations.cmake"
owner: root
group: root
mode: 0644
force: no
when: ansible_architecture == "x86_64"

ansible/roles/base/templates/etc/pisdr/build.dirs → ansible/roles/pisdr/templates/etc/pisdr/build.dirs 查看文件


ansible/roles/base/templates/etc/pisdr/optimizations_amd64.cmake → ansible/roles/pisdr/templates/etc/pisdr/optimizations_amd64.cmake 查看文件


ansible/roles/base/templates/etc/pisdr/optimizations_arm64.cmake → ansible/roles/pisdr/templates/etc/pisdr/optimizations_arm64.cmake 查看文件


ansible/roles/base/templates/etc/pisdr/udev.paths → ansible/roles/pisdr/templates/etc/pisdr/udev.paths 查看文件


+ 5
- 0
ansible/roles/plutosdr/meta/main.yaml 查看文件

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

+ 16
- 0
ansible/roles/plutosdr/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,16 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libusb-1.0-0-dev
- ninja-build
- cmake
- build-essential
- libxml2-dev
- bison
- flex
- libcdk5-dev
- libaio-dev
- libserialport-dev
- libavahi-client-dev

+ 43
- 0
ansible/roles/plutosdr/tasks/01_base.yaml 查看文件

@@ -0,0 +1,43 @@
---
- name: Git checkout libiio
git:
repo: https://github.com/analogdevicesinc/libiio
dest: "{{ install_dir }}/libiio"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/libiio
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: Git checkout
git:
repo: https://github.com/analogdevicesinc/libad9361-iio
dest: "{{ install_dir }}/libad9361-iio"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/libad9361-iio
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

- name: Install UDEV Rules
shell: |
echo "/lib/udev/rules.d/90-libiio.rules" >> {{ config_dir }}/udev.paths

+ 20
- 0
ansible/roles/plutosdr/tasks/02_soapy.yaml 查看文件

@@ -0,0 +1,20 @@
---
- name: Git checkout
git:
repo: https://github.com/pothosware/SoapyPlutoSDR.git
dest: "{{ install_dir }}/SoapyPlutoSDR"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/SoapyPlutoSDR
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

+ 19
- 0
ansible/roles/plutosdr/tasks/03_gnuradio.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout
git:
repo: https://github.com/analogdevicesinc/gr-iio
dest: "{{ install_dir }}/gr-iio"
version: upgrade-3.8
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/gr-iio
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 5
- 0
ansible/roles/plutosdr/tasks/main.yaml 查看文件

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

+ 5
- 0
ansible/roles/rtlsdr/meta/main.yaml 查看文件

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

+ 10
- 0
ansible/roles/rtlsdr/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,10 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- libusb-1.0-0-dev
- ninja-build
- cmake
- build-essential

+ 24
- 0
ansible/roles/rtlsdr/tasks/01_base.yaml 查看文件

@@ -0,0 +1,24 @@
---
- name: Git checkout
git:
repo: https://github.com/osmocom/rtl-sdr
dest: "{{ install_dir }}/rtl-sdr"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/rtl-sdr
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake \
-DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

- name: Install UDEV Rules
shell: |
echo "/etc/udev/rules.d/rtl-sdr.rules" >> {{ config_dir }}/udev.paths

+ 20
- 0
ansible/roles/rtlsdr/tasks/02_soapy.yaml 查看文件

@@ -0,0 +1,20 @@
---
- name: Git checkout
git:
repo: https://github.com/pothosware/SoapyRTLSDR.git
dest: "{{ install_dir }}/SoapyRTLSDR"
version: master
recursive: yes
depth: 1

- name: Build
shell: |
set -e
cd {{ install_dir }}/SoapyRTLSDR
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/rtlsdr/tasks/main.yaml 查看文件

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

+ 4
- 0
ansible/roles/soapysdr/meta/main.yaml 查看文件

@@ -0,0 +1,4 @@
---
dependencies:
- role: pisdr
- role: gnuradio

+ 13
- 0
ansible/roles/soapysdr/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,13 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- swig
- avahi-daemon
- libavahi-client-dev
- libusb-1.0-0-dev
- python3-dev
- ninja-build
- cmake
- build-essential

+ 19
- 0
ansible/roles/soapysdr/tasks/01_base.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout SoapySDR
git:
repo: "https://github.com/pothosware/SoapySDR.git"
dest: "{{ install_dir }}/SoapySDR"
version: master
recursive: yes
depth: 1

- name: Build SoapySDR
shell: |
set -e
cd {{ install_dir }}/SoapySDR
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 19
- 0
ansible/roles/soapysdr/tasks/02_remote.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout SoapySDR Remote
git:
repo: "https://github.com/pothosware/SoapyRemote.git"
dest: "{{ install_dir }}/SoapyRemote"
version: master
recursive: yes
depth: 1

- name: Build SoapySDR Remote
shell: |
set -e
cd {{ install_dir }}/SoapyRemote
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 19
- 0
ansible/roles/soapysdr/tasks/03_gnuradio.yaml 查看文件

@@ -0,0 +1,19 @@
---
- name: Git checkout gr-soapy
git:
repo: "https://gitlab.com/librespacefoundation/gr-soapy.git"
dest: "{{ install_dir }}/gr-soapy"
version: master
recursive: yes
depth: 1

- name: Build gr-soapy
shell: |
set -e
cd {{ install_dir }}/gr-soapy
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

+ 4
- 67
ansible/roles/soapysdr/tasks/main.yaml 查看文件

@@ -1,68 +1,5 @@
---

- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- swig
- avahi-daemon
- libavahi-client-dev
- libusb-1.0-0-dev
- python3-dev

- name: Git checkout SoapySDR
git:
repo: "https://github.com/pothosware/SoapySDR.git"
dest: "{{ install_dir }}/SoapySDR"
version: master
recursive: yes
depth: 1

- name: Build SoapySDR
shell: |
set -e
cd {{ install_dir }}/SoapySDR
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

- name: Git checkout SoapySDR Remote
git:
repo: "https://github.com/pothosware/SoapyRemote.git"
dest: "{{ install_dir }}/SoapyRemote"
version: master
recursive: yes
depth: 1

- name: Build SoapySDR Remote
shell: |
set -e
cd {{ install_dir }}/SoapyRemote
mkdir -p build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs

- name: Git checkout gr-soapy
git:
repo: "https://gitlab.com/librespacefoundation/gr-soapy.git"
dest: "{{ install_dir }}/gr-soapy"
version: master
recursive: yes
depth: 1

- name: Build gr-soapy
shell: |
set -e
cd {{ install_dir }}/gr-soapy
mkdir -p build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ../
ninja install
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs
- include_tasks: 00_dep.yaml
- include_tasks: 01_base.yaml
- include_tasks: 02_remote.yaml
- include_tasks: 03_gnuradio.yaml

+ 0
- 1
ansible/roles/tegra_post/tasks/main.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Hold modules
ignore_errors: yes
shell: "apt-mark hold {{ item }}"


+ 0
- 1
ansible/roles/tegra_pre/tasks/main.yaml 查看文件

@@ -1,5 +1,4 @@
---
- name: Install dependencies
apt:
name: "{{ item }}"


+ 3
- 0
ansible/roles/uhd/meta/main.yaml 查看文件

@@ -0,0 +1,3 @@
---
dependencies:
- role: pisdr

+ 11
- 0
ansible/roles/uhd/tasks/00_dep.yaml 查看文件

@@ -0,0 +1,11 @@
---
- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- libusb-1.0-0-dev
- python3-mako
- ninja-build
- cmake
- build-essential

+ 21
- 0
ansible/roles/uhd/tasks/01_base.yaml 查看文件

@@ -0,0 +1,21 @@
---
- name: Git checkout
git:
repo: "https://github.com/EttusResearch/uhd.git"
dest: "{{ install_dir }}/uhd"
version: UHD-3.15.LTS
recursive: yes

- name: Build
shell: |
set -e
cd {{ install_dir }}/uhd/host
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
cp /usr/local/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/
uhd_images_downloader
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs
echo "/etc/udev/rules.d/uhd-usrp.rules" >> {{ config_dir }}/udev.paths

+ 2
- 29
ansible/roles/uhd/tasks/main.yaml 查看文件

@@ -1,30 +1,3 @@
---

- name: Install Dependencies
apt:
name: "{{ item }}"
loop:
- libboost-all-dev
- libusb-1.0-0-dev
- python3-mako

- name: Git checkout
git:
repo: "https://github.com/EttusResearch/uhd.git"
dest: "{{ install_dir }}/uhd"
version: UHD-3.15.LTS
recursive: yes

- name: Build
shell: |
set -e
cd {{ install_dir }}/uhd/host
mkdir -p build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/etc/pisdr/optimizations.cmake ../
ninja install
cp /usr/local/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/
uhd_images_downloader
ldconfig
echo "$(pwd)" >> {{ config_dir }}/build.dirs
echo "/etc/udev/rules.d/uhd-usrp.rules" >> {{ config_dir }}/udev.paths
- include_tasks: 00_dep.yaml
- include_tasks: 01_base.yaml

+ 14
- 0
ansible/standalone.yaml 查看文件

@@ -0,0 +1,14 @@
---
- name: Install Standalone Application
hosts: 127.0.0.1
connection: local
vars:
PISDR_USER: luigi
pre_tasks:
- {include: 'tasks/mount.yaml', tags: 'always'}
- {include: 'tasks/update-apt.yaml', tags: 'always'}
roles:
- {role: 'uhd', tags: 'uhd'}
- {role: 'gnuradio', tags: 'gnuradio'}
- {role: 'soapysdr', tags: 'soapysdr'}
- {role: 'limesdr', tags: 'limesdr'}

+ 0
- 1
ansible/tasks/cleanup.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Clean apt cache
command: apt clean
become: yes


+ 0
- 1
ansible/tasks/mount.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Mount pseudo filesystems
connection: local
shell: mount -o bind '{{ item }}' '{{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}{{ item }}'


+ 0
- 1
ansible/tasks/umount.yaml 查看文件

@@ -1,5 +1,4 @@
---

- name: Umount pseudo filesystems
connection: local
shell: umount -l '{{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}{{ item }}'


+ 4
- 0
ansible/tasks/update-apt.yaml 查看文件

@@ -0,0 +1,4 @@
---
- name: Update apt packages
apt:
update_cache: yes

+ 3
- 3
build.sh 查看文件

@@ -42,13 +42,13 @@ printf "(OK)\n"
##############################################################

#### Phase 00
#( $TARGET/build_base.sh )
( $TARGET/build_base.sh )

#### Phase 01
#( $TARGET/build_headless.sh )
( $TARGET/build_headless.sh )

#### Phase 02
#( $TARGET/build_desktop.sh )
( $TARGET/build_desktop.sh )

#### Phase 03
if [[ "$PISDR_ARCH" == "arm64" ]]; then


正在加载...
取消
保存