From 339e422dca116d8361c0abfe355adc15e1cb8307 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 May 2019 01:42:51 +0100 Subject: [PATCH 01/28] add x86_64 support and update Go --- build_sdcard.sh | 45 +++++++++++++++++------ home.admin/97addMobileWalletLNDconnect.sh | 25 +++++++++++-- home.admin/97addMobileWalletZeus.sh | 25 +++++++++++-- 3 files changed, 78 insertions(+), 17 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index f4127c32a..16107b536 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -44,9 +44,10 @@ echo "*** CHECK BASE IMAGE ***" echo "Check if Linux ARM based ..." 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') +if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] && [ ${isX86_64} -eq 0 ] ; then echo "!!! FAIL !!!" - echo "Can only build on ARM or aarch64, not on:" + echo "Can only build on ARM, aarch64 or x86_64 not on:" uname -m exit 1 else @@ -338,8 +339,7 @@ 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) @@ -356,6 +356,13 @@ if [ ${isAARCH64} -eq 1 ] ; then bitcoinOSversion="aarch64-linux-gnu" bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" fi +if [ ${isX86_64} -eq 1 ] ; then + bitcoinOSversion="x86_64-linux-gnu" + bitcoinSHA256="53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17" +fi + +echo "" +echo "*** BITCOIN v${bitcoinVersion} for ${bitcoinOSversion} ***" # needed to check code signing laanwjPGP="01EA5486DE18A882D4C2684590C8019E36C2E964" @@ -457,9 +464,7 @@ if [ ${installed} -lt 1 ]; then exit 1 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" @@ -472,6 +477,13 @@ if [ ${isAARCH64} -eq 1 ] ; then lndOSversion="arm64" lndSHA256="2f31b13a4da6217ed7e27a44e1705103d7ed846aa2f599b7e5de0e6033a66c19" fi +if [ ${isX86_64} -eq 1 ] ; then + lndOSversion="amd64" + lndSHA256="ef37b3658fd864dfb3af6af29404d92337229378c24bfb78aa2010ede4cd06af" +fi + +echo "" +echo "*** LND v${bitcoinVersion} for ${bitcoinOSversion} ***" # olaoluwa PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc" @@ -541,15 +553,26 @@ 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" 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" ] +goVersion="1.12.4" +if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then + goOSversion="armv6l" +fi +if [ ${isX86_64} -eq 1 ] ; then + goOSversion="amd64" +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 diff --git a/home.admin/97addMobileWalletLNDconnect.sh b/home.admin/97addMobileWalletLNDconnect.sh index 23ab6faec..ba294695a 100755 --- a/home.admin/97addMobileWalletLNDconnect.sh +++ b/home.admin/97addMobileWalletLNDconnect.sh @@ -32,12 +32,31 @@ 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.4" + if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then + goOSversion="armv6l" + fi + if [ ${isX86_64} -eq 1 ] ; then + goOSversion="amd64" + 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 diff --git a/home.admin/97addMobileWalletZeus.sh b/home.admin/97addMobileWalletZeus.sh index cf2497c3d..457acd542 100644 --- a/home.admin/97addMobileWalletZeus.sh +++ b/home.admin/97addMobileWalletZeus.sh @@ -17,12 +17,31 @@ 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.4" + if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then + goOSversion="armv6l" + fi + if [ ${isX86_64} -eq 1 ] ; then + goOSversion="amd64" + 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 From 8a09ea64a82e6349059b6ff4434fb7ead9c5c527 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 May 2019 13:00:40 +0100 Subject: [PATCH 02/28] fix lnd version display --- build_sdcard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 16107b536..bad69b9d1 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -483,7 +483,7 @@ if [ ${isX86_64} -eq 1 ] ; then fi echo "" -echo "*** LND v${bitcoinVersion} for ${bitcoinOSversion} ***" +echo "*** LND v${lndVersion} for ${lndOSversion} ***" # olaoluwa PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc" From eeba803fb1757379acc348db580f9e9a2354678f Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 May 2019 15:51:09 +0100 Subject: [PATCH 03/28] only install Litecoin for Raspbian --- build_sdcard.sh | 56 +++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index bad69b9d1..8616ccaa1 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -434,34 +434,36 @@ 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 - -# 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} - -# 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 - -# 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 +if [ "${baseImage}" = "raspbian" ]; then echo "" - echo "!!! BUILD FAILED --> Was not able to install litecoind version(${litecoinVersion})" - exit 1 + 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 + + # 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 + echo "!!! FAIL !!! Downloaded LITECOIN BINARY not matching SHA256 checksum: ${litecoinSHA256}" + exit 1 + 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 + echo "" + echo "!!! BUILD FAILED --> Was not able to install litecoind version(${litecoinVersion})" + exit 1 + fi fi # "*** LND ***" From 7c98d939ba8a45efb8c7e3f99fbfa6de2fb720e4 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 May 2019 17:15:57 +0100 Subject: [PATCH 04/28] add sdb to hdd checks for VM build --- home.admin/30initHDD.sh | 10 ++++++++-- home.admin/_bootstrap.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/home.admin/30initHDD.sh b/home.admin/30initHDD.sh index 5fbd5c2a2..4a0856c8b 100755 --- a/home.admin/30initHDD.sh +++ b/home.admin/30initHDD.sh @@ -14,7 +14,8 @@ if [ ${existsHDD} -eq 1 ]; then # check if there is s sda2 existsHDD2=$(lsblk | grep -c sda2) - if [ ${existsHDD2} -eq 1 ]; then + hddSecondDriveExists=$(lsblk | grep -c sdb) + if [ ${existsHDD2} -eq 1 ] || [ ${hddSecondDriveExists} -eq 1 ] ; then echo "OK - HDD found at sda2 ... determine which is bigger" # get both with size @@ -22,11 +23,16 @@ if [ ${existsHDD} -eq 1 ]; then 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(${size2})" - # 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 diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index d5616cd46..70f3fd015 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -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(${size2})" >> $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" From c218653b4c3da6af4e9500f0af28800bdd913a79 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 08:24:16 +0100 Subject: [PATCH 05/28] record baseimage to infofile, stresstest RPi only --- home.admin/_bootstrap.sh | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 70f3fd015..556228108 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -475,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 \ No newline at end of file +################################ +# 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 \ No newline at end of file From 9cf3ebcb7e448596c82d347deaafc4a2d78978c3 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 08:49:45 +0100 Subject: [PATCH 06/28] python 3.6 for first alternative --- build_sdcard.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 8616ccaa1..43dec124f 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -548,8 +548,9 @@ 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" From 8f12a06e3309b7a9d6972de4b7411bb79b925227 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 09:46:26 +0100 Subject: [PATCH 07/28] virtualenv as sudo for python-env-lnd --- build_sdcard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 43dec124f..654445767 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -553,7 +553,7 @@ 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 ***" From f7eee12720637046e1e081a0de8f625caa81e3fe Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 13:16:00 +0100 Subject: [PATCH 08/28] fix hdd chack output --- home.admin/30initHDD.sh | 4 ++-- home.admin/_bootstrap.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/30initHDD.sh b/home.admin/30initHDD.sh index 4a0856c8b..454243f06 100755 --- a/home.admin/30initHDD.sh +++ b/home.admin/30initHDD.sh @@ -16,7 +16,7 @@ if [ ${existsHDD} -eq 1 ]; then existsHDD2=$(lsblk | grep -c sda2) hddSecondDriveExists=$(lsblk | grep -c sdb) if [ ${existsHDD2} -eq 1 ] || [ ${hddSecondDriveExists} -eq 1 ] ; then - echo "OK - HDD found at sda2 ... determine which is bigger" + 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) @@ -24,7 +24,7 @@ if [ ${existsHDD} -eq 1 ]; then 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(${size2})" + echo "sdb(${size3})" # choose to run with the bigger one if [ ${size2} -gt ${size1} ]; then diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 556228108..8c6c278ec 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -157,7 +157,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then size2=$(lsblk -o NAME,SIZE -b | grep "sda2" | awk '{ print substr( $0, 12, length($0)-2 ) }' | xargs) echo "sda2(${size2})" >> $logFile size3=$(lsblk -o NAME,SIZE -b | grep "sdb" | awk '{ print substr( $0, 8, length($0)-2 ) }' | xargs) - echo "sdb(${size2})" >> $logFile + 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 From 47129dd0d17fff8c938818ab768aee1ba84a6e98 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 13:48:35 +0100 Subject: [PATCH 09/28] fix CPU temp error on X86 --- build_sdcard.sh | 2 +- home.admin/00infoBlitz.sh | 6 +++++- home.admin/config.scripts/blitz.statusscan.sh | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 654445767..f53e4235a 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -41,7 +41,7 @@ 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') isX86_64=$(uname -m | grep -c 'x86_64') diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 3d2550710..c6cfd1726 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -50,7 +50,11 @@ lnd_macaroon_dir="/home/bitcoin/.lnd/data/chain/${network}/${chain}net" load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2) # get CPU temp -cpu=$(cat /sys/class/thermal/thermal_zone0/temp) +isX86_64=$(uname -m | grep -c 'x86_64') +cpu=0 +if [ ${isX86_64} -eq 0 ] ; then + cpu=$(cat /sys/class/thermal/thermal_zone0/temp) +fi tempC=$((cpu/1000)) tempF=$(((cpu/1000) * (9/5) + 32)) diff --git a/home.admin/config.scripts/blitz.statusscan.sh b/home.admin/config.scripts/blitz.statusscan.sh index b170b17b2..a1bc10ebf 100644 --- a/home.admin/config.scripts/blitz.statusscan.sh +++ b/home.admin/config.scripts/blitz.statusscan.sh @@ -21,7 +21,11 @@ localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 echo "localIP='${localip}'" # temp -tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc) +isX86_64=$(uname -m | grep -c 'x86_64') +tempC=0 +if [ ${isX86_64} -eq 0 ] ; then + tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc) +fi echo "tempCelsius='${tempC}'" # uptime in seconds From 14d6ced82de14100420474919de7dc924525bbd0 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 14:22:15 +0100 Subject: [PATCH 10/28] show 0 C if no temp available in a VM --- home.admin/00infoBlitz.sh | 3 +-- home.admin/config.scripts/blitz.statusscan.sh | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index c6cfd1726..8e27339fc 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -50,9 +50,8 @@ lnd_macaroon_dir="/home/bitcoin/.lnd/data/chain/${network}/${chain}net" load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2) # get CPU temp -isX86_64=$(uname -m | grep -c 'x86_64') cpu=0 -if [ ${isX86_64} -eq 0 ] ; then +if [ -d "/sys/class/thermal/thermal_zone0/" ]; then cpu=$(cat /sys/class/thermal/thermal_zone0/temp) fi tempC=$((cpu/1000)) diff --git a/home.admin/config.scripts/blitz.statusscan.sh b/home.admin/config.scripts/blitz.statusscan.sh index a1bc10ebf..4a4a1b8c7 100644 --- a/home.admin/config.scripts/blitz.statusscan.sh +++ b/home.admin/config.scripts/blitz.statusscan.sh @@ -21,12 +21,11 @@ localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 echo "localIP='${localip}'" # temp -isX86_64=$(uname -m | grep -c 'x86_64') tempC=0 -if [ ${isX86_64} -eq 0 ] ; then +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 -echo "tempCelsius='${tempC}'" # uptime in seconds uptime=$(awk '{printf("%d\n",$1 + 0.5)}' /proc/uptime) From b37d854eeeb9419ff275b9c39f13d04f77b6bd60 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 8 May 2019 14:34:33 +0100 Subject: [PATCH 11/28] fix errors when in a VM --- home.admin/00infoBlitz.sh | 6 +++--- home.admin/config.scripts/blitz.statusscan.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 8e27339fc..5acc7cbe6 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -49,7 +49,7 @@ 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 +# 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) @@ -78,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 diff --git a/home.admin/config.scripts/blitz.statusscan.sh b/home.admin/config.scripts/blitz.statusscan.sh index 4a4a1b8c7..222ad06e8 100644 --- a/home.admin/config.scripts/blitz.statusscan.sh +++ b/home.admin/config.scripts/blitz.statusscan.sh @@ -20,7 +20,7 @@ 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 +# 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) From 84ae6772d7ca5f48b194a62a9e54b7dfc80ebf9a Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 9 May 2019 11:25:55 +0100 Subject: [PATCH 12/28] add i386, bitcoin 0.18.0, lnd 0.6.1-beta-rc2 --- build_sdcard.sh | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index f53e4235a..b611a9eae 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -45,9 +45,10 @@ echo "Detect CPU architecture ..." isARM=$(uname -m | grep -c 'arm') isAARCH64=$(uname -m | grep -c 'aarch64') isX86_64=$(uname -m | grep -c 'x86_64') -if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] && [ ${isX86_64} -eq 0 ] ; then +isI386=$(uname -m | grep -c 'i386\|i486\|i586\|i686\|i786') +if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] && [ ${isX86_64} -eq 0 ] && [ ${isI386} -eq 0 ] ; then echo "!!! FAIL !!!" - echo "Can only build on ARM, aarch64 or x86_64 not on:" + echo "Can only build on ARM, aarch64, x86_64 or i386 not on:" uname -m exit 1 else @@ -343,22 +344,28 @@ sudo bash -c "echo '# end of pam-auth-update config' >> /etc/pam.d/common-sessio # based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_30_bitcoin.md#installation # set version (change if update is available) -bitcoinVersion="0.17.1" +# https://bitcoincore.org/en/download/ +bitcoinVersion="0.18.0" -# set OS version +# set OS version and checksum +# needed to make sure download is not changed +# calulate 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="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" + bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27" fi if [ ${isAARCH64} -eq 1 ] ; then bitcoinOSversion="aarch64-linux-gnu" - bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" + bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b" fi if [ ${isX86_64} -eq 1 ] ; then bitcoinOSversion="x86_64-linux-gnu" - bitcoinSHA256="53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17" + bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f" +fi +if [ ${isI386} -eq 1 ] ; then + bitcoinOSversion="i686-pc-linux-gnu" + bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" fi echo "" @@ -469,19 +476,23 @@ fi # "*** 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="v0.6.1-beta-rc2" if [ ${isARM} -eq 1 ] ; then lndOSversion="armv7" - lndSHA256="effea372c207293fd42b0cc27800da3a70c22f8c9a0e7b5eb8dbe56b5b98e1a3" + lndSHA256="acaed77436ea210164553ac9e11b87c92ed918f10b6a5e54f96c01ca0b93fe24" fi if [ ${isAARCH64} -eq 1 ] ; then lndOSversion="arm64" - lndSHA256="2f31b13a4da6217ed7e27a44e1705103d7ed846aa2f599b7e5de0e6033a66c19" + lndSHA256="ce3e3ce3df6d5d98a78c776a06fa9a2cc5826f4ad6579bc36de4b6d634495efa" fi if [ ${isX86_64} -eq 1 ] ; then lndOSversion="amd64" - lndSHA256="ef37b3658fd864dfb3af6af29404d92337229378c24bfb78aa2010ede4cd06af" + lndSHA256="e94d00624c857bfa00917f5b8679c294b749490e485ec20433fc3dcb29c5db4b" +fi +if [ ${isI386} -eq 1 ] ; then + lndOSversion="386" + lndSHA256="e94d00624c857bfa00917f5b8679c294b749490e485ec20433fc3dcb29c5db4b" fi echo "" @@ -558,13 +569,16 @@ echo "" # "*** Installing Go ***" # Go is needed for ZAP connect later -goVersion="1.12.4" +goVersion="1.12.5" if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then goOSversion="armv6l" fi if [ ${isX86_64} -eq 1 ] ; then goOSversion="amd64" fi +if [ ${isI386} -eq 1 ] ; then + goOSversion="386" +fi echo "*** Installing Go v${goVersion} for ${goOSversion} ***" From b7f6b006a88c6fd9996aa37374a868958c13d44e Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 9 May 2019 11:29:08 +0100 Subject: [PATCH 13/28] update go to 1.12.5 --- build_sdcard.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_sdcard.sh b/build_sdcard.sh index b611a9eae..6bad46699 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -569,6 +569,7 @@ echo "" # "*** Installing Go ***" # Go is needed for ZAP connect later +# see https://golang.org/dl/ goVersion="1.12.5" if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then goOSversion="armv6l" From 5f61707752eeecac04f87c426f0e97cf5cc6dc12 Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 9 May 2019 12:06:26 +0100 Subject: [PATCH 14/28] correct lnd version to 0.6.1-beta-rc2 --- build_sdcard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 6bad46699..6b35e05e6 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -476,7 +476,7 @@ fi # "*** 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="v0.6.1-beta-rc2" +lndVersion="0.6.1-beta-rc2" if [ ${isARM} -eq 1 ] ; then lndOSversion="armv7" From b78d9ca2d962a2bbec876594abf19b8a251a5e2e Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 9 May 2019 12:24:37 +0100 Subject: [PATCH 15/28] correct lnd checksums --- build_sdcard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 6b35e05e6..002ae5ae3 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -488,11 +488,11 @@ if [ ${isAARCH64} -eq 1 ] ; then fi if [ ${isX86_64} -eq 1 ] ; then lndOSversion="amd64" - lndSHA256="e94d00624c857bfa00917f5b8679c294b749490e485ec20433fc3dcb29c5db4b" + lndSHA256="860a5d0a56c1ec9eef33a5f29c20013221b95298468825a1b7793d13320cba70" fi if [ ${isI386} -eq 1 ] ; then lndOSversion="386" - lndSHA256="e94d00624c857bfa00917f5b8679c294b749490e485ec20433fc3dcb29c5db4b" + lndSHA256="19bb8acec1d79c376363a7660b7ef75624829cfdb6e83841e84b7dc98bbb10bc" fi echo "" From 4f834af64cbffdc707dead14e35885c9302b6775 Mon Sep 17 00:00:00 2001 From: openoms Date: Fri, 10 May 2019 20:28:24 +0100 Subject: [PATCH 16/28] reanem isI386 to isX86_32 --- build_sdcard.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 002ae5ae3..22f8350ab 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -45,8 +45,8 @@ echo "Detect CPU architecture ..." isARM=$(uname -m | grep -c 'arm') isAARCH64=$(uname -m | grep -c 'aarch64') isX86_64=$(uname -m | grep -c 'x86_64') -isI386=$(uname -m | grep -c 'i386\|i486\|i586\|i686\|i786') -if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] && [ ${isX86_64} -eq 0 ] && [ ${isI386} -eq 0 ] ; then +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, aarch64, x86_64 or i386 not on:" uname -m @@ -363,7 +363,7 @@ if [ ${isX86_64} -eq 1 ] ; then bitcoinOSversion="x86_64-linux-gnu" bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f" fi -if [ ${isI386} -eq 1 ] ; then +if [ ${isX86_32} -eq 1 ] ; then bitcoinOSversion="i686-pc-linux-gnu" bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" fi @@ -490,7 +490,7 @@ if [ ${isX86_64} -eq 1 ] ; then lndOSversion="amd64" lndSHA256="860a5d0a56c1ec9eef33a5f29c20013221b95298468825a1b7793d13320cba70" fi -if [ ${isI386} -eq 1 ] ; then +if [ ${isX86_32} -eq 1 ] ; then lndOSversion="386" lndSHA256="19bb8acec1d79c376363a7660b7ef75624829cfdb6e83841e84b7dc98bbb10bc" fi @@ -577,7 +577,7 @@ fi if [ ${isX86_64} -eq 1 ] ; then goOSversion="amd64" fi -if [ ${isI386} -eq 1 ] ; then +if [ ${isX86_32} -eq 1 ] ; then goOSversion="386" fi From e44308e4a92a13a5c4850bb4851da05a5b5db276 Mon Sep 17 00:00:00 2001 From: openoms Date: Fri, 10 May 2019 21:11:50 +0100 Subject: [PATCH 17/28] update lnd to v0.6.1-beta --- build_sdcard.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 22f8350ab..43377597b 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -476,23 +476,23 @@ fi # "*** 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.1-beta-rc2" +lndVersion="0.6.1-beta" if [ ${isARM} -eq 1 ] ; then lndOSversion="armv7" - lndSHA256="acaed77436ea210164553ac9e11b87c92ed918f10b6a5e54f96c01ca0b93fe24" + lndSHA256="5541959c7fde98d76d88cc8070ca626c681ba38c44afcb85bf417a9a677e23c2" fi if [ ${isAARCH64} -eq 1 ] ; then lndOSversion="arm64" - lndSHA256="ce3e3ce3df6d5d98a78c776a06fa9a2cc5826f4ad6579bc36de4b6d634495efa" + lndSHA256="d5f7280c324ebc1d322435a0eac4c42dca73ebc6a613878d9e0d33a68276da5c" fi if [ ${isX86_64} -eq 1 ] ; then lndOSversion="amd64" - lndSHA256="860a5d0a56c1ec9eef33a5f29c20013221b95298468825a1b7793d13320cba70" + lndSHA256="c55367edb82955dc942baf9f48f79fadde1eee0e86c1d59d2fe1993140ec1b3f" fi if [ ${isX86_32} -eq 1 ] ; then lndOSversion="386" - lndSHA256="19bb8acec1d79c376363a7660b7ef75624829cfdb6e83841e84b7dc98bbb10bc" + lndSHA256="00a7cd0ca657bb242b0f3acb5f4e26a13fd789946fab73c252118e3f89c1cf57" fi echo "" From cfeee4e8913416b50659bee7e85d361038d8fbb9 Mon Sep 17 00:00:00 2001 From: bluecell296 <43343391+openoms@users.noreply.github.com> Date: Sat, 11 May 2019 06:16:39 +0100 Subject: [PATCH 18/28] update to RTL v0.3.1 --- home.admin/config.scripts/bonus.rtl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 799bba689..db9be447f 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -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.1 # check if node_modles exists now if [ -d "/home/admin/RTL" ]; then echo "OK - RTL code copy looks good" @@ -134,4 +134,4 @@ fi echo "FAIL - Unknown Paramter $1" echo "may needs reboot to run normal again" -exit 1 \ No newline at end of file +exit 1 From c2b6b2b9d7fc20cc89e2ac57cb546943c836a46f Mon Sep 17 00:00:00 2001 From: openoms Date: Sat, 11 May 2019 10:42:37 +0100 Subject: [PATCH 19/28] goVersion="1.12.5" and add X86_32 --- home.admin/97addMobileWalletLNDconnect.sh | 5 ++++- home.admin/97addMobileWalletZeus.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/home.admin/97addMobileWalletLNDconnect.sh b/home.admin/97addMobileWalletLNDconnect.sh index ba294695a..9fc7a770e 100755 --- a/home.admin/97addMobileWalletLNDconnect.sh +++ b/home.admin/97addMobileWalletLNDconnect.sh @@ -32,13 +32,16 @@ goVersion="1.11" echo "### Check Framework: GO ###" goInstalled=$(go version 2>/dev/null | grep -c 'go') if [ ${goInstalled} -eq 0 ];then - goVersion="1.12.4" + goVersion="1.12.5" if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then goOSversion="armv6l" 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} ***" diff --git a/home.admin/97addMobileWalletZeus.sh b/home.admin/97addMobileWalletZeus.sh index 457acd542..a135e7106 100644 --- a/home.admin/97addMobileWalletZeus.sh +++ b/home.admin/97addMobileWalletZeus.sh @@ -17,13 +17,16 @@ fi # make sure go is installed goInstalled=$(go version 2>/dev/null | grep -c 'go') if [ ${goInstalled} -eq 0 ];then - goVersion="1.12.4" + goVersion="1.12.5" if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then goOSversion="armv6l" 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} ***" From c3f9a367ddcf833787cf9a893929bb5d01788133 Mon Sep 17 00:00:00 2001 From: openoms Date: Sat, 11 May 2019 16:59:22 +0100 Subject: [PATCH 20/28] generic IP in ssh command --- alternative.platforms/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alternative.platforms/README.md b/alternative.platforms/README.md index f0a5b1ee7..2ed1bdc06 100644 --- a/alternative.platforms/README.md +++ b/alternative.platforms/README.md @@ -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 From cfa5b6e93810912458577e36fa0cf65bc5cd5068 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 May 2019 09:35:50 +0100 Subject: [PATCH 21/28] move dietpi instructions to /alternative.platforms and update links --- alternative.platforms/README.md | 2 +- .../dietpi}/Odroid_HC1_XU4.md | 16 ++++++++-------- .../dietpi}/README.md | 4 ++-- .../dietpi}/RaspberryPi.md | 8 ++++---- .../dietpi}/boot/Automation_Custom_Script.sh | 4 ++-- .../dietpi}/boot/dietpi.txt | 0 .../dietpi}/boot/dietpi.txt.sample | 0 .../dietpi}/dietpi.display.sh | 2 +- .../dietpi}/pictures/DroidBlitz.jpg | Bin .../dietpi}/pictures/HDD_copy_example.jpg | Bin .../dietpi}/pictures/adapterHDD_HC1.jpg | Bin .../dietpi}/pictures/bash_prompt.png | Bin .../dietpi}/pictures/dietpi-software_exit.png | Bin .../dietpi}/pictures/dietpi_1st_reboot.png | Bin 14 files changed, 18 insertions(+), 18 deletions(-) rename {dietpi => alternative.platforms/dietpi}/Odroid_HC1_XU4.md (85%) rename {dietpi => alternative.platforms/dietpi}/README.md (97%) rename {dietpi => alternative.platforms/dietpi}/RaspberryPi.md (65%) rename {dietpi => alternative.platforms/dietpi}/boot/Automation_Custom_Script.sh (73%) rename {dietpi => alternative.platforms/dietpi}/boot/dietpi.txt (100%) rename {dietpi => alternative.platforms/dietpi}/boot/dietpi.txt.sample (100%) rename {dietpi => alternative.platforms/dietpi}/dietpi.display.sh (97%) rename {dietpi => alternative.platforms/dietpi}/pictures/DroidBlitz.jpg (100%) rename {dietpi => alternative.platforms/dietpi}/pictures/HDD_copy_example.jpg (100%) rename {dietpi => alternative.platforms/dietpi}/pictures/adapterHDD_HC1.jpg (100%) rename {dietpi => alternative.platforms/dietpi}/pictures/bash_prompt.png (100%) rename {dietpi => alternative.platforms/dietpi}/pictures/dietpi-software_exit.png (100%) rename {dietpi => alternative.platforms/dietpi}/pictures/dietpi_1st_reboot.png (100%) diff --git a/alternative.platforms/README.md b/alternative.platforms/README.md index 2ed1bdc06..00fd02210 100644 --- a/alternative.platforms/README.md +++ b/alternative.platforms/README.md @@ -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: diff --git a/dietpi/Odroid_HC1_XU4.md b/alternative.platforms/dietpi/Odroid_HC1_XU4.md similarity index 85% rename from dietpi/Odroid_HC1_XU4.md rename to alternative.platforms/dietpi/Odroid_HC1_XU4.md index 3f5890b26..a58ef3fc1 100644 --- a/dietpi/Odroid_HC1_XU4.md +++ b/alternative.platforms/dietpi/Odroid_HC1_XU4.md @@ -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` diff --git a/dietpi/README.md b/alternative.platforms/dietpi/README.md similarity index 97% rename from dietpi/README.md rename to alternative.platforms/dietpi/README.md index 8d41e2a80..877b661f9 100644 --- a/dietpi/README.md +++ b/alternative.platforms/dietpi/README.md @@ -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: diff --git a/dietpi/RaspberryPi.md b/alternative.platforms/dietpi/RaspberryPi.md similarity index 65% rename from dietpi/RaspberryPi.md rename to alternative.platforms/dietpi/RaspberryPi.md index aa52f83ee..4aa681cd5 100644 --- a/dietpi/RaspberryPi.md +++ b/alternative.platforms/dietpi/RaspberryPi.md @@ -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) diff --git a/dietpi/boot/Automation_Custom_Script.sh b/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh similarity index 73% rename from dietpi/boot/Automation_Custom_Script.sh rename to alternative.platforms/dietpi/boot/Automation_Custom_Script.sh index 5a207abab..61912e8b3 100644 --- a/dietpi/boot/Automation_Custom_Script.sh +++ b/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh @@ -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 \ No newline at end of file diff --git a/dietpi/boot/dietpi.txt b/alternative.platforms/dietpi/boot/dietpi.txt similarity index 100% rename from dietpi/boot/dietpi.txt rename to alternative.platforms/dietpi/boot/dietpi.txt diff --git a/dietpi/boot/dietpi.txt.sample b/alternative.platforms/dietpi/boot/dietpi.txt.sample similarity index 100% rename from dietpi/boot/dietpi.txt.sample rename to alternative.platforms/dietpi/boot/dietpi.txt.sample diff --git a/dietpi/dietpi.display.sh b/alternative.platforms/dietpi/dietpi.display.sh similarity index 97% rename from dietpi/dietpi.display.sh rename to alternative.platforms/dietpi/dietpi.display.sh index 37a9fdb4e..d7f476776 100644 --- a/dietpi/dietpi.display.sh +++ b/alternative.platforms/dietpi/dietpi.display.sh @@ -1,5 +1,5 @@ # 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 +# wget hhttps://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/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 ..." diff --git a/dietpi/pictures/DroidBlitz.jpg b/alternative.platforms/dietpi/pictures/DroidBlitz.jpg similarity index 100% rename from dietpi/pictures/DroidBlitz.jpg rename to alternative.platforms/dietpi/pictures/DroidBlitz.jpg diff --git a/dietpi/pictures/HDD_copy_example.jpg b/alternative.platforms/dietpi/pictures/HDD_copy_example.jpg similarity index 100% rename from dietpi/pictures/HDD_copy_example.jpg rename to alternative.platforms/dietpi/pictures/HDD_copy_example.jpg diff --git a/dietpi/pictures/adapterHDD_HC1.jpg b/alternative.platforms/dietpi/pictures/adapterHDD_HC1.jpg similarity index 100% rename from dietpi/pictures/adapterHDD_HC1.jpg rename to alternative.platforms/dietpi/pictures/adapterHDD_HC1.jpg diff --git a/dietpi/pictures/bash_prompt.png b/alternative.platforms/dietpi/pictures/bash_prompt.png similarity index 100% rename from dietpi/pictures/bash_prompt.png rename to alternative.platforms/dietpi/pictures/bash_prompt.png diff --git a/dietpi/pictures/dietpi-software_exit.png b/alternative.platforms/dietpi/pictures/dietpi-software_exit.png similarity index 100% rename from dietpi/pictures/dietpi-software_exit.png rename to alternative.platforms/dietpi/pictures/dietpi-software_exit.png diff --git a/dietpi/pictures/dietpi_1st_reboot.png b/alternative.platforms/dietpi/pictures/dietpi_1st_reboot.png similarity index 100% rename from dietpi/pictures/dietpi_1st_reboot.png rename to alternative.platforms/dietpi/pictures/dietpi_1st_reboot.png From 7cb7d3cfb374d02c29d7641a5b20e4a525514e66 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 May 2019 09:53:43 +0100 Subject: [PATCH 22/28] stresstest and litecoin only for Raspbian --- home.admin/00raspiblitz.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index 17d9cba72..2ee16343e 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -306,18 +306,26 @@ 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 - # show hardware test - /home/admin/05hardwareTest.sh - - # start setup - BACKTITLE="RaspiBlitz - Setup" - TITLE="⚡ Welcome to your RaspiBlitz ⚡" - MENU="\nChoose how you want to setup your RaspiBlitz: \n " - OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)" \ - LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" ) - HEIGHT=11 - + # start setup + BACKTITLE="RaspiBlitz - Setup" + TITLE="⚡ Welcome to your RaspiBlitz ⚡" + MENU="\nChoose how you want to setup your RaspiBlitz: \n " + 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 From 8ec42c927300dd07cabbc3cb432e703af903e766 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 May 2019 10:19:24 +0100 Subject: [PATCH 23/28] arm64 Go version for aarch64 (armV8) --- build_sdcard.sh | 5 ++++- home.admin/97addMobileWalletLNDconnect.sh | 5 ++++- home.admin/97addMobileWalletZeus.sh | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 43377597b..900da1287 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -571,9 +571,12 @@ echo "" # Go is needed for ZAP connect later # see https://golang.org/dl/ goVersion="1.12.5" -if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then +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 diff --git a/home.admin/97addMobileWalletLNDconnect.sh b/home.admin/97addMobileWalletLNDconnect.sh index 9fc7a770e..e548c4c73 100755 --- a/home.admin/97addMobileWalletLNDconnect.sh +++ b/home.admin/97addMobileWalletLNDconnect.sh @@ -33,9 +33,12 @@ echo "### Check Framework: GO ###" goInstalled=$(go version 2>/dev/null | grep -c 'go') if [ ${goInstalled} -eq 0 ];then goVersion="1.12.5" - if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then + 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 diff --git a/home.admin/97addMobileWalletZeus.sh b/home.admin/97addMobileWalletZeus.sh index a135e7106..d2304e05b 100644 --- a/home.admin/97addMobileWalletZeus.sh +++ b/home.admin/97addMobileWalletZeus.sh @@ -18,9 +18,12 @@ fi goInstalled=$(go version 2>/dev/null | grep -c 'go') if [ ${goInstalled} -eq 0 ];then goVersion="1.12.5" - if [ ${isARM} -eq 1 ] || [ ${isAARCH64} -eq 1 ] ; then + 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 From 3e2e8647456df305b7876b57e482ce11ef2e65f4 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 May 2019 12:45:17 +0100 Subject: [PATCH 24/28] reset to RTL v0.3.0 due to login bug in v0.3.1 --- home.admin/config.scripts/bonus.rtl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index db9be447f..a9cedd855 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -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.3.1 + git reset --hard v0.3.0 # check if node_modles exists now if [ -d "/home/admin/RTL" ]; then echo "OK - RTL code copy looks good" From f7824fd3b60dd43425bd6f6398c70cb2aa8b5a3d Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 May 2019 22:24:10 +0100 Subject: [PATCH 25/28] update RTL to v0.3.2 --- home.admin/config.scripts/bonus.rtl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index a9cedd855..079af9ed7 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -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.3.0 + 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" From 6821b14edc082d9951c14468001c9df36dc0bad0 Mon Sep 17 00:00:00 2001 From: bluecell296 <43343391+openoms@users.noreply.github.com> Date: Fri, 17 May 2019 16:43:13 +0100 Subject: [PATCH 26/28] downgrade to bitcoin-0.17.1 for better compatibility with lnd-v0.5.1-beta --- build_sdcard.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 900da1287..0fd291f54 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -345,27 +345,32 @@ sudo bash -c "echo '# end of pam-auth-update config' >> /etc/pam.d/common-sessio # set version (change if update is available) # https://bitcoincore.org/en/download/ -bitcoinVersion="0.18.0" +# bitcoinVersion="0.18.0" # commented out checksums for this version until lnd version >0.5.1 +bitcoinVersion="0.17.1" # set OS version and checksum # needed to make sure download is not changed -# calulate with sha256sum and also check with SHA256SUMS.asc +# 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" - bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27" + # bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27" + bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" fi if [ ${isAARCH64} -eq 1 ] ; then bitcoinOSversion="aarch64-linux-gnu" - bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b" + # bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b" + bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" fi if [ ${isX86_64} -eq 1 ] ; then bitcoinOSversion="x86_64-linux-gnu" - bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f" + # bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f" + bitcoinSHA256="53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17" fi if [ ${isX86_32} -eq 1 ] ; then bitcoinOSversion="i686-pc-linux-gnu" - bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" + # bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" + bitcoinSHA256="b1e1dcf8265521fef9021a9d49d8661833e3f844ca9a410a9dd12a617553dda1" fi echo "" From 4bd14b0d39cc306537f4dbd4bf8adef95d9ec6e0 Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 20 May 2019 07:38:50 +0100 Subject: [PATCH 27/28] add HDMI config to alternative diplay install --- alternative.platforms/dietpi/README.md | 2 +- ...tpi.display.sh => display.alternatives.sh} | 58 +++++++++++++++---- 2 files changed, 47 insertions(+), 13 deletions(-) rename alternative.platforms/{dietpi/dietpi.display.sh => display.alternatives.sh} (75%) diff --git a/alternative.platforms/dietpi/README.md b/alternative.platforms/dietpi/README.md index 877b661f9..1b41ae88e 100644 --- a/alternative.platforms/dietpi/README.md +++ b/alternative.platforms/dietpi/README.md @@ -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) --- diff --git a/alternative.platforms/dietpi/dietpi.display.sh b/alternative.platforms/display.alternatives.sh similarity index 75% rename from alternative.platforms/dietpi/dietpi.display.sh rename to alternative.platforms/display.alternatives.sh index d7f476776..ebe352db9 100644 --- a/alternative.platforms/dietpi/dietpi.display.sh +++ b/alternative.platforms/display.alternatives.sh @@ -1,14 +1,21 @@ # To run this script on your RaspiBlitz, copy the following line to the ssh terminal (after the #): -# wget hhttps://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/dietpi.display.sh && sudo chmod +x dietpi.display.sh && ./dietpi.display.sh +# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/display.alternatives.sh && sudo bash display.alternatives.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') +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 @@ -21,19 +28,16 @@ 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" + 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" + ) - # *** 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=$? + CHOICE=$(dialog --backtitle "RaspiBlitz - Display Install" --clear --title "Display Install" --menu "Choose a your diplay:" 10 70 6 "${OPTIONS[@]}" 2>&1 >/dev/tty) - if [ "${defaultDisplay}" = "0" ]; then + 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 @@ -41,13 +45,41 @@ if [ "${baseImage}" = "raspbian" ]; then echo "--> LCD DEFAULT" cd /home/admin/ sudo apt-mark hold raspberrypi-bootloader + 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/ sudo ./LCD35-show - else + 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 + sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt + sudo cp ./usr/cmdline.txt /boot/ + 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 @@ -105,6 +137,7 @@ if [ "${baseImage}" = "dietpi" ]; then # 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 + 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 @@ -135,6 +168,7 @@ if [ "${baseImage}" = "dietpi" ]; 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/ From befde37c4b1097f2cd4110eec415f01fc9a7e1de Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 20 May 2019 12:35:47 +0100 Subject: [PATCH 28/28] refactor --- alternative.platforms/display.alternatives.sh | 271 ++++++------------ 1 file changed, 82 insertions(+), 189 deletions(-) diff --git a/alternative.platforms/display.alternatives.sh b/alternative.platforms/display.alternatives.sh index ebe352db9..474df8c4e 100644 --- a/alternative.platforms/display.alternatives.sh +++ b/alternative.platforms/display.alternatives.sh @@ -28,121 +28,33 @@ else echo "OK running ${baseImage}" fi -if [ "${baseImage}" = "raspbian" ]; 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" - ) +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) - 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 - +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" - cd /home/admin/ sudo apt-mark hold raspberrypi-bootloader - 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/ sudo ./LCD35-show - - 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 - sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt - sudo cp ./usr/cmdline.txt /boot/ - 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" - 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 <> 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 - 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/ - # 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/ @@ -152,93 +64,74 @@ if [ "${baseImage}" = "dietpi" ]; then 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 + 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 +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/ - 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 <> 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 + 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 <> 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 \ No newline at end of file