Browse Source

Add UHD support to GR3.7

tags/v4.0.0-refresh.2
Luigi Cruz 4 years ago
parent
commit
31d0405b84
4 changed files with 63 additions and 36 deletions
  1. +14
    -10
      builder/build.sh
  2. +5
    -1
      builder/stage4/05-pisdr-gnuradio/00-packages-nr
  3. +9
    -25
      builder/stage4/05-pisdr-gnuradio/00-run.sh
  4. +35
    -0
      builder/stage4/05-pisdr-gnuradio/01-run.sh

+ 14
- 10
builder/build.sh View File

@@ -20,11 +20,13 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")"
if [ -n "$PACKAGES" ]; then
on_chroot << EOF
apt-get -m --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES || true
sleep 25
apt-get -m --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES || true
sleep 25
apt-get --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES
n=0
until [ "$n" -ge 5 ]
do
apt-get --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES && break
n=$((n+1))
sleep 15
done
EOF
fi
log "End ${SUB_STAGE_DIR}/${i}-packages-nr"
@@ -34,11 +36,13 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")"
if [ -n "$PACKAGES" ]; then
on_chroot << EOF
apt-get -m --ignore-missing --fix-missing install -y $PACKAGES || true
sleep 25
apt-get -m --ignore-missing --fix-missing install -y $PACKAGES || true
sleep 25
apt-get --ignore-missing --fix-missing install -y $PACKAGES
n=0
until [ "$n" -ge 5 ]
do
apt-get --ignore-missing --fix-missing install -y $PACKAGES && break
n=$((n+1))
sleep 15
done
EOF
fi
log "End ${SUB_STAGE_DIR}/${i}-packages"


+ 5
- 1
builder/stage4/05-pisdr-gnuradio/00-packages-nr View File

@@ -26,4 +26,8 @@ python-mako python3-mako
python-dev python3-dev
python-numpy python3-numpy
python-sphinx python3-sphinx
python-cheetah python3-cheetah
python-cheetah python3-cheetah

libboost-all-dev
libusb-1.0-0-dev
python3-mako

+ 9
- 25
builder/stage4/05-pisdr-gnuradio/00-run.sh View File

@@ -3,33 +3,17 @@
on_chroot << EOF
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"

if [ ! -d "volk" ]; then
git clone --recursive https://github.com/gnuradio/volk.git
fi

cd volk
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j$(nproc) install
ldconfig
EOF

on_chroot << EOF
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"

if [ ! -d "gnuradio" ]; then
git clone --recursive https://github.com/gnuradio/gnuradio.git
if [ ! -d "uhd" ]; then
git clone https://github.com/EttusResearch/uhd.git
fi

cd gnuradio
git checkout maint-3.7
cd uhd/host
git checkout UHD-3.15.LTS
mkdir -p build
cd build
cmake -DENABLE_INTERNAL_VOLK=OFF -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python ../
cmake -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \
-DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \
-DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15" \
-DCMAKE_BUILD_TYPE=Release ../
make -j$(nproc) install
ldconfig
EOF

EOF

+ 35
- 0
builder/stage4/05-pisdr-gnuradio/01-run.sh View File

@@ -0,0 +1,35 @@
#!/bin/bash -e

on_chroot << EOF
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"

if [ ! -d "volk" ]; then
git clone --recursive https://github.com/gnuradio/volk.git
fi

cd volk
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j$(nproc) install
ldconfig
EOF

on_chroot << EOF
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"

if [ ! -d "gnuradio" ]; then
git clone --recursive https://github.com/gnuradio/gnuradio.git
fi

cd gnuradio
git checkout maint-3.7
mkdir -p build
cd build
cmake -DENABLE_INTERNAL_VOLK=OFF -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python ../
make -j$(nproc) install
ldconfig
EOF


Loading…
Cancel
Save