Benutzer-Werkzeuge

Webseiten-Werkzeuge


raspberry

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte Überarbeitung Beide Seiten der Revision
raspberry [2018/09/03 00:24]
karl [Start the Service]
raspberry [2021/03/12 22:46]
karl [Realtime Kernel]
Zeile 31: Zeile 31:
 {{ ::raspberry-uart.png?direct&400 |}} {{ ::raspberry-uart.png?direct&400 |}}
 ===== Headless with WiFi ===== ===== Headless with WiFi =====
-https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md+Firstcreate a file in ''boot'' with this content: 
 + 
 +<code, wpa_supplicant.conf> 
 +country=AT 
 +update_config=1 
 +ctrl_interface=/var/run/wpa_supplicant 
 + 
 +network={ 
 +    ssid="Singervilla-iNet-2.4G" 
 +    psk="myStrongPassword" 
 +
 +</code> 
 + 
 +Second: create a file ''ssh'' in ''boot''.  
 + 
 +Then insert the SD card into the Raspi and start to scan for the Raspberry's IP-Address with 
 +  nmap -T5 -sP 10.0.1.0-255 
 +or with 
 +  arp -a 
 +Then connect to it with e.g. 
 +  ssh pi@10.0.1.169 
 + 
 +  
  
 ===== Headless with Ethernet ===== ===== Headless with Ethernet =====
Zeile 49: Zeile 71:
  
 EDIT: scheint seit Beginn 2018 nicht mehr so zu funktionieren. Alternativ kann man sich per UART verbinden und mit ''raspi-config'' ssh einschalten.  EDIT: scheint seit Beginn 2018 nicht mehr so zu funktionieren. Alternativ kann man sich per UART verbinden und mit ''raspi-config'' ssh einschalten. 
 +
 +EDIT2: geht doch. mit kopieren der datei ''config.txt'' und umbenennen auf ''ssh'' ((vielleicht gabs oben ein Problem mit den Dateiberechtigungen...))
 ===== Add a Service Module ===== ===== Add a Service Module =====
 To execute a programm on each boot automatically, here is a good tutorial:   To execute a programm on each boot automatically, here is a good tutorial:  
Zeile 63: Zeile 87:
 [Service] [Service]
 Type=simple Type=simple
 +WorkingDirectory=/home/karl/hello-service
 ExecStart=/usr/bin/python /home/pi/hello_world.py ExecStart=/usr/bin/python /home/pi/hello_world.py
 Restart=on-abort Restart=on-abort
Zeile 76: Zeile 101:
   sudo systemctl enable hello.service   sudo systemctl enable hello.service
   sudo systemctl start hello.service   sudo systemctl start hello.service
 +
 +==== Inspect the Logs ====
 +  journalctl -u hello
  
 ===== Image Erstellen ===== ===== Image Erstellen =====
Zeile 86: Zeile 114:
 berechnet: 512 Bytes/Sector * (5435391+1) Sectors = 2782920704 Bytes berechnet: 512 Bytes/Sector * (5435391+1) Sectors = 2782920704 Bytes
  
 +==== Verkleinern ====
 +Wurde das Image bereits erstellt und hat z.B. 16GB, dann kann es recht einfach so verkleinert werden: 
 +<code>
 +sudo modprobe loop
 +sudo losetup -f
 +sudo losetup /dev/loop0 myimage.img
 +sudo partprobe /dev/loop0
 +sudo gparted /dev/loop0
 +sudo losetup -d /dev/loop0
 +</code>
 +Quelle: https://softwarebakery.com/shrinking-images-on-linux
 ===== PIGPIO ===== ===== PIGPIO =====
 A very great library for hardware access of the IO-pins: \\ A very great library for hardware access of the IO-pins: \\
Zeile 125: Zeile 164:
  rm myprogram  rm myprogram
 </code> </code>
 +
 +===== Realtime Kernel =====
 +  * https://www.get-edi.io/Real-Time-Linux-on-the-Raspberry-Pi/
 +  * https://github.com/lueschem/edi-pi#creating-a-cross-development-lxd-container
 +  * https://www.get-edi.io/
 +  * https://www.raspberrypi.org/documentation/linux/kernel/building.md
 +  * https://medium.com/@patdhlk/realtime-linux-e97628b51d5d
 +  * https://lemariva.com/blog/2019/09/raspberry-pi-4b-preempt-rt-kernel-419y-performance-test
 +
 +Auf dem Raspberry Pi, mit Raspberry OS vom 11. Jan. 2021 ((https://www.raspberrypi.org/documentation/linux/kernel/building.md)):
 +  sudo apt update
 +  sudo apt upgrade
 +  sudo apt install git bc bison flex libssl-dev make
 +  git clone --depth=1 --branch rpi-4.19.y-rt https://github.com/raspberrypi/linux
 +  
 +Configure Kernel ((https://www.raspberrypi.org/documentation/linux/kernel/configuring.md)):
 +  sudo apt install libncurses5-dev
 +  cd linux
 +  make menuconfig
 +  
 +Hierbei wurde jedoch weiters nichts konfiguriert. 
 +
 +  make bcm2711_defconfig
 +  make -j4 zImage 
 +  make -j4 modules 
 +  make -j4 dtbs 
 +
 +Dauert etwa 1h15min. 
 +
 +  sudo make -j4 modules_install 
 +  sudo make -j4 dtbs_install
 +  sudo cp arch/arm/boot/dts/*.dtb /boot/
 +  sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
 +  sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
 +  sudo cp arch/arm/boot/zImage /boot/$KERNEL-rt.img
 +
 +
 +
 +
  
 {{tag>english software raspberry c++ linux technical}} {{tag>english software raspberry c++ linux technical}}
  
raspberry.txt · Zuletzt geändert: 2022/03/15 09:04 von karl