Last active
November 20, 2023 04:26
-
-
Save mike-anderson/e8423cedec47b0021f4aecd48a5abf93 to your computer and use it in GitHub Desktop.
stratux barebones debian installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exo pipefail | |
#install go | |
cd /root | |
rm -rf go | |
rm -rf go_path | |
find ./ -name "go*.tar.gz" -delete | |
if [ "$GOROOT" != "/root/go" ]; then | |
echo "export PATH=/root/go/bin:\${PATH}" >> .bashrc | |
echo "export GOROOT=/root/go" >> .bashrc | |
echo "export GOPATH=/root/go_path" >> .bashrc | |
source .bashrc | |
fi | |
mkdir go_path | |
wget "https://go.dev/dl/go1.20.1.linux-arm64.tar.gz" | |
tar -zxvf go1.20.1.linux-arm64.tar.gz | |
go version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exo pipefail | |
apt update | |
apt install -y \ | |
logrotate \ | |
libjpeg62-turbo-dev \ | |
libconfig9 \ | |
dnsmasq \ | |
git \ | |
cmake \ | |
libusb-1.0-0-dev \ | |
build-essential \ | |
pkg-config \ | |
autoconf \ | |
libtool \ | |
libfftw3-dev \ | |
libncurses-dev \ | |
jq \ | |
ifplugd \ | |
iptables | |
# systemctl disable dnsmasq # we start it manually on respective interfaces | |
# systemctl disable dhcpcd | |
# systemctl disable hciuart | |
# systemctl disable triggerhappy | |
# systemctl disable wpa_supplicant | |
# #install go | |
# cd /root | |
# rm -rf go | |
# rm -rf go_path | |
# find ./ -name "go*.tar.gz" -delete | |
# if [ "$GOROOT" != "/root/go" ]; then | |
# echo "export PATH=/root/go/bin:\${PATH}" >> .bashrc | |
# echo "export GOROOT=/root/go" >> .bashrc | |
# echo "export GOPATH=/root/go_path" >> .bashrc | |
# source .bashrc | |
# fi | |
# mkdir go_path | |
# wget "https://go.dev/dl/go1.20.1.linux-arm64.tar.gz" | |
# tar -zxvf go1.20.1.linux-arm64.tar.gz | |
# go version | |
# #rtl-sdr setup | |
cd /root | |
rm -rf rtl-sdr | |
git clone https://github.com/osmocom/rtl-sdr.git | |
cd rtl-sdr | |
git checkout 0847e93e0869feab50fd27c7afeb85d78ca04631 # Nov. 20, 2020 | |
mkdir build && cd build | |
cmake .. -DENABLE_ZEROCOPY=0 | |
make -j1 | |
make install | |
# #kalibrate-rtl | |
cd /root | |
rm -rf kalibrate-rtl | |
git clone https://github.com/steve-m/kalibrate-rtl | |
cd kalibrate-rtl | |
./bootstrap | |
./configure | |
make -j8 | |
make install | |
# #stratux setup | |
cd /root | |
rm -rf stratux | |
git clone https://github.com/b3nn0/stratux.git --recursive | |
cd /root/stratux | |
git checkout v1.6r1-eu029 | |
make -j8 | |
# # Now also prepare the update file.. | |
cd /root/stratux/selfupdate | |
./makeupdate.sh | |
mv /root/stratux/work/update-*.sh /root/ | |
rm -r /root/stratux/work | |
cd /root/stratux | |
#install stratux to /opt | |
make optinstall | |
#install stratux files manually - to avoid installing gpio related files | |
cp image/10-stratux.rules /etc/udev/rules.d/10-stratux.rules | |
cp image/99-uavionix.rules /etc/udev/rules.d/99-uavionix.rules | |
cp __lib__systemd__system__stratux.service /lib/systemd/system/stratux.service | |
chmod 644 /lib/systemd/system/stratux.service | |
ln -fs /lib/systemd/system/stratux.service /etc/systemd/system/multi-user.target.wants/stratux.service | |
##### Some device setup - copy files from image directory #### | |
cd /root/stratux/image | |
#motd | |
# cp -f motd /etc/motd | |
#rtl-sdr setup | |
cp -f rtl-sdr-blacklist.conf /etc/modprobe.d/ | |
#startup scripts | |
# cp -f rc.local /etc/rc.local | |
# Set hostname | |
# echo "stratux" > /etc/hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment