From 2e50b709f7b5625039ead7e1c7ad10c3333feb8e Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 11:08:18 +0100 Subject: [PATCH 1/6] introduce aarch64 + ubuntu and armbian --- build_sdcard.sh | 153 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 103 insertions(+), 50 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 37d445c..fcff651 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -43,22 +43,32 @@ echo "*** CHECK BASE IMAGE ***" # armv7=32Bit , armv8=64Bit echo "Check if Linux ARM based ..." isARM=$(uname -m | grep -c 'arm') -if [ ${isARM} -eq 0 ]; then +isAARCH64=$(uname -m | grep -c 'aarch64') +if [ ${isARM} -eq 0 ] && [ ${isAARCH64} -eq 0 ] ; then echo "!!! FAIL !!!" - echo "Can just build on ARM Linux, not on:" + echo "Can only build on ARM or aarch64, not on:" uname -m exit 1 +else + echo "OK running on $(uname -m) architecture." fi -echo "OK running on Linux ARM architecture." # 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 @@ -73,21 +83,30 @@ fi # setting static DNS server # see https://github.com/rootzoll/raspiblitz/issues/322#issuecomment-466733550 -sudo sed -i "s/^#static domain_name_servers=192.168.0.1*/static domain_name_servers=1.1.1.1/g" /etc/dhcpcd.conf -systemctl daemon-reload +# check /etc/dhcpd.conf and /etc/dhcp/dhcpd.conf +if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "dietpi" ] ; then + sudo sed -i "s/^#static domain_name_servers=192.168.0.1*/static domain_name_servers=1.1.1.1/g" /etc/dhcpcd.conf + systemctl daemon-reload +fi +if [ "${baseImage}" = "ubuntu" ]; then + sudo sed -i "s/^#static domain_name_servers=192.168.0.1*/static domain_name_servers=1.1.1.1/g" /etc/dhcp/dhcpd.conf + systemctl daemon-reload +fi -# fixing locales for build -# https://github.com/rootzoll/raspiblitz/issues/138 -# https://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html -# https://stackoverflow.com/questions/38188762/generate-all-locales-in-a-docker-image -echo "" -echo "*** FIXING LOCALES FOR BUILD ***" -sudo sed -i "s/^# en_US.UTF-8 UTF-8.*/en_US.UTF-8 UTF-8/g" /etc/locale.gen -sudo sed -i "s/^# en_US ISO-8859-1.*/en_US ISO-8859-1/g" /etc/locale.gen -sudo locale-gen -export LANGUAGE=en_GB.UTF-8 -export LANG=en_GB.UTF-8 -export LC_ALL=en_GB.UTF-8 +if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "dietpi" ] ; then + # fixing locales for build + # https://github.com/rootzoll/raspiblitz/issues/138 + # https://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html + # https://stackoverflow.com/questions/38188762/generate-all-locales-in-a-docker-image + echo "" + echo "*** FIXING LOCALES FOR BUILD ***" + sudo sed -i "s/^# en_US.UTF-8 UTF-8.*/en_US.UTF-8 UTF-8/g" /etc/locale.gen + sudo sed -i "s/^# en_US ISO-8859-1.*/en_US ISO-8859-1/g" /etc/locale.gen + sudo locale-gen + export LANGUAGE=en_GB.UTF-8 + export LANG=en_GB.UTF-8 + export LC_ALL=en_GB.UTF-8 +fi # update debian echo "" @@ -95,36 +114,17 @@ echo "*** UPDATE DEBIAN ***" sudo apt-get update sudo apt-get upgrade -f -y --allow-change-held-packages +echo "" +echo "*** PREPARE ${baseImage} ***" + # special prepare when DietPi if [ "${baseImage}" = "dietpi" ]; then - echo "" - echo "*** PREPARE DietPi ***" echo "renaming dietpi user to pi" sudo usermod -l pi dietpi - echo "install pip" - sudo apt-get update - sudo apt-get remove -y fail2ban - sudo apt-get install -y build-essential - sudo apt-get install -y python-pip - # rsync is needed to copy from HDD - sudo apt install -y rsync - # install ifconfig - sudo apt install -y net-tools - #to display hex codes - sudo apt install -y xxd - # setuptools needed for Nyx - sudo pip install setuptools - # netcat for 00infoBlitz.sh - sudo apt install -y netcat - # install OpenSSH client + server - sudo apt install -y openssh-client - sudo apt install -y openssh-sftp-server fi # special prepare when Raspbian if [ "${baseImage}" = "raspbian" ]; then - echo "" - echo "*** PREPARE Raspbian ***" # do memory split (16MB) sudo raspi-config nonint do_memory_split 16 # set to wait until network is available on boot (0 seems to yes) @@ -139,6 +139,13 @@ if [ "${baseImage}" = "raspbian" ]; then sudo apt-get -y autoremove fi +# special prepare when Ubuntu or Armbian +if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then + # make user pi and add to sudo + sudo adduser --disabled-password --gecos "" pi + sudo adduser pi sudo +fi + echo "" echo "*** CONFIG ***" # based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#raspi-config @@ -163,6 +170,12 @@ if [ "${baseImage}" = "dietpi" ]; then sudo sed -i 's/agetty --autologin root %I $TERM/agetty --autologin pi --noclear %I 38400 linux/' /DietPi/dietpi/dietpi-autostart fi +if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then + sudo bash -c "echo '[Service]' >> /lib/systemd/system/getty@.service" + sudo bash -c "echo 'ExecStart=' >> /lib/systemd/system/getty@.service" + sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /lib/systemd/system/getty@.service" +fi + # change log rotates # see https://github.com/rootzoll/raspiblitz/issues/394#issuecomment-471535483 echo "/var/log/syslog" >> ./rsyslog @@ -260,6 +273,27 @@ sudo apt install -y sysbench sudo apt-get install -y redis-server sudo -H pip3 install redis +# check for dependencies on DietPi, Ubuntu, Armbian +sudo apt-get install -y build-essential +sudo apt-get install -y python-pip +# rsync is needed to copy from HDD +sudo apt install -y rsync +# install ifconfig +sudo apt install -y net-tools +#to display hex codes +sudo apt install -y xxd +# setuptools needed for Nyx +sudo pip install setuptools +# netcat for 00infoBlitz.sh +sudo apt install -y netcat +# install OpenSSH client + server +sudo apt install -y openssh-client +sudo apt install -y openssh-sftp-server +# install killall, fuser +sudo apt-get install -y psmisc +sudo apt-get clean +sudo apt-get -y autoremove + echo "" echo "*** ADDING MAIN USER admin ***" # based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#adding-main-user-admin @@ -273,6 +307,7 @@ sudo chsh admin -s /bin/bash # configure sudo for usage without password entry echo '%sudo ALL=(ALL) NOPASSWD:ALL' | sudo EDITOR='tee -a' visudo +echo "" echo "*** ADDING SERVICE USER bitcoin" # based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#adding-the-service-user-bitcoin @@ -310,9 +345,17 @@ echo "*** BITCOIN ***" # set version (change if update is available) bitcoinVersion="0.17.1" -# needed to make sure download is not changed -# calulate with sha256sum and also check with SHA256SUMS.asc -bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" +# set OS version +if [ ${isARM} -eq 1 ] ; then + bitcoinOSversion="arm" + # needed to make sure download is not changed + # calulate with sha256sum and also check with SHA256SUMS.asc + bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" +fi +if [ ${isAARCH64} -eq 1 ] ; then + bitcoinOSversion="aarch64" + bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" +fi # needed to check code signing laanwjPGP="01EA5486DE18A882D4C2684590C8019E36C2E964" @@ -323,7 +366,7 @@ sudo -u admin mkdir /home/admin/download cd /home/admin/download # download resources -binaryName="bitcoin-${bitcoinVersion}-arm-linux-gnueabihf.tar.gz" +binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}-linux-gnueabihf.tar.gz" sudo -u admin wget https://bitcoin.org/bin/bitcoin-core-${bitcoinVersion}/${binaryName} if [ ! -f "./${binaryName}" ] then @@ -420,19 +463,26 @@ echo "*** 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-rc4" -lndSHA256="3ed4b5e54afb6bf083a9693058dbf7d490e15837da5e5dc49ba06bfb942a1312" + +if [ ${isARM} -eq 1 ] ; then + lndOSversion="armv7" + lndSHA256="3ed4b5e54afb6bf083a9693058dbf7d490e15837da5e5dc49ba06bfb942a1312" +fi +if [ ${isAARCH64} -eq 1 ] ; then + lndOSversion="arm64" + lndSHA256="43c86a8fd50dc54d942bc85883202396da063780c249769f7b97b2159e8d5630" +fi # olaoluwa PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc" PGPcheck="BD599672C804AF2770869A048B80CD2BB8BD8132" - # bitconner #PGPpkeys="https://keybase.io/bitconner/pgp_keys.asc" #PGPcheck="9C8D61868A7C492003B2744EE7D737B67FA592C7" # get LND resources cd /home/admin/download -binaryName="lnd-linux-armv7-v${lndVersion}.tar.gz" +binaryName="lnd-linux-${lndOSversion}-v${lndVersion}.tar.gz" sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/${binaryName} sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt.sig @@ -447,7 +497,7 @@ fi # check gpg finger print gpg ./pgp_keys.asc -fingerprint=$(sudo -u admin gpg /home/admin/download/pgp_keys.asc 2>/dev/null | grep "${PGPcheck}" -c) +fingerprint=$(sudo gpg /home/admin/download/pgp_keys.asc 2>/dev/null | grep "${PGPcheck}" -c) if [ ${fingerprint} -lt 1 ]; then echo "" echo "!!! BUILD WARNING --> LND PGP author not as expected" @@ -470,7 +520,7 @@ fi # install sudo -u admin tar -xzf ${binaryName} -sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-armv7-v${lndVersion}/* +sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-${lndOSversion}-v${lndVersion}/* sleep 3 installed=$(sudo -u admin lnd --version) if [ ${#installed} -eq 0 ]; then @@ -604,7 +654,7 @@ sudo bash -c "echo 'source /home/admin/_commands.sh' >> /home/admin/.bashrc" sudo bash -c "echo '# automatically start main menu for admin' >> /home/admin/.bashrc" sudo bash -c "echo './00mainMenu.sh' >> /home/admin/.bashrc" -if [ "${baseImage}" = "raspbian" ]; then +if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "armbian" ] || [ "${baseImage}" = "ubuntu" ]; then # bash autostart for pi # run as exec to dont allow easy physical access by keyboard # see https://github.com/rootzoll/raspiblitz/issues/54 @@ -612,7 +662,8 @@ if [ "${baseImage}" = "raspbian" ]; then sudo bash -c 'echo "SCRIPT=/home/admin/00infoLCD.sh" >> /home/pi/.bashrc' sudo bash -c 'echo "# replace shell with script => logout when exiting script" >> /home/pi/.bashrc' sudo bash -c 'echo "exec \$SCRIPT" >> /home/pi/.bashrc' - +fi +if [ "${baseImage}" = "raspbian" ]; then # create /home/admin/setup.sh - which will get executed after reboot by autologin pi user cat > /home/admin/setup.sh < Date: Sun, 14 Apr 2019 14:43:33 +0100 Subject: [PATCH 2/6] documentation update --- FAQ.md | 2 +- alternative.platforms/README.md | 82 +++++++++++++++++++ .../hw_comparison.md | 7 +- dietpi/README.md | 4 +- 4 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 alternative.platforms/README.md rename {dietpi => alternative.platforms}/hw_comparison.md (93%) diff --git a/FAQ.md b/FAQ.md index d9e0d58..fad8068 100644 --- a/FAQ.md +++ b/FAQ.md @@ -579,7 +579,7 @@ Work Nodes for the process of producing a new sd card image release: ## Can I run RaspiBlitz on other computers than RaspberryPi? -There is an experimental section in this GitHub that tries to build for other SingleBoardComputers. Feel free to try it out and share your experience: [dietpi/README.md](dietpi/README.md) +There is an experimental section in this GitHub that tries to build for other SingleBoardComputers. Feel free to try it out and share your experience: [alternative.platforms/README.md](alternative.platforms/README.md) ## Can I flip the screen? diff --git a/alternative.platforms/README.md b/alternative.platforms/README.md new file mode 100644 index 0000000..0a60560 --- /dev/null +++ b/alternative.platforms/README.md @@ -0,0 +1,82 @@ +# ⚡️ Alternative platforms for the RaspiBlitz ⚡️ + +Minimum requirements: + +* ARM V7 or V8 processor architecture (32 or 64 bit) +* 1 GB RAM +* \> 300 GB diskspace + +Specifications of the tested hardware: [hw_comparison.md](hw_comparison.md) + +All testers are welcome. Open an issue for your specific board to collaborate and share your experience. + +--- +## Armbian +Many SBC-s are supported: +https://www.armbian.com/download/ + +Tested on: +* Odroid XU4 with the Armbian Stretch image from https://www.armbian.com/odroid-xu4/ + + +Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/). + +Assemble and boot. + +`ssh root@192.168.1.122` + +password: 1234 + +Follow the instructions in the terminal. + +Continue with building the SDcard: https://github.com/rootzoll/raspiblitz#build-the-sd-card-image + +--- + +## Ubuntu + +A common distro to be supplied by the manufacturer for various boards. + +Tested on: +* Odroid XU4 with ubuntu-18.04.1-4.14-minimal image from https://de.eu.odroid.in/ubuntu_18.04lts/XU3_XU4_MC1_HC1_HC2 + +Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/). + +Assemble and boot. + +`ssh root@192.168.1.122` + +password: odroid + +`apt-get update` + +`apt-get upgrade` + +if there is an error: +>E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) + +>E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? + +run: +`reboot` and update as above + +Continue with building the SDcard: https://github.com/rootzoll/raspiblitz#build-the-sd-card-image + +--- + +## DietPi + +Many SBC-s are supported: +https://dietpi.com/#download + +Tested on: + +* Odroid HC1 +* Odroid HC2 (the same board with a 3.5" 12V HDD) +* Odroid XU4 (with HDMI screen) +* Raspberry Pi 3 B+ (with the default GPIO or HDMI display) + + +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) \ No newline at end of file diff --git a/dietpi/hw_comparison.md b/alternative.platforms/hw_comparison.md similarity index 93% rename from dietpi/hw_comparison.md rename to alternative.platforms/hw_comparison.md index 0cbf8dc..cee367e 100644 --- a/dietpi/hw_comparison.md +++ b/alternative.platforms/hw_comparison.md @@ -1,3 +1,9 @@ +## SBC benchmarks: + +https://github.com/ThomasKaiser/sbc-bench/blob/master/Results.md + +https://dietpi.com/survey/#benchmark + ### Raspberry Pi 3 Model B+ * Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz @@ -45,4 +51,3 @@ ROCK64 is a credit card size 4K60P HDR Single Board Computer powered by * MicroSD Card slot * Pi-2 Bus * Pi-P5+ Bus - diff --git a/dietpi/README.md b/dietpi/README.md index fe3e19e..8d41e2a 100644 --- a/dietpi/README.md +++ b/dietpi/README.md @@ -1,6 +1,4 @@ # ⚡️ RaspiBlitz-on-DietPi ⚡️ -# A hardware agnostic platform - This guide was tested on: @@ -9,7 +7,7 @@ This guide was tested on: * Odroid XU4 (with HDMI screen) * Raspberry Pi 3 B+ (with the default GPIO or HDMI display) -See the [hardware comparison](hw_comparison.md). +See the [hardware comparison](/alternative.platforms/hw_comparison.md). 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 From 71c99954804c938ba4aded4291c8a42ada94dc25 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 17:56:21 +0100 Subject: [PATCH 3/6] add desirable hw spec --- alternative.platforms/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/alternative.platforms/README.md b/alternative.platforms/README.md index 0a60560..f0a5b1e 100644 --- a/alternative.platforms/README.md +++ b/alternative.platforms/README.md @@ -1,10 +1,17 @@ # ⚡️ Alternative platforms for the RaspiBlitz ⚡️ Minimum requirements: - * ARM V7 or V8 processor architecture (32 or 64 bit) * 1 GB RAM -* \> 300 GB diskspace +* \> 300 GB HDD + +Desirable: +* \> 2GB DDR3 RAM +* USB 3.0 or SATA connector +* SSD +* Compact case with efficient cooling (heatsink / fan) +* HDMI / GPIO screen + Specifications of the tested hardware: [hw_comparison.md](hw_comparison.md) @@ -79,4 +86,8 @@ 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) \ No newline at end of file +Detailed instructions for the RaspiBlitz-on-DietPi: [/dietpi/README.md](/dietpi/README.md) + +--- +Extras for advanced users and powerful hardware: +https://github.com/openoms/bitcoin-tutorials/ \ No newline at end of file From 3110074161c2859c8e9508a117363d616d90362c Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 18:56:01 +0100 Subject: [PATCH 4/6] fix ifconfig eth0: error in Armbian --- home.admin/00infoBlitz.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 1403456..2d89171 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -75,8 +75,15 @@ else fi # get network traffic -network_rx=$(ifconfig eth0 | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') -network_tx=$(ifconfig eth0 | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') +# ifconfig does not show eth0 on Armbian - get first traffic info +isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian') +if [ ${isArmbian} -gt 0 ]; 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 + network_rx=$(ifconfig eth0 | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') + network_tx=$(ifconfig eth0 | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') +fi # Bitcoin blockchain btc_path=$(command -v ${network}-cli) From 652292bcf64c12407175f33946f4e5fdac59726d Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 21:41:05 +0100 Subject: [PATCH 5/6] fix bitcoinOSversion --- build_sdcard.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index fcff651..9aeb4df 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -347,13 +347,13 @@ bitcoinVersion="0.17.1" # set OS version if [ ${isARM} -eq 1 ] ; then - bitcoinOSversion="arm" + bitcoinOSversion="arm-linux-gnueabihf" # needed to make sure download is not changed # calulate with sha256sum and also check with SHA256SUMS.asc bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" fi if [ ${isAARCH64} -eq 1 ] ; then - bitcoinOSversion="aarch64" + bitcoinOSversion="aarch64-linux-gnu" bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" fi @@ -366,7 +366,7 @@ sudo -u admin mkdir /home/admin/download cd /home/admin/download # download resources -binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}-linux-gnueabihf.tar.gz" +binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}.tar.gz" sudo -u admin wget https://bitcoin.org/bin/bitcoin-core-${bitcoinVersion}/${binaryName} if [ ! -f "./${binaryName}" ] then From 0e7a7e6bf56ad70176ad5a3f549fd0e7da5ffe19 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 21:42:23 +0100 Subject: [PATCH 6/6] fix bitcoinOSversion --- build_sdcard.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index fcff651..9aeb4df 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -347,13 +347,13 @@ bitcoinVersion="0.17.1" # set OS version if [ ${isARM} -eq 1 ] ; then - bitcoinOSversion="arm" + bitcoinOSversion="arm-linux-gnueabihf" # needed to make sure download is not changed # calulate with sha256sum and also check with SHA256SUMS.asc bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" fi if [ ${isAARCH64} -eq 1 ] ; then - bitcoinOSversion="aarch64" + bitcoinOSversion="aarch64-linux-gnu" bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" fi @@ -366,7 +366,7 @@ sudo -u admin mkdir /home/admin/download cd /home/admin/download # download resources -binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}-linux-gnueabihf.tar.gz" +binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}.tar.gz" sudo -u admin wget https://bitcoin.org/bin/bitcoin-core-${bitcoinVersion}/${binaryName} if [ ! -f "./${binaryName}" ] then