Merge pull request #597 from openoms/x86v1.2
update lnd to v0.6.1-beta, introduce x86_64 and _32 compatibility, update RTL and Go, fixes for running in a Virtual Machine
|
@ -1,7 +1,7 @@
|
||||||
# ⚡️ Alternative platforms for the RaspiBlitz ⚡️
|
# ⚡️ Alternative platforms for the RaspiBlitz ⚡️
|
||||||
|
|
||||||
Minimum requirements:
|
Minimum requirements:
|
||||||
* ARM V7 or V8 processor architecture (32 or 64 bit)
|
* ARMv7, ARMv8 or x86 processor (32 or 64 bit)
|
||||||
* 1 GB RAM
|
* 1 GB RAM
|
||||||
* \> 300 GB HDD
|
* \> 300 GB HDD
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
||||||
|
|
||||||
Assemble and boot.
|
Assemble and boot.
|
||||||
|
|
||||||
`ssh root@192.168.1.122`
|
`ssh root@192.168.x.x`
|
||||||
|
|
||||||
password: 1234
|
password: 1234
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
|
||||||
|
|
||||||
Assemble and boot.
|
Assemble and boot.
|
||||||
|
|
||||||
`ssh root@192.168.1.122`
|
`ssh root@192.168.x.x`
|
||||||
|
|
||||||
password: odroid
|
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
|
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:
|
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
|
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z
|
||||||
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/)
|
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
|
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.)
|
(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
|
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
|
### 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]`
|
`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.
|
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`:
|
* Restart when done and log back in now as `admin`:
|
||||||
`ssh admin@[IP-OF-DROIDBLITZ]`
|
`ssh admin@[IP-OF-DROIDBLITZ]`
|
||||||
password: `raspiblitz`
|
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)
|
[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.
|
to be used for a fully automatic SDcard building process.
|
||||||
|
|
||||||
### Automate installation with the dietpi.txt
|
### 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
|
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
|
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:
|
## 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/)
|
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
|
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.)
|
(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
|
5) Assemble and boot the Raspberry Pi
|
||||||
|
@ -37,4 +37,4 @@ password: `raspiblitz`
|
||||||
|
|
||||||
---
|
---
|
||||||
### To build manually:
|
### 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:
|
# Uncomment the line with the branch you want to build the SDcard from:
|
||||||
|
|
||||||
# @rootzoll master branch:
|
# @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:
|
# @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:
|
# @openoms DietPi branch:
|
||||||
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/build_sdcard.sh && sudo bash build_sdcard.sh DietPi openoms
|
# 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
|
|
@ -41,12 +41,14 @@ echo ""
|
||||||
echo "*** CHECK BASE IMAGE ***"
|
echo "*** CHECK BASE IMAGE ***"
|
||||||
|
|
||||||
# armv7=32Bit , armv8=64Bit
|
# armv7=32Bit , armv8=64Bit
|
||||||
echo "Check if Linux ARM based ..."
|
echo "Detect CPU architecture ..."
|
||||||
isARM=$(uname -m | grep -c 'arm')
|
isARM=$(uname -m | grep -c 'arm')
|
||||||
isAARCH64=$(uname -m | grep -c 'aarch64')
|
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 "!!! 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
|
uname -m
|
||||||
exit 1
|
exit 1
|
||||||
else
|
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 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"
|
sudo bash -c "echo '# end of pam-auth-update config' >> /etc/pam.d/common-session-noninteractive"
|
||||||
|
|
||||||
echo ""
|
# "*** BITCOIN ***"
|
||||||
echo "*** BITCOIN ***"
|
|
||||||
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_30_bitcoin.md#installation
|
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_30_bitcoin.md#installation
|
||||||
|
|
||||||
# set version (change if update is available)
|
# 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"
|
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
|
if [ ${isARM} -eq 1 ] ; then
|
||||||
bitcoinOSversion="arm-linux-gnueabihf"
|
bitcoinOSversion="arm-linux-gnueabihf"
|
||||||
# needed to make sure download is not changed
|
# bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27"
|
||||||
# calulate with sha256sum and also check with SHA256SUMS.asc
|
|
||||||
bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc"
|
bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc"
|
||||||
fi
|
fi
|
||||||
if [ ${isAARCH64} -eq 1 ] ; then
|
if [ ${isAARCH64} -eq 1 ] ; then
|
||||||
bitcoinOSversion="aarch64-linux-gnu"
|
bitcoinOSversion="aarch64-linux-gnu"
|
||||||
|
# bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b"
|
||||||
bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34"
|
bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34"
|
||||||
fi
|
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
|
# needed to check code signing
|
||||||
laanwjPGP="01EA5486DE18A882D4C2684590C8019E36C2E964"
|
laanwjPGP="01EA5486DE18A882D4C2684590C8019E36C2E964"
|
||||||
|
@ -427,6 +446,7 @@ if [ ${installed} -lt 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${baseImage}" = "raspbian" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** LITECOIN ***"
|
echo "*** LITECOIN ***"
|
||||||
# based on https://medium.com/@jason.hcwong/litecoin-lightning-with-raspberry-pi-3-c3b931a82347
|
# based on https://medium.com/@jason.hcwong/litecoin-lightning-with-raspberry-pi-3-c3b931a82347
|
||||||
|
@ -456,22 +476,32 @@ if [ ${installed} -lt 1 ]; then
|
||||||
echo "!!! BUILD FAILED --> Was not able to install litecoind version(${litecoinVersion})"
|
echo "!!! BUILD FAILED --> Was not able to install litecoind version(${litecoinVersion})"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
# "*** LND ***"
|
||||||
echo "*** LND ***"
|
|
||||||
|
|
||||||
## based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md#lightning-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
|
## see LND releases: https://github.com/lightningnetwork/lnd/releases
|
||||||
lndVersion="0.6-beta"
|
lndVersion="0.6.1-beta"
|
||||||
|
|
||||||
if [ ${isARM} -eq 1 ] ; then
|
if [ ${isARM} -eq 1 ] ; then
|
||||||
lndOSversion="armv7"
|
lndOSversion="armv7"
|
||||||
lndSHA256="effea372c207293fd42b0cc27800da3a70c22f8c9a0e7b5eb8dbe56b5b98e1a3"
|
lndSHA256="5541959c7fde98d76d88cc8070ca626c681ba38c44afcb85bf417a9a677e23c2"
|
||||||
fi
|
fi
|
||||||
if [ ${isAARCH64} -eq 1 ] ; then
|
if [ ${isAARCH64} -eq 1 ] ; then
|
||||||
lndOSversion="arm64"
|
lndOSversion="arm64"
|
||||||
lndSHA256="2f31b13a4da6217ed7e27a44e1705103d7ed846aa2f599b7e5de0e6033a66c19"
|
lndSHA256="d5f7280c324ebc1d322435a0eac4c42dca73ebc6a613878d9e0d33a68276da5c"
|
||||||
fi
|
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
|
# olaoluwa
|
||||||
PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
|
PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
|
||||||
|
@ -534,22 +564,41 @@ fi
|
||||||
#
|
#
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** LND API for Python ***"
|
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/python2.7 3
|
||||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
|
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"
|
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; 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 ""
|
echo ""
|
||||||
|
|
||||||
|
# "*** Installing Go ***"
|
||||||
# Go is needed for ZAP connect later
|
# Go is needed for ZAP connect later
|
||||||
echo "*** Installing Go ***"
|
# see https://golang.org/dl/
|
||||||
wget https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz
|
goVersion="1.12.5"
|
||||||
if [ ! -f "./go1.11.linux-armv6l.tar.gz" ]
|
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
|
then
|
||||||
echo "!!! FAIL !!! Download not success."
|
echo "!!! FAIL !!! Download not success."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 rm *.gz
|
||||||
sudo mkdir /usr/local/gocode
|
sudo mkdir /usr/local/gocode
|
||||||
sudo chmod 777 /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
|
# get uptime & load
|
||||||
load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)
|
load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)
|
||||||
|
|
||||||
# get CPU 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)
|
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||||
|
fi
|
||||||
tempC=$((cpu/1000))
|
tempC=$((cpu/1000))
|
||||||
tempF=$(((cpu/1000) * (9/5) + 32))
|
tempF=$(((cpu/1000) * (9/5) + 32))
|
||||||
|
|
||||||
|
@ -75,9 +78,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get network traffic
|
# 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')
|
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_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')
|
network_tx=$(ifconfig | grep -m1 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
||||||
else
|
else
|
||||||
|
|
|
@ -306,7 +306,8 @@ if [ ${setupStep} -eq 0 ]; then
|
||||||
HEIGHT=11
|
HEIGHT=11
|
||||||
|
|
||||||
else
|
else
|
||||||
|
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||||
|
if [ ${isRaspbian} -gt 0 ]; then
|
||||||
# show hardware test
|
# show hardware test
|
||||||
/home/admin/05hardwareTest.sh
|
/home/admin/05hardwareTest.sh
|
||||||
|
|
||||||
|
@ -317,7 +318,14 @@ if [ ${setupStep} -eq 0 ]; then
|
||||||
OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)" \
|
OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)" \
|
||||||
LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" )
|
LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" )
|
||||||
HEIGHT=11
|
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
|
fi
|
||||||
|
|
||||||
elif [ ${setupStep} -lt 100 ]; then
|
elif [ ${setupStep} -lt 100 ]; then
|
||||||
|
|
|
@ -14,19 +14,25 @@ if [ ${existsHDD} -eq 1 ]; then
|
||||||
|
|
||||||
# check if there is s sda2
|
# check if there is s sda2
|
||||||
existsHDD2=$(lsblk | grep -c sda2)
|
existsHDD2=$(lsblk | grep -c sda2)
|
||||||
if [ ${existsHDD2} -eq 1 ]; then
|
hddSecondDriveExists=$(lsblk | grep -c sdb)
|
||||||
echo "OK - HDD found at sda2 ... determine which is bigger"
|
if [ ${existsHDD2} -eq 1 ] || [ ${hddSecondDriveExists} -eq 1 ] ; then
|
||||||
|
echo "OK - another HDD found at sdb ... determine which is bigger"
|
||||||
|
|
||||||
# get both with size
|
# get both with size
|
||||||
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||||
echo "sda1(${size1})"
|
echo "sda1(${size1})"
|
||||||
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||||
echo "sda2(${size2})"
|
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
|
if [ ${size2} -gt ${size1} ]; then
|
||||||
echo "sda2 is BIGGER - run with this one"
|
echo "sda2 is BIGGER - run with this one"
|
||||||
device="sda2"
|
device="sda2"
|
||||||
|
elif [ ${size3} -gt ${size1} ]; then
|
||||||
|
echo "sdb is BIGGER - run with this one"
|
||||||
|
device="sdb"
|
||||||
else
|
else
|
||||||
echo "sda1 is BIGGER - run with this one"
|
echo "sda1 is BIGGER - run with this one"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -32,12 +32,37 @@ goVersion="1.11"
|
||||||
echo "### Check Framework: GO ###"
|
echo "### Check Framework: GO ###"
|
||||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||||
if [ ${goInstalled} -eq 0 ];then
|
if [ ${goInstalled} -eq 0 ];then
|
||||||
echo "---> Installing GO"
|
goVersion="1.12.5"
|
||||||
wget https://storage.googleapis.com/golang/go${goVersion}.linux-armv6l.tar.gz
|
if [ ${isARM} -eq 1 ] ; then
|
||||||
sudo tar -C /usr/local -xzf go${goVersion}.linux-armv6l.tar.gz
|
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 rm *.gz
|
||||||
sudo mkdir /usr/local/gocode
|
sudo mkdir /usr/local/gocode
|
||||||
sudo chmod 777 /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')
|
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||||
fi
|
fi
|
||||||
if [ ${goInstalled} -eq 0 ];then
|
if [ ${goInstalled} -eq 0 ];then
|
||||||
|
|
|
@ -17,12 +17,37 @@ fi
|
||||||
# make sure go is installed
|
# make sure go is installed
|
||||||
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||||
if [ ${goInstalled} -eq 0 ];then
|
if [ ${goInstalled} -eq 0 ];then
|
||||||
echo "### Installing GO ###"
|
goVersion="1.12.5"
|
||||||
wget https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz
|
if [ ${isARM} -eq 1 ] ; then
|
||||||
sudo tar -C /usr/local -xzf go1.11.linux-armv6l.tar.gz
|
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 rm *.gz
|
||||||
sudo mkdir /usr/local/gocode
|
sudo mkdir /usr/local/gocode
|
||||||
sudo chmod 777 /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')
|
goInstalled=$(go version 2>/dev/null | grep -c 'go')
|
||||||
fi
|
fi
|
||||||
if [ ${goInstalled} -eq 0 ];then
|
if [ ${goInstalled} -eq 0 ];then
|
||||||
|
|
|
@ -148,17 +148,23 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
||||||
# detect for correct device name (the biggest partition)
|
# detect for correct device name (the biggest partition)
|
||||||
hddDeviceName="sda1"
|
hddDeviceName="sda1"
|
||||||
hddSecondPartitionExists=$(lsblk | grep -c sda2)
|
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
|
echo "HDD has a second partition - choosing the bigger one ..." >> $logFile
|
||||||
# get both with size
|
# get both with size
|
||||||
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
size1=$(lsblk -o NAME,SIZE -b | grep "sda1" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||||
echo "sda1(${size1})" >> $logFile
|
echo "sda1(${size1})" >> $logFile
|
||||||
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs)
|
||||||
echo "sda2(${size2})" >> $logFile
|
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
|
if [ ${size2} -gt ${size1} ]; then
|
||||||
echo "sda2 is BIGGER - run with this one" >> $logFile
|
echo "sda2 is BIGGER - run with this one" >> $logFile
|
||||||
hddDeviceName="sda2"
|
hddDeviceName="sda2"
|
||||||
|
elif [ ${size3} -gt ${size1} ]; then
|
||||||
|
echo "sdb is BIGGER - run with this one" >> $logFile
|
||||||
|
hddDeviceName="sdb"
|
||||||
else
|
else
|
||||||
echo "sda1 is BIGGER - run with this one" >> $logFile
|
echo "sda1 is BIGGER - run with this one" >> $logFile
|
||||||
hddDeviceName="sda1"
|
hddDeviceName="sda1"
|
||||||
|
@ -469,9 +475,33 @@ sudo rm /mnt/hdd/${network}/debug.log 2>/dev/null
|
||||||
sudo rm /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null
|
sudo rm /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# STRESSTEST HARDWARE
|
# RECORD BASEIMAGE
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
################################
|
||||||
|
# STRESSTEST RASPBERRY PI
|
||||||
|
################################
|
||||||
|
|
||||||
|
if [ "${baseImage}" = "raspbian" ] ; then
|
||||||
# generate stresstest report on every startup (in case hardware has changed)
|
# generate stresstest report on every startup (in case hardware has changed)
|
||||||
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}
|
||||||
|
@ -479,3 +509,4 @@ sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.repor
|
||||||
|
|
||||||
echo "DONE BOOTSTRAP" >> $logFile
|
echo "DONE BOOTSTRAP" >> $logFile
|
||||||
exit 0
|
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'/')
|
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localIP='${localip}'"
|
echo "localIP='${localip}'"
|
||||||
|
|
||||||
# temp
|
# 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)
|
tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc)
|
||||||
echo "tempCelsius='${tempC}'"
|
echo "tempCelsius='${tempC}'"
|
||||||
|
fi
|
||||||
|
|
||||||
# uptime in seconds
|
# uptime in seconds
|
||||||
uptime=$(awk '{printf("%d\n",$1 + 0.5)}' /proc/uptime)
|
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 ***"
|
echo "*** Get the RTL Source Code ***"
|
||||||
git clone https://github.com/ShahanaFarooqui/RTL.git
|
git clone https://github.com/ShahanaFarooqui/RTL.git
|
||||||
cd RTL
|
cd RTL
|
||||||
git reset --hard v0.2.16
|
git reset --hard v0.3.2
|
||||||
# check if node_modles exists now
|
# check if node_modles exists now
|
||||||
if [ -d "/home/admin/RTL" ]; then
|
if [ -d "/home/admin/RTL" ]; then
|
||||||
echo "OK - RTL code copy looks good"
|
echo "OK - RTL code copy looks good"
|
||||||
|
|