Skip to content

Commit

Permalink
Add UHD support to GR3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifcruz committed Aug 11, 2020
1 parent 48f3d57 commit 31d0405
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 36 deletions.
24 changes: 14 additions & 10 deletions builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion builder/stage4/05-pisdr-gnuradio/00-packages-nr
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 9 additions & 25 deletions builder/stage4/05-pisdr-gnuradio/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 35 additions & 0 deletions builder/stage4/05-pisdr-gnuradio/01-run.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 31d0405

Please sign in to comment.