merged master
2
FAQ.md
|
@ -374,7 +374,7 @@ You dont need a LAN port on your laptop as long as you can connect over WLAN to
|
|||
## Is it possible to connect the Blitz over Wifi instead of using a LAN cable?
|
||||
|
||||
A LAN cable is recommended because it reduces a possible source of error on the network connection side. But how to setup WLAN when you dont have a LAN-Router/Switch available see here:
|
||||
https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#prepare-wifi
|
||||
https://stadicus.github.io/RaspiBolt/raspibolt_20_pi.html#prepare-wifi
|
||||
|
||||
## Can I directly connect the RaspiBlitz with my laptop?
|
||||
|
||||
|
|
13
README.md
|
@ -44,9 +44,15 @@ The RaspiBlitz is build from the following parts:
|
|||
|
||||
**All together under 160 USD / 140 EUR (depending on country & shop)**
|
||||
|
||||
## Amazon Shopping Lists
|
||||
### Buy a ready-2-go RaspiBlitz (Germany, EU and International)
|
||||
|
||||
These are the community currated shopping lists based on country:
|
||||
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardwareset for yourself or for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com) *(pay with Bitcoin/Lightning or with deprecated PayPal/CreditCard)*
|
||||
|
||||
*To list your local/national RaspiBlitz shop here or on raspiblitz.com, get in contact: christian@fulmo.org*
|
||||
|
||||
### International Shopping Lists (buy parts & build it yourself)
|
||||
|
||||
The cheapest way is to buy ans assemble the single parts yourself. These are the community currated shopping lists based on country:
|
||||
|
||||
* [Germany](shoppinglist_de.md) *(reference shopping list)*
|
||||
* [USA](shoppinglist_usa.md)
|
||||
|
@ -57,6 +63,7 @@ These are the community currated shopping lists based on country:
|
|||
* [China](shoppinglist_cn.md)
|
||||
* [Australia](shoppinglist_au.md)
|
||||
* [Czech](shoppinglist_cz.md)
|
||||
* [Italy](shoppinglist_it.md)
|
||||
|
||||
*You can even pay your RaspiBlitz Amazon Shopping with Bitcoin & Lightning thru [Bitrefill](https://blog.bitrefill.com/its-here-buy-amazon-vouchers-with-bitcoin-on-bitrefill-bb2a4449724a).*
|
||||
|
||||
|
@ -120,6 +127,8 @@ Now open up a terminal ([OSX](https://www.youtube.com/watch?v=5XgBd6rjuDQ)/[Win1
|
|||
|
||||
## Support
|
||||
|
||||
Get get help on RaspiBlitz setup and to exchange on how to best manage/run your node - try the community managed telegram group: https://t.me/raspiblitz
|
||||
|
||||
If you run into a problem or you have still a question, follow the steps below to get support. Also check the [setup documentation](#setup-process-detailed-documentation) for details.
|
||||
|
||||
1. Lookup the [FAQ](FAQ.md) if you can find an answere to this question/problem.
|
||||
|
|
|
@ -121,6 +121,8 @@ See the shopping list on the RaspiBlitz Github README - you need to buy all of t
|
|||
|
||||
From experience start ordering two weeks before the workshop (if you need to assembly) and minimum one week if you handing out hardware kits - even if you have Amazon Prime. There is always a shipment comming late - its a lot of packages.
|
||||
|
||||
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardwareset for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
|
||||
|
||||
## Instruct Participants to bring Hardware
|
||||
|
||||
If you run the scenario of people bringing their own hardware. Make sure to let them know at least a week before the event so that there is enough time for online ordering. Also make sure that especially the power supply needs to provide 3A and a stable current (big fat with a thick cable is good) - because thats the most often error source if people just reuse some old weak power supply.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ⚡️ Alternative platforms for the RaspiBlitz ⚡️
|
||||
|
||||
Minimum requirements:
|
||||
* ARM V7 or V8 processor architecture (32 or 64 bit)
|
||||
* ARMv7, ARMv8 or x86 processor (32 or 64 bit)
|
||||
* 1 GB RAM
|
||||
* \> 300 GB HDD
|
||||
|
||||
|
@ -30,7 +30,7 @@ Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
|||
|
||||
Assemble and boot.
|
||||
|
||||
`ssh root@192.168.1.122`
|
||||
`ssh root@192.168.x.x`
|
||||
|
||||
password: 1234
|
||||
|
||||
|
@ -51,7 +51,7 @@ Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
|||
|
||||
Assemble and boot.
|
||||
|
||||
`ssh root@192.168.1.122`
|
||||
`ssh root@192.168.x.x`
|
||||
|
||||
password: odroid
|
||||
|
||||
|
@ -86,7 +86,7 @@ Tested on:
|
|||
|
||||
The HDMI screen tested: https://www.aliexpress.com/item/3-5-inch-LCD-HDMI-USB-Touch-Screen-Real-HD-1920x1080-LCD-Display-Py-for-Raspberri/32818537950.html
|
||||
|
||||
Detailed instructions for the RaspiBlitz-on-DietPi: [/dietpi/README.md](/dietpi/README.md)
|
||||
Detailed instructions for the RaspiBlitz-on-DietPi: [alternative.platforms/dietpi/README.md](/alternative.platforms/dietpi/README.md)
|
||||
|
||||
---
|
||||
Extras for advanced users and powerful hardware:
|
||||
|
|
|
@ -34,13 +34,13 @@ The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootz
|
|||
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z
|
||||
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/)
|
||||
|
||||
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh)
|
||||
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
|
||||
|
||||
4) Copy them to the /boot directory of the DietPi SDcard
|
||||
|
||||
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/dev/dietpi#excerpts-from-the-customized-dietpitxt))
|
||||
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/master/alternative.platforms/dietpi#excerpts-from-the-customized-dietpitxt))
|
||||
|
||||
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
|
||||
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
|
||||
(Optionally open the file with a text editor and uncomment (remove the `#` from the front of) the line with the branch you want to build the SDcard from.)
|
||||
|
||||
5) Assemble and boot the Odroid
|
||||
|
@ -133,14 +133,14 @@ Changing the SSH server will change the SSH keys again. To clear:
|
|||
|
||||
### Run the RaspiBlitz build_sdcard.sh script
|
||||
|
||||
* Format of the command to build the SDcard:
|
||||
* Run this command to build from the master branch of @rootzoll:
|
||||
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh`
|
||||
This will take a couple minutes depending on your internet ceonnection and the processing power of the SBC.
|
||||
|
||||
* Format of the command to build the SDcard from an alternative branch:
|
||||
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]`
|
||||
If you are working from a forked repo be aware of that the fork needs to be called `raspiblitz` for the git downloads to work.
|
||||
|
||||
* Example: run from the dev branch @rootzoll:
|
||||
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev rootzoll`
|
||||
This will take a couple minutes depending on your internet ceonnection and the processing power of the SBC.
|
||||
|
||||
* Restart when done and log back in now as `admin`:
|
||||
`ssh admin@[IP-OF-DROIDBLITZ]`
|
||||
password: `raspiblitz`
|
|
@ -18,7 +18,7 @@ The HDMI screen tested: https://www.aliexpress.com/item/3-5-inch-LCD-HDMI-USB-To
|
|||
|
||||
[Raspberry Pi](RaspberryPi.md)
|
||||
|
||||
[Display install script](dietpi.display.sh)
|
||||
[Display install script](/alternative.platforms/display.alternatives.sh)
|
||||
|
||||
---
|
||||
|
||||
|
@ -91,7 +91,7 @@ During the RaspiBlitz setup process:
|
|||
|
||||
---
|
||||
|
||||
## Excerpts from the [customized dietpi.txt](/dietpi/boot/dietpi.txt)
|
||||
## Excerpts from the [customized dietpi.txt]/alternative.platforms/dietpi/boot/dietpi.txt)
|
||||
to be used for a fully automatic SDcard building process.
|
||||
|
||||
### Automate installation with the dietpi.txt
|
||||
|
@ -129,7 +129,7 @@ Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be
|
|||
Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh, it will be downloaded and executed automatically. | 0=disabled
|
||||
NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log
|
||||
|
||||
Find the Automation_Custom_Script.sh loaded with the build_sdcard.sh [here](/dietpi/boot/Automation_Custom_Script.sh)
|
||||
Find the Automation_Custom_Script.sh loaded with the build_sdcard.sh [here]/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
|
||||
|
||||
---
|
||||
## Guide to clone your SD-cards in Windows, MacOS and Linux and shrink the image in Linux:
|
|
@ -8,13 +8,13 @@ https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Stretch.7z
|
|||
|
||||
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/)
|
||||
|
||||
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh)
|
||||
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
|
||||
|
||||
4) Copy them to the /boot directory of the DietPi SDcard
|
||||
|
||||
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/dev/dietpi#excerpts-from-the-customized-dietpitxt))
|
||||
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/master/alternative.platforms/dietpi#excerpts-from-the-customized-dietpitxt))
|
||||
|
||||
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
|
||||
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
|
||||
(Optionally open the file with a text editor and uncomment (remove the `#` from the front of) the line with the branch you want to build the SDcard from.)
|
||||
|
||||
5) Assemble and boot the Raspberry Pi
|
||||
|
@ -37,4 +37,4 @@ password: `raspiblitz`
|
|||
|
||||
---
|
||||
### To build manually:
|
||||
[Follow the generic DietPi install process.](https://github.com/rootzoll/raspiblitz/tree/dev/dietpi#general-guide-for-the-raspiblitz-on-dietpi)
|
||||
[Follow the generic DietPi install process.](https://github.com/rootzoll/raspiblitz/tree/master/alternative.platforms/dietpi#general-guide-for-the-raspiblitz-on-dietpi)
|
|
@ -5,10 +5,10 @@
|
|||
# Uncomment the line with the branch you want to build the SDcard from:
|
||||
|
||||
# @rootzoll master branch:
|
||||
# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh
|
||||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh
|
||||
|
||||
# @rootzoll dev branch:
|
||||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev
|
||||
# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev
|
||||
|
||||
# @openoms DietPi branch:
|
||||
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/build_sdcard.sh && sudo bash build_sdcard.sh DietPi openoms
|
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 3.2 MiB |
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
137
alternative.platforms/display.alternatives.sh
Normal file
|
@ -0,0 +1,137 @@
|
|||
# To run this script on your RaspiBlitz, copy the following line to the ssh terminal (after the #):
|
||||
# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/display.alternatives.sh && sudo bash display.alternatives.sh
|
||||
|
||||
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
|
||||
|
||||
|
||||
OPTIONS=(GPIO "Install the default display available from Amazon" \
|
||||
HDMI "Install the 3.5\" HDMI display from Aliexpress" \
|
||||
SWISS "Install the Swiss version from play-zone.ch"
|
||||
)
|
||||
CHOICE=$(dialog --backtitle "RaspiBlitz - Display Install" --clear --title "Display Install" --menu "Choose a your diplay:" 10 70 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
if [ "${CHOICE}" = "GPIO" ]; then
|
||||
# *** RASPIBLITZ / LCD (at last - because makes a reboot) ***
|
||||
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
|
||||
# revert font change
|
||||
# based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/
|
||||
sudo sed -i 's/FONTFACE="TerminusBold"/FONTFACE="Fixed"/' /etc/default/console-setup
|
||||
sudo sed -i 's/FONTSIZE="12x24"/FONTSIZE="8x16"/' /etc/default/console-setup
|
||||
|
||||
cd /home/admin/
|
||||
rm -r LCD-show
|
||||
git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
sudo chown -R admin:admin LCD-show
|
||||
cd LCD-show/
|
||||
|
||||
if [ "${baseImage}" != "dietpi" ]; then
|
||||
echo "--> LCD DEFAULT"
|
||||
sudo apt-mark hold raspberrypi-bootloader
|
||||
sudo ./LCD35-show
|
||||
else
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
sudo mkdir /etc/X11/xorg.conf.d
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
|
||||
sudo cp -rf ./usr/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf
|
||||
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
|
||||
sudo cp ./usr/cmdline.txt /DietPi/
|
||||
sudo cp ./usr/inittab /etc/
|
||||
sudo cp ./boot/config-35.txt /DietPi/config.txt
|
||||
echo "***"
|
||||
echo "reboot with \`sudo reboot\` to make the LCD work"
|
||||
echo "***"
|
||||
exit
|
||||
fi
|
||||
|
||||
elif [ "${CHOICE}" = "HDMI" ]; then
|
||||
echo "Installing the 3.5\" HDMI display from Aliexpress"
|
||||
|
||||
# based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B
|
||||
rm -r LCD-show
|
||||
git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
cd LCD-show/
|
||||
#sudo ./MPI3508-show
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
|
||||
if [ "${baseImage}" != "dietpi" ]; then
|
||||
sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt
|
||||
sudo cp ./usr/cmdline.txt /boot/
|
||||
else
|
||||
sudo cp -rf ./boot/config-35-480X320.txt /DietPi/config.txt
|
||||
sudo cp ./usr/cmdline.txt /DietPi/
|
||||
fi
|
||||
sudo cp ./usr/inittab /etc/
|
||||
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
sudo mkdir -p /etc/X11/xorg.conf.d
|
||||
sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf
|
||||
# based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/
|
||||
sudo sed -i 's/FONTFACE="Fixed"/FONTFACE="TerminusBold"/' /etc/default/console-setup
|
||||
sudo sed -i 's/FONTSIZE="8x16"/FONTSIZE="12x24"/' /etc/default/console-setup
|
||||
echo "***"
|
||||
echo "reboot with \`sudo reboot\` to make the LCD work"
|
||||
echo "***"
|
||||
exit
|
||||
|
||||
elif [ "${CHOICE}" = "SWISS" ]; then
|
||||
# Download and install the driver
|
||||
# based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps
|
||||
echo "--> LCD ALTERNATIVE"
|
||||
if [ "${baseImage}" != "dietpi" ]; then
|
||||
cd /boot
|
||||
else
|
||||
cd /DietPi
|
||||
fi
|
||||
sudo wget http://www.raspberrypiwiki.com/download/RPI-HD-35-INCH-TFT/dt-blob-For-3B-plus.bin
|
||||
sudo mv dt-blob-For-3B-plus.bin dt-blob.bin
|
||||
cat <<EOF >> config.txt
|
||||
dtparam=spi=off
|
||||
dtparam=i2c_arm=off
|
||||
# Set screen size and any overscan required
|
||||
overscan_left=0
|
||||
overscan_right=0
|
||||
overscan_top=0
|
||||
overscan_bottom=0
|
||||
framebuffer_width=800
|
||||
framebuffer_height=480
|
||||
enable_dpi_lcd=1
|
||||
display_default_lcd=1
|
||||
dpi_group=2
|
||||
dpi_mode=87
|
||||
dpi_output_format=0x6f015
|
||||
# set up the size to 800x480
|
||||
hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6
|
||||
#rotate screen
|
||||
display_rotate=3
|
||||
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23
|
||||
fi
|
||||
EOF
|
||||
init 6
|
||||
fi
|
129
build_sdcard.sh
|
@ -41,12 +41,14 @@ echo ""
|
|||
echo "*** CHECK BASE IMAGE ***"
|
||||
|
||||
# armv7=32Bit , armv8=64Bit
|
||||
echo "Check if Linux ARM based ..."
|
||||
echo "Detect CPU architecture ..."
|
||||
isARM=$(uname -m | grep -c 'arm')
|
||||
isAARCH64=$(uname -m | grep -c 'aarch64')
|
||||
if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] ; then
|
||||
isX86_64=$(uname -m | grep -c 'x86_64')
|
||||
isX86_32=$(uname -m | grep -c 'i386\|i486\|i586\|i686\|i786')
|
||||
if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] && [ ${isX86_64} -eq 0 ] && [ ${isX86_32} -eq 0 ] ; then
|
||||
echo "!!! FAIL !!!"
|
||||
echo "Can only build on ARM or aarch64, not on:"
|
||||
echo "Can only build on ARM, aarch64, x86_64 or i386 not on:"
|
||||
uname -m
|
||||
exit 1
|
||||
else
|
||||
|
@ -338,24 +340,41 @@ sudo sed --in-place -i "23s/.*/session required pam_limits.so/" /etc/pam.d/commo
|
|||
sudo sed --in-place -i "25s/.*/session required pam_limits.so/" /etc/pam.d/common-session-noninteractive
|
||||
sudo bash -c "echo '# end of pam-auth-update config' >> /etc/pam.d/common-session-noninteractive"
|
||||
|
||||
echo ""
|
||||
echo "*** BITCOIN ***"
|
||||
# "*** BITCOIN ***"
|
||||
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_30_bitcoin.md#installation
|
||||
|
||||
# set version (change if update is available)
|
||||
# https://bitcoincore.org/en/download/
|
||||
# bitcoinVersion="0.18.0" # commented out checksums for this version until lnd version >0.5.1
|
||||
bitcoinVersion="0.17.1"
|
||||
|
||||
# set OS version
|
||||
# set OS version and checksum
|
||||
# needed to make sure download is not changed
|
||||
# calculate with sha256sum and also check with SHA256SUMS.asc
|
||||
# https://bitcoincore.org/bin/bitcoin-core-0.18.0/SHA256SUMS.asc
|
||||
if [ ${isARM} -eq 1 ] ; then
|
||||
bitcoinOSversion="arm-linux-gnueabihf"
|
||||
# needed to make sure download is not changed
|
||||
# calulate with sha256sum and also check with SHA256SUMS.asc
|
||||
# bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27"
|
||||
bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc"
|
||||
fi
|
||||
if [ ${isAARCH64} -eq 1 ] ; then
|
||||
bitcoinOSversion="aarch64-linux-gnu"
|
||||
# bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b"
|
||||
bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34"
|
||||
fi
|
||||
if [ ${isX86_64} -eq 1 ] ; then
|
||||
bitcoinOSversion="x86_64-linux-gnu"
|
||||
# bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f"
|
||||
bitcoinSHA256="53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17"
|
||||
fi
|
||||
if [ ${isX86_32} -eq 1 ] ; then
|
||||
bitcoinOSversion="i686-pc-linux-gnu"
|
||||
# bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b"
|
||||
bitcoinSHA256="b1e1dcf8265521fef9021a9d49d8661833e3f844ca9a410a9dd12a617553dda1"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "*** BITCOIN v${bitcoinVersion} for ${bitcoinOSversion} ***"
|
||||
|
||||
# needed to check code signing
|
||||
laanwjPGP="01EA5486DE18A882D4C2684590C8019E36C2E964"
|
||||
|
@ -427,51 +446,62 @@ if [ ${installed} -lt 1 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "*** LITECOIN ***"
|
||||
# based on https://medium.com/@jason.hcwong/litecoin-lightning-with-raspberry-pi-3-c3b931a82347
|
||||
if [ "${baseImage}" = "raspbian" ]; then
|
||||
echo ""
|
||||
echo "*** LITECOIN ***"
|
||||
# based on https://medium.com/@jason.hcwong/litecoin-lightning-with-raspberry-pi-3-c3b931a82347
|
||||
|
||||
# set version (change if update is available)
|
||||
litecoinVersion="0.16.3"
|
||||
litecoinSHA256="fc6897265594985c1d09978b377d51a01cc13ee144820ddc59fbb7078f122f99"
|
||||
cd /home/admin/download
|
||||
# set version (change if update is available)
|
||||
litecoinVersion="0.16.3"
|
||||
litecoinSHA256="fc6897265594985c1d09978b377d51a01cc13ee144820ddc59fbb7078f122f99"
|
||||
cd /home/admin/download
|
||||
|
||||
# download
|
||||
binaryName="litecoin-${litecoinVersion}-arm-linux-gnueabihf.tar.gz"
|
||||
sudo -u admin wget https://download.litecoin.org/litecoin-${litecoinVersion}/linux/${binaryName}
|
||||
# download
|
||||
binaryName="litecoin-${litecoinVersion}-arm-linux-gnueabihf.tar.gz"
|
||||
sudo -u admin wget https://download.litecoin.org/litecoin-${litecoinVersion}/linux/${binaryName}
|
||||
|
||||
# check download
|
||||
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
|
||||
if [ "${binaryChecksum}" != "${litecoinSHA256}" ]; then
|
||||
# check download
|
||||
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
|
||||
if [ "${binaryChecksum}" != "${litecoinSHA256}" ]; then
|
||||
echo "!!! FAIL !!! Downloaded LITECOIN BINARY not matching SHA256 checksum: ${litecoinSHA256}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# install
|
||||
sudo -u admin tar -xvf ${binaryName}
|
||||
sudo install -m 0755 -o root -g root -t /usr/local/bin litecoin-${litecoinVersion}/bin/*
|
||||
installed=$(sudo -u admin litecoind --version | grep "${litecoinVersion}" -c)
|
||||
if [ ${installed} -lt 1 ]; then
|
||||
# install
|
||||
sudo -u admin tar -xvf ${binaryName}
|
||||
sudo install -m 0755 -o root -g root -t /usr/local/bin litecoin-${litecoinVersion}/bin/*
|
||||
installed=$(sudo -u admin litecoind --version | grep "${litecoinVersion}" -c)
|
||||
if [ ${installed} -lt 1 ]; then
|
||||
echo ""
|
||||
echo "!!! BUILD FAILED --> Was not able to install litecoind version(${litecoinVersion})"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "*** LND ***"
|
||||
|
||||
# "*** LND ***"
|
||||
## based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md#lightning-lnd
|
||||
## see LND releases: https://github.com/lightningnetwork/lnd/releases
|
||||
lndVersion="0.6-beta"
|
||||
lndVersion="0.6.1-beta"
|
||||
|
||||
if [ ${isARM} -eq 1 ] ; then
|
||||
lndOSversion="armv7"
|
||||
lndSHA256="effea372c207293fd42b0cc27800da3a70c22f8c9a0e7b5eb8dbe56b5b98e1a3"
|
||||
lndSHA256="5541959c7fde98d76d88cc8070ca626c681ba38c44afcb85bf417a9a677e23c2"
|
||||
fi
|
||||
if [ ${isAARCH64} -eq 1 ] ; then
|
||||
lndOSversion="arm64"
|
||||
lndSHA256="2f31b13a4da6217ed7e27a44e1705103d7ed846aa2f599b7e5de0e6033a66c19"
|
||||
lndSHA256="d5f7280c324ebc1d322435a0eac4c42dca73ebc6a613878d9e0d33a68276da5c"
|
||||
fi
|
||||
if [ ${isX86_64} -eq 1 ] ; then
|
||||
lndOSversion="amd64"
|
||||
lndSHA256="c55367edb82955dc942baf9f48f79fadde1eee0e86c1d59d2fe1993140ec1b3f"
|
||||
fi
|
||||
if [ ${isX86_32} -eq 1 ] ; then
|
||||
lndOSversion="386"
|
||||
lndSHA256="00a7cd0ca657bb242b0f3acb5f4e26a13fd789946fab73c252118e3f89c1cf57"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "*** LND v${lndVersion} for ${lndOSversion} ***"
|
||||
|
||||
# olaoluwa
|
||||
PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
|
||||
|
@ -534,22 +564,41 @@ fi
|
|||
#
|
||||
echo ""
|
||||
echo "*** LND API for Python ***"
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 3
|
||||
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
|
||||
echo "to switch between python2/3: sudo update-alternatives --config python"
|
||||
sudo apt-get -f -y install virtualenv
|
||||
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"
|
||||
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"
|
||||
echo ""
|
||||
|
||||
# "*** Installing Go ***"
|
||||
# Go is needed for ZAP connect later
|
||||
echo "*** Installing Go ***"
|
||||
wget https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz
|
||||
if [ ! -f "./go1.11.linux-armv6l.tar.gz" ]
|
||||
# see https://golang.org/dl/
|
||||
goVersion="1.12.5"
|
||||
if [ ${isARM} -eq 1 ] ; then
|
||||
goOSversion="armv6l"
|
||||
fi
|
||||
if [ ${isAARCH64} -eq 1 ] ; then
|
||||
goOSversion="arm64"
|
||||
fi
|
||||
if [ ${isX86_64} -eq 1 ] ; then
|
||||
goOSversion="amd64"
|
||||
fi
|
||||
if [ ${isX86_32} -eq 1 ] ; then
|
||||
goOSversion="386"
|
||||
fi
|
||||
|
||||
echo "*** Installing Go v${goVersion} for ${goOSversion} ***"
|
||||
|
||||
# wget https://storage.googleapis.com/golang/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
wget https://dl.google.com/go/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
if [ ! -f "./go${goVersion}.linux-${goOSversion}.tar.gz" ]
|
||||
then
|
||||
echo "!!! FAIL !!! Download not success."
|
||||
exit 1
|
||||
fi
|
||||
sudo tar -C /usr/local -xzf go1.11.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
sudo rm *.gz
|
||||
sudo mkdir /usr/local/gocode
|
||||
sudo chmod 777 /usr/local/gocode
|
||||
|
|
|
@ -1,210 +0,0 @@
|
|||
# To run this script on your RaspiBlitz, copy the following line to the ssh terminal (after the #):
|
||||
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/dietpi/dietpi.display.sh && sudo chmod +x dietpi.display.sh && ./dietpi.display.sh
|
||||
|
||||
# keep in mind that DietPi for Raspberry is also a stripped down Raspbian
|
||||
echo "Detect Base Image ..."
|
||||
baseImage="?"
|
||||
isDietPi=$(uname -n | grep -c 'DietPi')
|
||||
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||
if [ ${isRaspbian} -gt 0 ]; then
|
||||
baseImage="raspbian"
|
||||
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
|
||||
|
||||
|
||||
if [ "${baseImage}" = "raspbian" ]; then
|
||||
echo "Press ENTER to install LCD and reboot ..."
|
||||
read key
|
||||
|
||||
# give Raspi a default hostname (optional)
|
||||
sudo raspi-config nonint do_hostname "RaspiBlitz"
|
||||
|
||||
# *** Display selection ***
|
||||
dialog --title "Display" --yesno "Are you using the default display available from Amazon?\nSelect 'No' if you are using the Swiss version from play-zone.ch!" 6 80
|
||||
defaultDisplay=$?
|
||||
|
||||
if [ "${defaultDisplay}" = "0" ]; then
|
||||
|
||||
# *** RASPIBLITZ / LCD (at last - because makes a reboot) ***
|
||||
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
|
||||
|
||||
echo "--> LCD DEFAULT"
|
||||
cd /home/admin/
|
||||
sudo apt-mark hold raspberrypi-bootloader
|
||||
git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
sudo chown -R admin:admin LCD-show
|
||||
cd LCD-show/
|
||||
sudo ./LCD35-show
|
||||
|
||||
else
|
||||
|
||||
# Download and install the driver
|
||||
# based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps
|
||||
|
||||
echo "--> LCD ALTERNATIVE"
|
||||
cd /boot
|
||||
sudo wget http://www.raspberrypiwiki.com/download/RPI-HD-35-INCH-TFT/dt-blob-For-3B-plus.bin
|
||||
sudo mv dt-blob-For-3B-plus.bin dt-blob.bin
|
||||
cat <<EOF >> config.txt
|
||||
|
||||
dtparam=spi=off
|
||||
dtparam=i2c_arm=off
|
||||
|
||||
# Set screen size and any overscan required
|
||||
overscan_left=0
|
||||
overscan_right=0
|
||||
overscan_top=0
|
||||
overscan_bottom=0
|
||||
framebuffer_width=800
|
||||
framebuffer_height=480
|
||||
|
||||
|
||||
enable_dpi_lcd=1
|
||||
display_default_lcd=1
|
||||
dpi_group=2
|
||||
dpi_mode=87
|
||||
dpi_output_format=0x6f015
|
||||
|
||||
# set up the size to 800x480
|
||||
hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6
|
||||
|
||||
#rotate screen
|
||||
display_rotate=3
|
||||
|
||||
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23
|
||||
fi
|
||||
EOF
|
||||
init 6
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "${baseImage}" = "dietpi" ]; then
|
||||
|
||||
OPTIONS=(GPIO "Install the default display available from Amazon" \
|
||||
HDMI "Install the 3.5\" HDMI display from Aliexpress" \
|
||||
SWISS "Install the Swiss version from play-zone.ch"
|
||||
)
|
||||
|
||||
CHOICE=$(dialog --backtitle "RaspiBlitz - Display Install" --clear --title "Display Install" --menu "Choose a your diplay:" 10 70 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
if [ "${CHOICE}" = "GPIO" ]; then
|
||||
echo "Installing the default display available from Amazon"
|
||||
|
||||
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
|
||||
cd /home/admin/
|
||||
#sudo apt-mark hold raspberrypi-bootloader
|
||||
git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
sudo chown -R admin:admin LCD-show
|
||||
cd LCD-show/
|
||||
# sudo ./LCD35-show
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
sudo mkdir /etc/X11/xorg.conf.d
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
|
||||
sudo cp -rf ./usr/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf
|
||||
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
|
||||
sudo cp ./usr/cmdline.txt /DietPi/
|
||||
sudo cp ./usr/inittab /etc/
|
||||
sudo cp ./boot/config-35.txt /DietPi/config.txt
|
||||
|
||||
# revert font change
|
||||
# based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/
|
||||
sudo sed -i 's/FONTFACE="TerminusBold"/FONTFACE="Fixed"/' /etc/default/console-setup
|
||||
sudo sed -i 's/FONTSIZE="12x24"/FONTSIZE="8x16"/' /etc/default/console-setup
|
||||
|
||||
echo "***"
|
||||
echo "reboot with \`sudo reboot\` to make the LCD work"
|
||||
echo "***"
|
||||
|
||||
exit
|
||||
|
||||
elif [ "${CHOICE}" = "HDMI" ]; then
|
||||
echo "Installing the 3.5\" HDMI display from Aliexpress"
|
||||
|
||||
# based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B
|
||||
git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
cd LCD-show/
|
||||
#sudo ./MPI3508-show
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
sudo cp -rf ./boot/config-35-480X320.txt /DietPi/config.txt
|
||||
sudo cp ./usr/cmdline.txt /DietPi/
|
||||
sudo cp ./usr/inittab /etc/
|
||||
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
sudo mkdir -p /etc/X11/xorg.conf.d
|
||||
sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf
|
||||
|
||||
# based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/
|
||||
sudo sed -i 's/FONTFACE="Fixed"/FONTFACE="TerminusBold"/' /etc/default/console-setup
|
||||
sudo sed -i 's/FONTSIZE="8x16"/FONTSIZE="12x24"/' /etc/default/console-setup
|
||||
|
||||
echo "***"
|
||||
echo "reboot with \`sudo reboot\` to make the LCD work"
|
||||
echo "***"
|
||||
|
||||
exit
|
||||
|
||||
elif [ "${CHOICE}" = "SWISS" ]; then
|
||||
|
||||
# Download and install the driver
|
||||
# based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps
|
||||
|
||||
echo "--> LCD ALTERNATIVE"
|
||||
|
||||
# revert font change
|
||||
# based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/
|
||||
sudo sed -i 's/FONTFACE="TerminusBold"/FONTFACE="Fixed"/' /etc/default/console-setup
|
||||
sudo sed -i 's/FONTSIZE="12x24"/FONTSIZE="8x16"/' /etc/default/console-setup
|
||||
|
||||
cd /DietPi
|
||||
sudo wget http://www.raspberrypiwiki.com/download/RPI-HD-35-INCH-TFT/dt-blob-For-3B-plus.bin
|
||||
sudo mv dt-blob-For-3B-plus.bin dt-blob.bin
|
||||
cat <<EOF >> config.txt
|
||||
|
||||
dtparam=spi=off
|
||||
dtparam=i2c_arm=off
|
||||
|
||||
# Set screen size and any overscan required
|
||||
overscan_left=0
|
||||
overscan_right=0
|
||||
overscan_top=0
|
||||
overscan_bottom=0
|
||||
framebuffer_width=800
|
||||
framebuffer_height=480
|
||||
|
||||
|
||||
enable_dpi_lcd=1
|
||||
display_default_lcd=1
|
||||
dpi_group=2
|
||||
dpi_mode=87
|
||||
dpi_output_format=0x6f015
|
||||
|
||||
# set up the size to 800x480
|
||||
hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6
|
||||
|
||||
#rotate screen
|
||||
display_rotate=3
|
||||
|
||||
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23
|
||||
fi
|
||||
EOF
|
||||
init 6
|
||||
fi
|
||||
|
||||
else
|
||||
echo "CANCEL"
|
||||
exit
|
||||
fi
|
|
@ -49,8 +49,11 @@ lnd_macaroon_dir="/home/bitcoin/.lnd/data/chain/${network}/${chain}net"
|
|||
# get uptime & load
|
||||
load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)
|
||||
|
||||
# get CPU temp
|
||||
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
# get CPU temp - no measurement in a VM
|
||||
cpu=0
|
||||
if [ -d "/sys/class/thermal/thermal_zone0/" ]; then
|
||||
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
fi
|
||||
tempC=$((cpu/1000))
|
||||
tempF=$(((cpu/1000) * (9/5) + 32))
|
||||
|
||||
|
@ -75,9 +78,9 @@ else
|
|||
fi
|
||||
|
||||
# get network traffic
|
||||
# ifconfig does not show eth0 on Armbian - get first traffic info
|
||||
# ifconfig does not show eth0 on Armbian or in a VM - get first traffic info
|
||||
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')
|
||||
if [ ${isArmbian} -gt 0 ]; then
|
||||
if [ ${isArmbian} -gt 0 ] || [ ! -d "/sys/class/thermal/thermal_zone0/" ]; then
|
||||
network_rx=$(ifconfig | grep -m1 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
||||
network_tx=$(ifconfig | grep -m1 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
||||
else
|
||||
|
@ -305,7 +308,7 @@ ${color_yellow} ${color_amber}%s ${color_green} ${ln_alias}
|
|||
${color_yellow} ${color_gray}${network} Fullnode + Lightning Network ${torInfo}
|
||||
${color_yellow} ,/ ${color_yellow}%s
|
||||
${color_yellow} ,'/ ${color_gray}%s, temp %s°C %s°F
|
||||
${color_yellow} ,' / ${color_gray}Free Mem ${color_ram}${ram} ${color_gray} Free HDD ${color_hdd}%s
|
||||
${color_yellow} ,' / ${color_gray}Free Mem ${color_ram}${ram} ${color_gray} Free HDD ${color_hdd}%s${color_gray}
|
||||
${color_yellow} ,' /_____, ${color_gray}ssh admin@${color_green}${local_ip}${color_gray} ▼${network_rx} ▲${network_tx}
|
||||
${color_yellow} .'____ ,' ${color_gray}${webinterfaceInfo}
|
||||
${color_yellow} / ,' ${color_gray}${network} ${color_green}${networkVersion} ${chain}net ${color_gray}Sync ${sync_color}${sync} %s${torrentBaseStatus}${torrentUpdateStatus}
|
||||
|
|
|
@ -314,7 +314,8 @@ if [ ${setupStep} -eq 0 ]; then
|
|||
HEIGHT=11
|
||||
|
||||
else
|
||||
|
||||
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||
if [ ${isRaspbian} -gt 0 ]; then
|
||||
# show hardware test
|
||||
/home/admin/05hardwareTest.sh
|
||||
|
||||
|
@ -325,7 +326,14 @@ if [ ${setupStep} -eq 0 ]; then
|
|||
OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)" \
|
||||
LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" )
|
||||
HEIGHT=11
|
||||
|
||||
else
|
||||
# start setup
|
||||
BACKTITLE="RaspiBlitz - Setup"
|
||||
TITLE="⚡ Welcome to your RaspiBlitz ⚡"
|
||||
MENU="\nStart to setup your RaspiBlitz: \n "
|
||||
OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning")
|
||||
HEIGHT=10
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ ${setupStep} -lt 100 ]; then
|
||||
|
|
|
@ -14,19 +14,25 @@ if [ ${existsHDD} -eq 1 ]; then
|
|||
|
||||
# check if there is s sda2
|
||||
existsHDD2=$(lsblk | grep -c sda2)
|
||||
if [ ${existsHDD2} -eq 1 ]; then
|
||||
echo "OK - HDD found at sda2 ... determine which is bigger"
|
||||
hddSecondDriveExists=$(lsblk | grep -c sdb)
|
||||
if [ ${existsHDD2} -eq 1 ] || [ ${hddSecondDriveExists} -eq 1 ] ; then
|
||||
echo "OK - another HDD found at sdb ... determine which is bigger"
|
||||
|
||||
# get both with size
|
||||
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||
echo "sda1(${size1})"
|
||||
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||
echo "sda2(${size2})"
|
||||
size3=$(lsblk -o NAME,SIZE -b | grep "sdb" | awk '{ print substr( $0, 8, length($0)-2 ) }' | xargs)
|
||||
echo "sdb(${size3})"
|
||||
|
||||
# chosse to run with the bigger one
|
||||
# choose to run with the bigger one
|
||||
if [ ${size2} -gt ${size1} ]; then
|
||||
echo "sda2 is BIGGER - run with this one"
|
||||
device="sda2"
|
||||
elif [ ${size3} -gt ${size1} ]; then
|
||||
echo "sdb is BIGGER - run with this one"
|
||||
device="sdb"
|
||||
else
|
||||
echo "sda1 is BIGGER - run with this one"
|
||||
fi
|
||||
|
|
|
@ -6,8 +6,8 @@ echo "Creating the command lnbalance as well as lnchannels which will give you a
|
|||
cd
|
||||
mkdir /home/admin/tmpScriptDL
|
||||
cd /home/admin/tmpScriptDL
|
||||
wget https://raw.githubusercontent.com/Stadicus/guides/master/raspibolt/resources/lnbalance
|
||||
wget https://raw.githubusercontent.com/Stadicus/guides/master/raspibolt/resources/lnchannels
|
||||
wget https://stadicus.github.io/RaspiBolt/resources/lnbalance
|
||||
wget https://stadicus.github.io/RaspiBolt/resources/lnchannels
|
||||
chmod +x lnbalance
|
||||
chmod +x lnchannels
|
||||
sudo cp lnchannels /usr/local/bin
|
||||
|
|
|
@ -32,12 +32,37 @@ goVersion="1.11"
|
|||
echo "### Check Framework: GO ###"
|
||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||
if [ ${goInstalled} -eq 0 ];then
|
||||
echo "---> Installing GO"
|
||||
wget https://storage.googleapis.com/golang/go${goVersion}.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go${goVersion}.linux-armv6l.tar.gz
|
||||
goVersion="1.12.5"
|
||||
if [ ${isARM} -eq 1 ] ; then
|
||||
goOSversion="armv6l"
|
||||
fi
|
||||
if [ ${isAARCH64} -eq 1 ] ; then
|
||||
goOSversion="arm64"
|
||||
fi
|
||||
if [ ${isX86_64} -eq 1 ] ; then
|
||||
goOSversion="amd64"
|
||||
fi
|
||||
if [ ${isX86_32} -eq 1 ] ; then
|
||||
goOSversion="386"
|
||||
fi
|
||||
|
||||
echo "*** Installing Go v${goVersion} for ${goOSversion} ***"
|
||||
|
||||
# wget https://storage.googleapis.com/golang/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
wget https://dl.google.com/go/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
if [ ! -f "./go${goVersion}.linux-${goOSversion}.tar.gz" ]
|
||||
then
|
||||
echo "!!! FAIL !!! Download not success."
|
||||
exit 1
|
||||
fi
|
||||
sudo tar -C /usr/local -xzf go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
sudo rm *.gz
|
||||
sudo mkdir /usr/local/gocode
|
||||
sudo chmod 777 /usr/local/gocode
|
||||
export GOROOT=/usr/local/go
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
export GOPATH=/usr/local/gocode
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||
fi
|
||||
if [ ${goInstalled} -eq 0 ];then
|
||||
|
|
|
@ -17,12 +17,37 @@ fi
|
|||
# make sure go is installed
|
||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||
if [ ${goInstalled} -eq 0 ];then
|
||||
echo "### Installing GO ###"
|
||||
wget https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go1.11.linux-armv6l.tar.gz
|
||||
goVersion="1.12.5"
|
||||
if [ ${isARM} -eq 1 ] ; then
|
||||
goOSversion="armv6l"
|
||||
fi
|
||||
if [ ${isAARCH64} -eq 1 ] ; then
|
||||
goOSversion="arm64"
|
||||
fi
|
||||
if [ ${isX86_64} -eq 1 ] ; then
|
||||
goOSversion="amd64"
|
||||
fi
|
||||
if [ ${isX86_32} -eq 1 ] ; then
|
||||
goOSversion="386"
|
||||
fi
|
||||
|
||||
echo "*** Installing Go v${goVersion} for ${goOSversion} ***"
|
||||
|
||||
# wget https://storage.googleapis.com/golang/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
wget https://dl.google.com/go/go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
if [ ! -f "./go${goVersion}.linux-${goOSversion}.tar.gz" ]
|
||||
then
|
||||
echo "!!! FAIL !!! Download not success."
|
||||
exit 1
|
||||
fi
|
||||
sudo tar -C /usr/local -xzf go${goVersion}.linux-${goOSversion}.tar.gz
|
||||
sudo rm *.gz
|
||||
sudo mkdir /usr/local/gocode
|
||||
sudo chmod 777 /usr/local/gocode
|
||||
export GOROOT=/usr/local/go
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
export GOPATH=/usr/local/gocode
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||
fi
|
||||
if [ ${goInstalled} -eq 0 ];then
|
||||
|
|
|
@ -148,17 +148,23 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
|||
# detect for correct device name (the biggest partition)
|
||||
hddDeviceName="sda1"
|
||||
hddSecondPartitionExists=$(lsblk | grep -c sda2)
|
||||
if [ ${hddSecondPartitionExists} -eq 1 ]; then
|
||||
hddSecondDriveExists=$(lsblk | grep -c sdb)
|
||||
if [ ${hddSecondPartitionExists} -eq 1 ] || [ ${hddSecondDriveExists} -eq 1 ] ; then
|
||||
echo "HDD has a second partition - choosing the bigger one ..." >> $logFile
|
||||
# get both with size
|
||||
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||
echo "sda1(${size1})" >> $logFile
|
||||
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||
echo "sda2(${size2})" >> $logFile
|
||||
# chosse to run with the bigger one
|
||||
size3=$(lsblk -o NAME,SIZE -b | grep "sdb" | awk '{ print substr( $0, 8, length($0)-2 ) }' | xargs)
|
||||
echo "sdb(${size3})" >> $logFile
|
||||
# choose to run with the bigger one
|
||||
if [ ${size2} -gt ${size1} ]; then
|
||||
echo "sda2 is BIGGER - run with this one" >> $logFile
|
||||
hddDeviceName="sda2"
|
||||
elif [ ${size3} -gt ${size1} ]; then
|
||||
echo "sdb is BIGGER - run with this one" >> $logFile
|
||||
hddDeviceName="sdb"
|
||||
else
|
||||
echo "sda1 is BIGGER - run with this one" >> $logFile
|
||||
hddDeviceName="sda1"
|
||||
|
@ -469,13 +475,38 @@ sudo rm /mnt/hdd/${network}/debug.log 2>/dev/null
|
|||
sudo rm /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null
|
||||
|
||||
################################
|
||||
# STRESSTEST HARDWARE
|
||||
# RECORD BASEIMAGE
|
||||
################################
|
||||
|
||||
# generate stresstest report on every startup (in case hardware has changed)
|
||||
sed -i "s/^state=.*/state=stresstest/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Testing Hardware 60s'/g" ${infoFile}
|
||||
sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.report
|
||||
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
|
||||
echo "baseimage=${baseImage}" >> $infoFile
|
||||
|
||||
echo "DONE BOOTSTRAP" >> $logFile
|
||||
exit 0
|
||||
################################
|
||||
# STRESSTEST RASPBERRY PI
|
||||
################################
|
||||
|
||||
if [ "${baseImage}" = "raspbian" ] ; then
|
||||
# generate stresstest report on every startup (in case hardware has changed)
|
||||
sed -i "s/^state=.*/state=stresstest/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Testing Hardware 60s'/g" ${infoFile}
|
||||
sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.report
|
||||
|
||||
echo "DONE BOOTSTRAP" >> $logFile
|
||||
exit 0
|
||||
fi
|
|
@ -20,9 +20,12 @@ sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
|
|||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
echo "localIP='${localip}'"
|
||||
|
||||
# temp
|
||||
tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc)
|
||||
echo "tempCelsius='${tempC}'"
|
||||
# temp - no measurement in a VM
|
||||
tempC=0
|
||||
if [ -d "/sys/class/thermal/thermal_zone0/" ]; then
|
||||
tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc)
|
||||
echo "tempCelsius='${tempC}'"
|
||||
fi
|
||||
|
||||
# uptime in seconds
|
||||
uptime=$(awk '{printf("%d\n",$1 + 0.5)}' /proc/uptime)
|
||||
|
|
|
@ -51,7 +51,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
echo "*** Get the RTL Source Code ***"
|
||||
git clone https://github.com/ShahanaFarooqui/RTL.git
|
||||
cd RTL
|
||||
git reset --hard v0.2.16
|
||||
git reset --hard v0.3.2
|
||||
# check if node_modles exists now
|
||||
if [ -d "/home/admin/RTL" ]; then
|
||||
echo "OK - RTL code copy looks good"
|
||||
|
|
|
@ -5,8 +5,10 @@ See the reference [German Shoppinglist](shoppinglist_de.md) for all the latest p
|
|||
|
||||
- RaspBerry Pi 3: https://www.alza.cz/raspberry-pi-3-model-b-d5284636.htm?o=1
|
||||
- Micro SD-Card 32GB: https://www.alza.cz/EN/samsung-microsdhc-32gb-pro-endurance-uhs-i-u1-sd-adapter-d5339757.htm
|
||||
- Power: https://www.alza.cz/EN/alzapower-q100-quick-charge-3-0-black-d5324257.htm?o=2
|
||||
- Power: https://www.alza.cz/EN/raspberry-pi-2-5a-d4191252.htm
|
||||
- maybe you need an micro usb cable
|
||||
- 1TB Hard Drive: https://www.czc.cz/toshiba-canvio-basics-1tb-cerna/235949/produkt?gclid=EAIaIQobChMIgpLF5Mac3gIVCM53Ch3D9QWpEAQYAyABEgK-ZfD_BwE
|
||||
- Case: https://www.alza.cz/EN/raspberry-pi-black-d3837597.htm?o=1
|
||||
- LCD-Display (delivered to Czech Republic): https://www.amazon.com/dp/B01N3JROH8/ref=cm_sw_r_cp_ep_dp_-gOuBb2Q6T0C5
|
||||
|
||||
*The Power Supply was tested by one user - if it shows sonstant power issues on your hardware and aou find a better more stable one, please make a PullRequest. Thx.*
|
||||
|
|
10
shoppinglist_it.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
## Shopping List: Amazon Italy
|
||||
|
||||
* RaspBerry Pi 3: https://www.amazon.it/dp/B07BDR5PDW/
|
||||
* Micro SD-Card 32GB: https://www.amazon.it/dp/B07CY3QSST
|
||||
* Power: https://www.amazon.it/dp/B01566WOAG
|
||||
* 1TB Hard Drive: https://www.amazon.it/dp/B07997KKSK
|
||||
* Heatsink-Case: https://www.amazon.it/dp/B07KYCNF1D
|
||||
* LCD-Display: https://www.amazon.it/dp/B06ZZBL1C4
|
||||
|
||||
*The listed Power Supply showed on testing sometimes some udervoltages - if you find a better Power Supply (like on the german shopping list) on the italian Amazon, please send a PullRequest to improve this shoppingl list. Thx.*
|