Skip to content

Commit 31d0405

Browse files
committed
Add UHD support to GR3.7
1 parent 48f3d57 commit 31d0405

File tree

4 files changed

+63
-36
lines changed

4 files changed

+63
-36
lines changed

builder/build.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ EOF
2020
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")"
2121
if [ -n "$PACKAGES" ]; then
2222
on_chroot << EOF
23-
apt-get -m --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES || true
24-
sleep 25
25-
apt-get -m --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES || true
26-
sleep 25
27-
apt-get --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES
23+
n=0
24+
until [ "$n" -ge 5 ]
25+
do
26+
apt-get --ignore-missing --fix-missing install --no-install-recommends -y $PACKAGES && break
27+
n=$((n+1))
28+
sleep 15
29+
done
2830
EOF
2931
fi
3032
log "End ${SUB_STAGE_DIR}/${i}-packages-nr"
@@ -34,11 +36,13 @@ EOF
3436
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")"
3537
if [ -n "$PACKAGES" ]; then
3638
on_chroot << EOF
37-
apt-get -m --ignore-missing --fix-missing install -y $PACKAGES || true
38-
sleep 25
39-
apt-get -m --ignore-missing --fix-missing install -y $PACKAGES || true
40-
sleep 25
41-
apt-get --ignore-missing --fix-missing install -y $PACKAGES
39+
n=0
40+
until [ "$n" -ge 5 ]
41+
do
42+
apt-get --ignore-missing --fix-missing install -y $PACKAGES && break
43+
n=$((n+1))
44+
sleep 15
45+
done
4246
EOF
4347
fi
4448
log "End ${SUB_STAGE_DIR}/${i}-packages"

builder/stage4/05-pisdr-gnuradio/00-packages-nr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ python-mako python3-mako
2626
python-dev python3-dev
2727
python-numpy python3-numpy
2828
python-sphinx python3-sphinx
29-
python-cheetah python3-cheetah
29+
python-cheetah python3-cheetah
30+
31+
libboost-all-dev
32+
libusb-1.0-0-dev
33+
python3-mako

builder/stage4/05-pisdr-gnuradio/00-run.sh

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,17 @@
33
on_chroot << EOF
44
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
55
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"
6-
7-
if [ ! -d "volk" ]; then
8-
git clone --recursive https://github.com/gnuradio/volk.git
9-
fi
10-
11-
cd volk
12-
mkdir -p build
13-
cd build
14-
cmake -DCMAKE_BUILD_TYPE=Release ../
15-
make -j$(nproc) install
16-
ldconfig
17-
EOF
18-
19-
on_chroot << EOF
20-
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
21-
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"
22-
23-
if [ ! -d "gnuradio" ]; then
24-
git clone --recursive https://github.com/gnuradio/gnuradio.git
6+
if [ ! -d "uhd" ]; then
7+
git clone https://github.com/EttusResearch/uhd.git
258
fi
26-
27-
cd gnuradio
28-
git checkout maint-3.7
9+
cd uhd/host
10+
git checkout UHD-3.15.LTS
2911
mkdir -p build
3012
cd build
31-
cmake -DENABLE_INTERNAL_VOLK=OFF -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python ../
13+
cmake -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \
14+
-DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \
15+
-DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15" \
16+
-DCMAKE_BUILD_TYPE=Release ../
3217
make -j$(nproc) install
3318
ldconfig
34-
EOF
35-
19+
EOF
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash -e
2+
3+
on_chroot << EOF
4+
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
5+
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"
6+
7+
if [ ! -d "volk" ]; then
8+
git clone --recursive https://github.com/gnuradio/volk.git
9+
fi
10+
11+
cd volk
12+
mkdir -p build
13+
cd build
14+
cmake -DCMAKE_BUILD_TYPE=Release ../
15+
make -j$(nproc) install
16+
ldconfig
17+
EOF
18+
19+
on_chroot << EOF
20+
mkdir -p "/home/${FIRST_USER_NAME}/PiSDR/Software"
21+
cd "/home/${FIRST_USER_NAME}/PiSDR/Software"
22+
23+
if [ ! -d "gnuradio" ]; then
24+
git clone --recursive https://github.com/gnuradio/gnuradio.git
25+
fi
26+
27+
cd gnuradio
28+
git checkout maint-3.7
29+
mkdir -p build
30+
cd build
31+
cmake -DENABLE_INTERNAL_VOLK=OFF -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python ../
32+
make -j$(nproc) install
33+
ldconfig
34+
EOF
35+

0 commit comments

Comments
 (0)