This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hardwarerelated:raspberry_pi_4 [2019/09/19 00:43] chris [using 2.9“ 296×128 ePaper Display Modue/SPI Interface] |
hardwarerelated:raspberry_pi_4 [2020/12/29 10:26] (current) chris [Which OS to run?] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== sensors/ | + | ===== Which OS to run? ===== |
- | * Raspberry Pi USB-C power supply 5,1V / 3,0A, EU | + | * **Raspbian** |
- | * Micro HDMI Adaptercable D-Stecker -A-Buchse 15cm schwarz | + | * is easiest to setup, and most widely used |
- | * 4 teiliges Kühlkörper Set für Raspberry Pi 4, silber ([[https:// | + | * [[https:// |
- | * Raspberry Pi 4 B, 2GB RAM | + | * **Fedora32** |
- | * HC-SR501 PIR Sensor -Infrarot Bewegungsmelder | + | * [[/ |
- | * Feuchtigkeitssensor mit digitalem und analogem Ausgang | + | * [[/ |
- | * Lichtsensor mit digitalem Ausgang | + | * [[/ |
- | * RFID Lesegerät mit SPI Schnittstelle inkl. Karte & Dongle ([[https://www.berrybase.de/raspberry-pi-co/raspberry-pi/module-sensoren/rfid-leseger-228-t-mit-spi-schnittstelle-inkl.-karte-dongle|link]]) | + | |
- | * PCF8591 AD/ DA Konverter Modul [[https://www.berrybase.de/raspberry-pi-co/raspberry-pi/module-sensoren/pcf8591-ad/da-konverter-modul|link]] | + | * [[https:// |
- | * 2.9" 296×128 ePaper Display Modul mit SPI Interface, dreifarbig (rot, schwarz, weiß) | + | * **Centos** images exist |
+ | * [[https://people.centos.org/pgreco/CentOS-Userland-8-stream-aarch64-RaspberryPI-Minimal-4/|Centos 8 userland 4raspi4 image]] | ||
+ | * [[https://wiki.centos.org/SpecialInterestGroup/AltArch/armhfp? | ||
+ | * **Debian** | ||
+ | * [[https://david.wragg.org/blog/2020/01/installing-64-bit-debian-on-rpi.html|Installing 64-bit Debian/ | ||
+ | * Images can boot with kernel 5.5 and 5.6 | ||
+ | | ||
+ | * **Android** | ||
+ | * [[https://www.raspberrypi.org/forums/viewtopic.php? | ||
+ | * [[https://forum.xda-developers.com/ | ||
- | ==== first steps after booting | + | You can also put multiple OS's on one card, for example RaspiOS/ |
+ | ===== Links ===== | ||
+ | * [[/ | ||
+ | * Building a HDMI signal grabber with the raspi would be nice | ||
+ | * Toshiba TC358743 based addon boards for the raspi are available, there is Linux support. | ||
+ | * [[https:// | ||
+ | * How to [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== It feels slow! ===== | ||
+ | How to distinguish which resource is under pressure? Measure. ' | ||
+ | |||
+ | * **CPU:** | ||
+ | * Buy good case/ | ||
+ | * consider overclocking | ||
+ | * 32bit or 64bit kernel? Depends on your application. Some results are [[https:// | ||
+ | * **Network: | ||
+ | * Verify gbit mode is properly set, with ethtool | ||
+ | * **I/O:** My first 'its slow' impression was from 'dnf -y update' | ||
+ | * Move the partition to USB3 connected devices (but USB flash can be as slow as sdcards. SSD are an option.) | ||
+ | * Move the part where I/O is done to NFS via ethernet, for example if kernel compilation is causing the load these directories can be moved. | ||
+ | * Buy sdcards doing well with random 4k access. | ||
+ | |||
+ | Measuring size of your I/O requests: | ||
< | < | ||
- | # ssh pi@<ip> | + | # https:// |
+ | dnf -y install bcc | ||
+ | / | ||
+ | |||
+ | # Then perform your I/O intensive operation, for example: | ||
+ | dnf -y update | ||
+ | |||
+ | # Evaluation of my I/O for 'dnf update', | ||
+ | 0 -> 1 : 2487 | ||
+ | 2 -> 3 : 2327 | ||
+ | 4 -> 7 : 19501 (54%) | ||
+ | 8 -> 15 : 4443 | ||
+ | 16 -> 31 : 3687 | ||
+ | 32 -> 63 : 1979 | ||
+ | 64 -> 127 : 371 (1%) | ||
+ | 128 -> 255 : 223 (1%) | ||
+ | 256 -> 511 : 514 (1%) | ||
+ | 512 -> 1023 : 327 (1%) | ||
+ | 1024 -> 2047 : 497 (1%) | ||
+ | => So when looking at benchmarks, 4k random access is most interesting | ||
+ | </ | ||
+ | |||
+ | ===== Raspbian cheatsheet ===== | ||
+ | < | ||
+ | ### Installation, | ||
+ | # https:// | ||
+ | dd bs=4M if=2020-05-27-raspios-buster-lite-armhf.img of=/ | ||
+ | mount / | ||
+ | touch / | ||
+ | umount /mnt/tmp | ||
+ | |||
+ | # Put the card into the raspi, boot it | ||
+ | nmap -sP 192.168.0.0/ | ||
+ | # ssh < | ||
- | useradd | + | cat >> |
- | passwd chris | + | # extend prompt to have temperature |
+ | export PS1=' | ||
+ | # colored iostat output | ||
+ | export S_COLORS=always | ||
+ | alias ll='ls -al' | ||
+ | export LC_ALL=en_GB.UTF-8 | ||
+ | EOT | ||
- | sudo su - | + | # I like gkrellm |
- | echo "alias ll='ls -al'" | + | apt install |
- | echo "alias su=' | + | echo 'allow-host 192.168.0.2' >>/ |
+ | systemctl enable gkrellmd | ||
+ | systemctl restart gkrellmd | ||
### check cpu temperature | ### check cpu temperature | ||
Line 41: | Line 114: | ||
### temperature in prompt | ### temperature in prompt | ||
$ export PS1=' | $ export PS1=' | ||
+ | |||
+ | ### firmware update | ||
+ | apt update | ||
+ | apt upgrade | ||
+ | apt full-upgrade # update to new major versions | ||
+ | apt install rpi-eeprom | ||
+ | rpi-eeprom-update | ||
+ | rpi-eeprom-update -a | ||
+ | |||
+ | # If you want to try newer kernels for testing | ||
+ | BRANCH=master rpi-update | ||
+ | # BRANCH=next rpi-update | ||
</ | </ | ||
- | ==== overheating | + | ===== Overheating |
- | * My first use of the pi4 was in 32°C environment temperature, | + | Table below: |
- | * I had directly ordered a set of passive coolers with the pi4, I placed these 4 on the chips, but things got not much better. | + | * Raspbian, updates and firmware as of 2020-05-02 |
- | * There is a firmware update (labelled 'alpha status' | + | * cpu temp: ' |
+ | * cpu temp with load: 4x ' | ||
+ | |||
+ | ^cooling method | ||
+ | |[[https:// | ||
+ | |[[https:// | ||
+ | |none |26°C | ||
+ | |[[https:// | ||
+ | |[[https:// | ||
+ | |||
+ | * My first use of the pi4 was in 32°C environment temperature, | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
* Underclocking could be an option: | * Underclocking could be an option: | ||
< | < | ||
Line 58: | Line 155: | ||
# then reboot | # then reboot | ||
</ | </ | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | ==== benchmarking | + | ===== Using 2.9“ 296×128 ePaper Display Modue/SPI Interface |
- | * microsd-cards [[https:// | + | My initial |
- | * https:// | + | |
- | + | ||
- | ==== benchmark results ==== | + | |
- | ^ ^raspberry pi 4^Nintendo switch | + | |
- | |ram | + | |
- | |price | + | |
- | |distro | + | |
- | |kernel | + | |
- | |cpu |ARM Cortex-A72|ARM Cortex-A57 | + | |
- | |cpu frequency | + | |
- | |sbc memcopy | + | |
- | |sbc memset | + | |
- | |7-zip score | + | |
- | |openssl aes-128-cbc 16b |62533k | + | |
- | |openssl aes-128-cbc 16kb|85235k | + | |
- | |openssl aes-256-cbc 16kb|64918k | + | |
- | + | ||
- | * I used [[https:// | + | |
- | * percentages: | + | |
- | * RAM size is not important for the tests which were performed, less than 2GB were used. | + | |
- | * [[https:// | + | |
- | * sbc execution: | + | |
- | < | + | |
- | wget https:// | + | |
- | sudo /bin/bash ./ | + | |
- | </ | + | |
- | + | ||
- | ==== benchmarking future ==== | + | |
- | * power: need a usb-c power meter for that | + | |
- | * then compute how much electrical power is required for certain operations. | + | |
- | * GPU: | + | |
- | * would be especially interesting to also compare various 3D driver implementations. For example, 3D benchmarks running on horizon (Nintendos OS) and also on Linux/ | + | |
- | * It's hard to only measure the GPU. It's also a question of how good the 3D drivers are. | + | |
- | * Benchmarks should include retro game emulation. Simply because it's a common use case for pi4 and switch/ | + | |
- | * free snes rom? | + | |
- | * geekbench | + | |
- | + | ||
- | ==== using 2.9“ 296×128 ePaper Display Modue/SPI Interface ==== | + | |
- | My initial | + | |
< | < | ||
chris@raspberrypi: | chris@raspberrypi: | ||
Line 132: | Line 188: | ||
</ | </ | ||
- | ==== further | + | ===== Sensors/ |
- | * [[http://retroflag.com/|retroflag]] cases do not support raspi4 as of 2019-09 | + | List of the hardware/ |
+ | * Raspberry Pi USB-C power supply 5,1V / 3,0A, EU | ||
+ | * Micro HDMI Adaptercable D-Stecker -A-Buchse 15cm schwarz | ||
+ | * 4 teiliges Kühlkörper Set für Raspberry Pi 4, silber ([[https://www.amazon.de/ | ||
+ | * Raspberry Pi 4 B, 2GB RAM | ||
+ | * HC-SR501 PIR Sensor -Infrarot Bewegungsmelder [[https:// | ||
+ | * Feuchtigkeitssensor mit digitalem und analogem Ausgang [[https:// | ||
+ | * Lichtsensor mit digitalem Ausgang [[https:// | ||
+ | * RFID Lesegerät mit SPI Schnittstelle inkl. Karte & Dongle ([[https:// | ||
+ | * PCF8591 AD/ DA Konverter Modul [[https:// | ||
+ | * 2.9" 296×128 ePaper Display Modul mit SPI Interface, dreifarbig (rot, schwarz, weiß) [[https:// | ||
+ | |||
+ | ===== Configuring network over usb-c ===== | ||
+ | < | ||
+ | # https:// | ||
+ | vi / | ||
+ | # add: dtoverlay=dwc2 | ||
+ | vi / | ||
+ | # add: modules-load=dwc2, | ||
+ | reboot | ||
+ | ifconfig -a # should show interface usb0 | ||
+ | ip addr add 192.168.1.4/ | ||
+ | ip link set up dev usb0 | ||
+ | |||
+ | # on the opposite system | ||
+ | ip addr add 192.168.1.4/ | ||
+ | ip link set up dev enp0s20f0u1i1 | ||
+ | </ | ||
+ | |||
+ | ^ | ||
+ | |usb-c network | ||
+ | |pi4 gbit ethernet|0.24-0.3ms | ||
+ | |||
+ | * latency, ICMP RTT: 0.2-0.3ms (gbit ethernet: 0.24-0.3ms) | ||
+ | * bandwidth: 16mbyte/sec down / 22mbyte/sec up (gbit ethernet: 90mbyte/sec down / 50mbyte/sec up) | ||
+ |