raspberry
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
raspberry [2018/07/22 13:51] – [SSH auf Raspbian Lite] karl | raspberry [2022/03/15 09:04] (aktuell) – karl | ||
---|---|---|---|
Zeile 12: | Zeile 12: | ||
sudo dd bs=10M if=RuneAudio_rpi2_rp3_0.4-beta_20160321_2GB.img | pv -s 2100M | sudo dd of=/dev/sdc | sudo dd bs=10M if=RuneAudio_rpi2_rp3_0.4-beta_20160321_2GB.img | pv -s 2100M | sudo dd of=/dev/sdc | ||
wobei pv die Imagegröße mitgegeben werden kann, und man somit eine Zeitschätzung erhält. | wobei pv die Imagegröße mitgegeben werden kann, und man somit eine Zeitschätzung erhält. | ||
+ | |||
+ | ==== Auflisten der Installierten Pakete ==== | ||
+ | Möchte man wissen, was alles installiert wurde nach der frischen Installation von Raspbian, kann man sich das ausgeben lassen: | ||
+ | cat / | ||
===== Headless with UART ===== | ===== Headless with UART ===== | ||
add this line to **config.txt** | add this line to **config.txt** | ||
Zeile 27: | Zeile 31: | ||
{{ :: | {{ :: | ||
===== Headless with WiFi ===== | ===== Headless with WiFi ===== | ||
- | https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md | + | First: create a file in '' |
+ | |||
+ | <code, wpa_supplicant.conf> | ||
+ | country=AT | ||
+ | update_config=1 | ||
+ | ctrl_interface=/var/run/wpa_supplicant | ||
+ | |||
+ | network={ | ||
+ | ssid=" | ||
+ | psk=" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | Second: create a file '' | ||
+ | |||
+ | Then insert the SD card into the Raspi and start to scan for the Raspberry' | ||
+ | nmap -T5 -sn 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 45: | Zeile 71: | ||
EDIT: scheint seit Beginn 2018 nicht mehr so zu funktionieren. Alternativ kann man sich per UART verbinden und mit '' | EDIT: scheint seit Beginn 2018 nicht mehr so zu funktionieren. Alternativ kann man sich per UART verbinden und mit '' | ||
+ | |||
+ | EDIT2: geht doch. mit kopieren der datei '' | ||
===== Add a Service Module ===== | ===== Add a Service Module ===== | ||
To execute a programm on each boot automatically, | To execute a programm on each boot automatically, | ||
Zeile 59: | Zeile 87: | ||
[Service] | [Service] | ||
Type=simple | Type=simple | ||
+ | WorkingDirectory=/ | ||
ExecStart=/ | ExecStart=/ | ||
Restart=on-abort | Restart=on-abort | ||
Zeile 73: | Zeile 102: | ||
sudo systemctl start hello.service | sudo systemctl start hello.service | ||
+ | ==== Inspect the Logs ==== | ||
+ | journalctl -u hello | ||
+ | |||
+ | ===== Image Erstellen ===== | ||
+ | Ein Image wird ganz einfach per dd erstellt. Vorher sollte es aber z.B. mit **gparted** auf die notwendige Größe verkleinert werden. Dann Image erstellen und mit '' | ||
+ | |||
+ | truncate --size=2782920704 image.img | ||
+ | |||
+ | Dabei wird die Größe mittels | ||
+ | fdisk -l image.img | ||
+ | berechnet: 512 Bytes/ | ||
+ | |||
+ | ==== Verkleinern ==== | ||
+ | Wurde das Image bereits erstellt und hat z.B. 16GB, dann kann es recht einfach so verkleinert werden: | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | Quelle: https:// | ||
===== 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 112: | Zeile 164: | ||
rm myprogram | rm myprogram | ||
</ | </ | ||
+ | |||
+ | ===== Realtime Kernel ===== | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | Auf dem Raspberry Pi, mit Raspberry OS vom 11. Jan. 2021 ((https:// | ||
+ | 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:// | ||
+ | | ||
+ | Configure Kernel ((https:// | ||
+ | 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/ | ||
+ | sudo cp arch/ | ||
+ | sudo cp arch/ | ||
+ | sudo cp arch/ | ||
+ | |||
+ | |||
+ | |||
+ | |||
{{tag> | {{tag> | ||
raspberry.1532260314.txt.gz · Zuletzt geändert: 2018/07/22 13:51 von karl