mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 18:37:41 +01:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
858648fc48 | ||
|
|
f281489a36 | ||
|
|
cc7094d2a0 | ||
|
|
53b73ea62e | ||
|
|
8f37c51b81 | ||
|
|
e7cbe6175e | ||
|
|
d556a8e36b | ||
|
|
e0d9f349fc | ||
|
|
422427d726 | ||
|
|
ab5b7eae06 | ||
|
|
4b47a9eef6 |
@@ -18,7 +18,7 @@ Specifications of the tested hardware: [hw_comparison.md](hw_comparison.md)
|
|||||||
All testers are welcome. Open an issue for your specific board to collaborate and share your experience.
|
All testers are welcome. Open an issue for your specific board to collaborate and share your experience.
|
||||||
|
|
||||||
---
|
---
|
||||||
## Armbian
|
## Armbian Stretch
|
||||||
Many SBC-s are supported:
|
Many SBC-s are supported:
|
||||||
https://www.armbian.com/download/
|
https://www.armbian.com/download/
|
||||||
|
|
||||||
@@ -40,12 +40,13 @@ Continue with building the SDcard: https://github.com/rootzoll/raspiblitz#build-
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ubuntu
|
## Ubuntu Bionic
|
||||||
|
|
||||||
A common distro to be supplied by the manufacturer for various boards.
|
A common distro to be supplied by the manufacturer for various boards.
|
||||||
|
|
||||||
Tested on:
|
Tested on:
|
||||||
* Odroid XU4 with ubuntu-18.04.1-4.14-minimal image from https://de.eu.odroid.in/ubuntu_18.04lts/XU3_XU4_MC1_HC1_HC2
|
* Odroid XU4 with ubuntu-18.04.1-4.14-minimal image from https://de.eu.odroid.in/ubuntu_18.04lts/XU3_XU4_MC1_HC1_HC2
|
||||||
|
* Nvidia Jetson Nano with Ubuntu Bionic image from https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write
|
||||||
|
|
||||||
Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ isDietPi=$(uname -n | grep -c 'DietPi')
|
|||||||
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||||
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')
|
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')
|
||||||
isUbuntu=$(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu')
|
isUbuntu=$(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu')
|
||||||
|
isNvidia=$(uname -a | grep -c 'tegra')
|
||||||
if [ ${isRaspbian} -gt 0 ]; then
|
if [ ${isRaspbian} -gt 0 ]; then
|
||||||
baseImage="raspbian"
|
baseImage="raspbian"
|
||||||
fi
|
fi
|
||||||
@@ -148,6 +149,12 @@ if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then
|
|||||||
sudo adduser pi sudo
|
sudo adduser pi sudo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# special prepare when Nvidia Jetson Nano
|
||||||
|
if [ ${isNvidia} -eq 1 ] ; then
|
||||||
|
# disable GUI on boot
|
||||||
|
sudo systemctl set-default multi-user.target
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** CONFIG ***"
|
echo "*** CONFIG ***"
|
||||||
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#raspi-config
|
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#raspi-config
|
||||||
@@ -278,6 +285,7 @@ sudo -H pip3 install redis
|
|||||||
# check for dependencies on DietPi, Ubuntu, Armbian
|
# check for dependencies on DietPi, Ubuntu, Armbian
|
||||||
sudo apt-get install -y build-essential
|
sudo apt-get install -y build-essential
|
||||||
sudo apt-get install -y python-pip
|
sudo apt-get install -y python-pip
|
||||||
|
sudo apt-get install -y python-dev
|
||||||
# rsync is needed to copy from HDD
|
# rsync is needed to copy from HDD
|
||||||
sudo apt install -y rsync
|
sudo apt install -y rsync
|
||||||
# install ifconfig
|
# install ifconfig
|
||||||
@@ -293,6 +301,7 @@ sudo apt install -y openssh-client
|
|||||||
sudo apt install -y openssh-sftp-server
|
sudo apt install -y openssh-sftp-server
|
||||||
# install killall, fuser
|
# install killall, fuser
|
||||||
sudo apt-get install -y psmisc
|
sudo apt-get install -y psmisc
|
||||||
|
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
sudo apt-get -y autoremove
|
sudo apt-get -y autoremove
|
||||||
|
|
||||||
@@ -569,7 +578,8 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
|
|||||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
|
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
|
||||||
echo "to switch between python2/3: sudo update-alternatives --config python"
|
echo "to switch between python2/3: sudo update-alternatives --config python"
|
||||||
sudo apt-get -f -y install virtualenv
|
sudo apt-get -f -y install virtualenv
|
||||||
sudo -u admin bash -c "cd; sudo virtualenv python-env-lnd; source /home/admin/python-env-lnd/bin/activate; sudo pip install grpcio grpcio-tools googleapis-common-protos pathlib2"
|
sudo chown -R admin /home/admin
|
||||||
|
sudo -u admin bash -c "cd; virtualenv python-env-lnd; source /home/admin/python-env-lnd/bin/activate; pip install grpcio grpcio-tools googleapis-common-protos pathlib2"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# "*** Installing Go ***"
|
# "*** Installing Go ***"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ if [ ${hddExists} -eq 0 ]; then
|
|||||||
echo "Press ENTER to create a Partition - or CTRL+C to abort"
|
echo "Press ENTER to create a Partition - or CTRL+C to abort"
|
||||||
read key
|
read key
|
||||||
echo "Creating Partition ..."
|
echo "Creating Partition ..."
|
||||||
|
sudo parted -s /dev/sda mklabel msdos
|
||||||
sudo parted -s /dev/sda unit s mkpart primary `sudo parted /dev/sda unit s print free | grep 'Free Space' | tail -n 1`
|
sudo parted -s /dev/sda unit s mkpart primary `sudo parted /dev/sda unit s print free | grep 'Free Space' | tail -n 1`
|
||||||
echo "DONE."
|
echo "DONE."
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ if [ "${baseImage}" = "raspbian" ] ; then
|
|||||||
sed -i "s/^state=.*/state=stresstest/g" ${infoFile}
|
sed -i "s/^state=.*/state=stresstest/g" ${infoFile}
|
||||||
sed -i "s/^message=.*/message='Testing Hardware 60s'/g" ${infoFile}
|
sed -i "s/^message=.*/message='Testing Hardware 60s'/g" ${infoFile}
|
||||||
sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.report
|
sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.report
|
||||||
|
fi
|
||||||
|
|
||||||
echo "DONE BOOTSTRAP" >> $logFile
|
echo "DONE BOOTSTRAP" >> $logFile
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||||
|
if [ ${isRaspbian} -eq 0 ]; then
|
||||||
|
echo "the OS is not Raspbian - the stresstest is only for the Raspberry Pi"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Based on https://github.com/bamarni/pi64/issues/4#issuecomment-292707581
|
# Based on https://github.com/bamarni/pi64/issues/4#issuecomment-292707581
|
||||||
# sysbench manual: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf
|
# sysbench manual: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,33 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Detect Base Image ..."
|
||||||
|
baseImage="?"
|
||||||
|
isDietPi=$(uname -n | grep -c 'DietPi')
|
||||||
|
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||||
|
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')
|
||||||
|
isUbuntu=$(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu')
|
||||||
|
if [ ${isRaspbian} -gt 0 ]; then
|
||||||
|
baseImage="raspbian"
|
||||||
|
fi
|
||||||
|
if [ ${isArmbian} -gt 0 ]; then
|
||||||
|
baseImage="armbian"
|
||||||
|
fi
|
||||||
|
if [ ${isUbuntu} -gt 0 ]; then
|
||||||
|
baseImage="ubuntu"
|
||||||
|
fi
|
||||||
|
if [ ${isDietPi} -gt 0 ]; then
|
||||||
|
baseImage="dietpi"
|
||||||
|
fi
|
||||||
|
if [ "${baseImage}" = "?" ]; then
|
||||||
|
cat /etc/os-release 2>/dev/null
|
||||||
|
echo "!!! FAIL !!!"
|
||||||
|
echo "Base Image cannot be detected or is not supported."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "OK running ${baseImage}"
|
||||||
|
fi
|
||||||
|
|
||||||
# function: install keys & sources
|
# function: install keys & sources
|
||||||
prepareTorSources()
|
prepareTorSources()
|
||||||
{
|
{
|
||||||
@@ -29,8 +56,13 @@ prepareTorSources()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "*** Adding Tor Sources to sources.list ***"
|
echo "*** Adding Tor Sources to sources.list ***"
|
||||||
echo "deb https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
|
if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "armbian" ] || [ "${baseImage}" = "dietpi" ]; then
|
||||||
echo "deb-src https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
|
echo "deb https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
|
||||||
|
echo "deb-src https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
|
||||||
|
elif [ "${baseImage}" = "ubuntu" ]; then
|
||||||
|
echo "deb https://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list
|
||||||
|
echo "deb-src https://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list
|
||||||
|
fi
|
||||||
echo "OK"
|
echo "OK"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user