From 4b47a9eef6a9e3daa22173792adfff5e5df11369 Mon Sep 17 00:00:00 2001 From: bavarianledger <48831982+bavarianledger@users.noreply.github.com> Date: Sun, 19 May 2019 16:25:47 +0200 Subject: [PATCH 1/9] added "special prepare when Nvidia Jetson Nano" Disables GUI/X11 login to make sure that you can login after rebooting. --- build_sdcard.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_sdcard.sh b/build_sdcard.sh index 0fd291f..d3795db 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -148,6 +148,12 @@ if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then sudo adduser pi sudo fi +# special prepare when Nvidia Jetson Nano +if [ "${baseImage}" = "ubuntu" ] && [ ${isAARCH64} -eq 1 ] ; then + # disable GUI on boot + sudo systemctl set-default multi-user.target +fi + echo "" echo "*** CONFIG ***" # based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#raspi-config From 422427d7260df477d7be6d589c89bffac18e8a4c Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 29 May 2019 15:50:37 +0100 Subject: [PATCH 2/9] let bootstarp finish on every system --- home.admin/_bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index e71d944..71076b6 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -506,7 +506,7 @@ if [ "${baseImage}" = "raspbian" ] ; then 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 +fi - echo "DONE BOOTSTRAP" >> $logFile - exit 0 -fi \ No newline at end of file +echo "DONE BOOTSTRAP" >> $logFile +exit 0 From e0d9f349fc83ea0a4a1f4450c0aa4c41db40eb29 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 29 May 2019 15:52:13 +0100 Subject: [PATCH 3/9] make stresstest exit 0 if not on Raspbian --- home.admin/config.scripts/blitz.stresstest.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home.admin/config.scripts/blitz.stresstest.sh b/home.admin/config.scripts/blitz.stresstest.sh index 1798dda..dc39ff5 100644 --- a/home.admin/config.scripts/blitz.stresstest.sh +++ b/home.admin/config.scripts/blitz.stresstest.sh @@ -7,6 +7,12 @@ if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then exit 1 fi +isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian') +if [ ${isRaspbian} -eq 0 ]; then + echo "the OS is not Raspbian - the stresstest is only for the Raspberry Pi" + exit 0 +fi + # Based on https://github.com/bamarni/pi64/issues/4#issuecomment-292707581 # sysbench manual: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf From d556a8e36b4e9008f47e3902f0d2e4181ec8399e Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 29 May 2019 19:30:44 +0100 Subject: [PATCH 4/9] add ubuntu bionic repo to sources.list --- home.admin/config.scripts/internet.tor.sh | 36 +++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/internet.tor.sh b/home.admin/config.scripts/internet.tor.sh index 9dbdbb7..9871c98 100755 --- a/home.admin/config.scripts/internet.tor.sh +++ b/home.admin/config.scripts/internet.tor.sh @@ -12,6 +12,33 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then exit 1 fi +echo "Detect Base Image ..." +baseImage="?" +isDietPi=$(uname -n | grep -c 'DietPi') +isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian') +isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian') +isUbuntu=$(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu') +if [ ${isRaspbian} -gt 0 ]; then + baseImage="raspbian" +fi +if [ ${isArmbian} -gt 0 ]; then + baseImage="armbian" +fi +if [ ${isUbuntu} -gt 0 ]; then +baseImage="ubuntu" +fi +if [ ${isDietPi} -gt 0 ]; then + baseImage="dietpi" +fi +if [ "${baseImage}" = "?" ]; then + cat /etc/os-release 2>/dev/null + echo "!!! FAIL !!!" + echo "Base Image cannot be detected or is not supported." + exit 1 +else + echo "OK running ${baseImage}" +fi + # function: install keys & sources prepareTorSources() { @@ -29,8 +56,13 @@ prepareTorSources() echo "" echo "*** Adding Tor Sources to sources.list ***" - echo "deb https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list - echo "deb-src https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list + if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "armbian" ] || [ "${baseImage}" = "dietpi" ]; then + echo "deb https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list + echo "deb-src https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list + elif [ "${baseImage}" = "ubuntu" ]; then + echo "deb https://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list + echo "deb-src https://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list + fi echo "OK" echo "" } From e7cbe6175e63e084dc7ebc3ef8591c1e04c4fa76 Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 30 May 2019 13:46:20 +0100 Subject: [PATCH 5/9] add check for python-dev --- build_sdcard.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_sdcard.sh b/build_sdcard.sh index 46692df..9255179 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -278,6 +278,7 @@ 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 +sudo apt-get install -y python-dev # rsync is needed to copy from HDD sudo apt install -y rsync # install ifconfig @@ -293,6 +294,7 @@ 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 From 71b3a2a2a5c4a4279860275c50634c1223b0831a Mon Sep 17 00:00:00 2001 From: Simone Da Re Date: Sat, 1 Jun 2019 14:49:00 +0200 Subject: [PATCH 6/9] Update italian power link --- shoppinglist_it.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shoppinglist_it.md b/shoppinglist_it.md index 1c78883..0945215 100644 --- a/shoppinglist_it.md +++ b/shoppinglist_it.md @@ -2,7 +2,7 @@ * RaspBerry Pi 3: https://www.amazon.it/dp/B07BDR5PDW/ * Micro SD-Card 32GB: https://www.amazon.it/dp/B07CY3QSST -* Power: https://www.amazon.it/dp/B01566WOAG +* Power: https://www.amazon.it/dp/B01JZE38QE * 1TB Hard Drive: https://www.amazon.it/dp/B07997KKSK * Heatsink-Case: https://www.amazon.it/dp/B07KYCNF1D * LCD-Display: https://www.amazon.it/dp/B06ZZBL1C4 \ No newline at end of file From 8f37c51b817294c7c7c5c312a0222b0515b453fc Mon Sep 17 00:00:00 2001 From: bavarianledger <48831982+bavarianledger@users.noreply.github.com> Date: Fri, 7 Jun 2019 11:02:50 +0200 Subject: [PATCH 7/9] Introduce a variable to identify the Nvidia based on a suggestion from @openoms --- build_sdcard.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index d3795db..7b1b5de 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -62,6 +62,7 @@ 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') +isNvidia=$(uname -a | grep -c 'tegra') if [ ${isRaspbian} -gt 0 ]; then baseImage="raspbian" fi @@ -149,7 +150,7 @@ if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then fi # special prepare when Nvidia Jetson Nano -if [ "${baseImage}" = "ubuntu" ] && [ ${isAARCH64} -eq 1 ] ; then +if [ ${isNvidia} -eq 1 ] ; then # disable GUI on boot sudo systemctl set-default multi-user.target fi From f281489a3686119a2605ec0f94d20d628a0ac367 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 12 Jun 2019 18:46:09 +0100 Subject: [PATCH 8/9] mklabel msdos if there is no partition --- home.admin/00raspiblitz.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index 27d7c46..2ac8435 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -20,6 +20,7 @@ if [ ${hddExists} -eq 0 ]; then echo "Press ENTER to create a Partition - or CTRL+C to abort" read key echo "Creating Partition ..." + sudo parted -s /dev/sda mklabel msdos sudo parted -s /dev/sda unit s mkpart primary `sudo parted /dev/sda unit s print free | grep 'Free Space' | tail -n 1` echo "DONE." sleep 3 From 858648fc480d16a1130dcaf29b1573be4955fa96 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 12 Jun 2019 19:07:31 +0100 Subject: [PATCH 9/9] add Nvidia Jetson Nano image link --- alternative.platforms/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alternative.platforms/README.md b/alternative.platforms/README.md index 00fd022..c90f797 100644 --- a/alternative.platforms/README.md +++ b/alternative.platforms/README.md @@ -18,7 +18,7 @@ Specifications of the tested hardware: [hw_comparison.md](hw_comparison.md) All testers are welcome. Open an issue for your specific board to collaborate and share your experience. --- -## Armbian +## Armbian Stretch Many SBC-s are supported: https://www.armbian.com/download/ @@ -40,12 +40,13 @@ Continue with building the SDcard: https://github.com/rootzoll/raspiblitz#build- --- -## Ubuntu +## Ubuntu Bionic A common distro to be supplied by the manufacturer for various boards. 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 +* Nvidia Jetson Nano with Ubuntu Bionic image from https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).