Raspberry Pi 3, Services

systemd
What is an init system?
Running Programs Automatically on Your Tiny Computer: systemd: Writing and Enabling a Service
Raspberry Pi Boot Process
Clarification about the boot process (systemd / init)
How To Use Systemctl to Manage Systemd Services and Units
How To Configure a Linux Service to Start Automatically After a Crash or Reboot – Part 2: Reference
How does systemd use /etc/init.d scripts?

Before: SysVinit (System V init, or just init)
Now:    systemd
- In systemd, there is no concept of runlevels.
- These are replaced by targets.
- Targets can and do depend on each other.
  basic.target => multi-user.target => graphical.target
- Under SysVinit, scripts run strictly in order

runlevel                                             => systemd target
0: halt
1: single-user
2: multi-user
3: multi-user with networking                        => multi-user.target
4: undefined (user defined)
5: multi-user with display manager (graphical login) => graphical.target
6: reboot

basic.target
network.target
multi-user.target
graphical.target

init.scope
system.slice
-.mount
-.slice
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install graphviz
$ sudo apt-get install tree
$ systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @33.104s
└─multi-user.target @33.103s
  └─getty.target @33.103s
    └─getty@tty1.service @33.102s
      └─systemd-user-sessions.service @33.030s +16ms
        └─network.target @33.023s
          └─dhcpcd.service @2.326s +30.692s
            └─basic.target @2.161s
              └─sockets.target @2.161s
                └─triggerhappy.socket @2.160s
                  └─sysinit.target @2.155s
                    └─systemd-timesyncd.service @1.930s +224ms
                      └─systemd-tmpfiles-setup.service @1.864s +55ms
                        └─local-fs.target @1.854s
                          └─boot.mount @1.836s +16ms
                            └─systemd-fsck@dev-disk-by\x2dpartuuid-fc38305d\x2d01.service @1.492s +336ms
                              └─dev-disk-by\x2dpartuuid-fc38305d\x2d01.device @1.489s

$ systemd-analyze dot | dot -Tsvg > systemd.svg
   Color legend: black     = Requires
                 dark blue = Requisite
                 dark grey = Wants
                 red       = Conflicts
                 green     = After

$ pstree
systemd-+-agetty
        |-avahi-daemon---avahi-daemon
        |-bluetoothd
        |-cron
        |-dbus-daemon
        |-dhcpcd
        |-hciattach
        |-login---bash
        |-rsyslogd-+-{in:imklog}
        |          |-{in:imuxsock}
        |          `-{rs:main Q:Reg}
        |-sshd---sshd---sshd---bash---pstree
        |-systemd---(sd-pam)
        |-systemd-journal
        |-systemd-logind
        |-systemd-timesyn---{sd-resolve}
        |-systemd-udevd
        |-thd
        `-wpa_supplicant
Global:
/etc/systemd/system
/lib/systemd/system/

User:
/etc/systemd/user,
/run/systemd/user
/lib/systemd/user
/usr/lib/systemd/user
$ systemctl status

$ systemctl
or 
$ systemctl list-units

$ systemctl list-unit-files
Service units
Target units

unit
slice
scope
service

services (.service)
mount points (.mount)
devices (.device)
sockets (.socket)
(.automount)
(.swap)
(.target)
(.path)
(.timer)
(.slice)
(.scope) 
$ sudo systemctl start myscript.service
$ sudo systemctl stop myscript.service
$ sudo systemctl enable myscript.service
autologin@.service
bluetooth.target.wants
dbus-org.bluez.service -> /lib/systemd/system/bluetooth.service
dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service
dhcpcd.service.d
dhcpcd5.service -> /lib/systemd/system/dhcpcd.service
getty.target.wants
getty@tty1.service.d
halt.target.wants
multi-user.target.wants
network-online.target.wants
poweroff.target.wants
rc-local.service.d
reboot.target.wants
remote-fs.target.wants
sockets.target.wants
sshd.service -> /lib/systemd/system/ssh.service
sysinit.target.wants
syslog.service -> /lib/systemd/system/rsyslog.service
timers.target.wants

SSH Key / Github Access

Best way to use multiple SSH private keys on one client

Generating a new SSH key and adding it to the ssh-agent

$ ls -la ~/.ssh
total 12
drwx------  2 andreas andreas 4096 Aug 22 13:16 .
drwxr-xr-x 46 andreas andreas 4096 Sep 22 21:12 ..
-rw-r--r--  1 andreas andreas 1772 Sep 23 11:54 known_hosts

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
IdentityFile ~/.ssh/id_rsa_key1
IdentityFile ~/.ssh/id_rsa_key2
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

Raspberry Pi 3, Wifi Setup

PEAP-MSCHAPV2

$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
country=CH
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="<SSID>"
        priority=1
        proto=RSN
        key_mgmt=WPA-EAP
        pairwise=CCMP
        auth_alg=OPEN
        eap=PEAP
        identity="<USERNAME>"
        password="<PASSWORD>"
        phase1="peaplabel=0"
        phase2="auth=MSCHAPV2"
}

$ sudo wpa_cli -i wlan0 reconfigure
OK

BME2

Sehnen & Bänder

Sehne
Sehnenscheide
Mesenchymale Stammzelle
Tribologie

Zelle

Zelle
Eukaryoten, Zellen (Eucyten) mit echtem Kern und einer reichen Kompartimentierung (Organellen)
Eucyte
Prokaryoten, Zellen (Protocyten) OHNE Kern
Protocyte, z.B. Bakterien

Zellkompartiment, verschiedenartige Räume innerhalb einer Zelle (aber nicht ein Organell). z.B. ist das Cytoplasma ein Kompartiment, aber kein Organell.
Organell, strukturell abgrenzbarer Bereich einer Zelle mit einer besonderen Funktion

Diffusion
Fick’sches Gesetz

Genetik

Genetik
Genom, Gesamtheit der materiellen Träger der vererbbaren Informationen einer Zelle
Desoxyribonukleinsäure (DNA), Träger der Erbinformation, also die materielle Basis der Gene
Chromosom, stabförmiges Körperchen, das bei der Teilung von Zellkernen (Mitose oder Meiose) auftritt
Mitose, Teilung des Zellkerns

Viraler Vektor
Transduktion (Genetik)
Transformation (Genetik)
Konjugation (Biologie)

Woche 4

Musculus biceps brachii
Elektromyographie (EMG)
Motorische Endplatte
Meniskus (Anatomie)

Wie können Zellen überleben?
Sie brauchen Sauerstoff -> sie brauchen Kapillaren, die rote Blutkörperchen transportieren.

Hypoxie – Wenn weniger (Sauerstoff) mehr (Stammzellen) macht (PDF)
Kapillare (Anatomie)
Einzeller
Stammzelle
Zelltypmarker
Immunmarkierung
Zellkultur
Wachstumsfaktor (Protein)

Woche 5

Röhrenknochen, Schaft, Knochenende, Gelenk
Knochenmorphogenetische Proteine (BMP)
Transforming Growth Factor (TGF)
Adenoviridae
CRISPR/Cas-Methode
Arthritis

Woche 8

Musculus gluteus maximus
Musculus vastus intermedius
Vastus intermedius muscle
Musculus biceps femoris
Musculus psoas major

Woche 12

Over Pronation & Supination Motion Biomechanics of the Subtalar Joint Explaine
Foot Anatomy Animated Tutorial

Raspberry Pi Bootloader

Der Raspberry Pi nutzt einen komplizierten mehrstufigen Startvorgang mit proprietären Blobs.

Raspberry Pi boards require a closed-source binary to boot. I understand it this is handled by VideoCore IV GPU, and so far the Raspberry Pi foundation are not release source code for the bootloader, possibly due to legal reason (e.g. NDA to Broadcom).

How does Raspberry Pi boot?
What is the boot sequence?
Raspberry PI 3 Model B: SD card setup

  • Raspberry Pi Bootloader bootcode.bin (Closed-Source, proprietären Firmware von Broadcom)
  • Raspberry Pi Bootloader rpi-open-firmware (Open-Source)
  • RPi U-Boot Bootloader
  • BCM2835
  • ArduCAM
  • ODROID-W
  • Hardkernel
  • VideoCore IV GPU

Stage

Filename

Description

Source

FSBL

–

Mounts SD and loads SSBL

ROM

SSBL

bootcode.bin

Loads GPU firmware and boots GPU

https://github.com/raspberrypi/firmware/tree/master/boot

GPU firmware

start.elf or recovery.elf

Loads CPU bootloader and boots CPU

https://github.com/raspberrypi/firmware/tree/master/boot

User code Usually the Linux kernel, but could also be u-boot

u-boot.bin

u-boot

You can either use our prebuilt U-boot which works, or compile your own using the instructions above

config.txt

u-boot parameters

Add enable_uart=1 and kernel=u-boot.bin to the bottom of config.txt (Sample: http://codepad.org/ykVYFSyP)

uboot.env

u-boot saved environment

Generated by u-boot (default environment) bootcmd copied to bootcmd_orig bootcmd and bootdelay removed

Freie Firmware für Raspberry Pi startet Linux-Kernel
Blob-less Raspberry Pi Linux Is A Step Closer
Raspberry Pi Bootloader License Precludes it to Run on Competing Broadcom BCM283x Boards
Preliminary Open Source Bootloader for Raspberry Pi Boards Released
Kristina Brooks: Blobless Linux on Raspberry Pi (rpi-open-firmware)

github

github.com/christinaa/rpi-open-firmware, Open source VPU side bootloader for Raspberry Pi

RPi U-Boot

RPi U-Boot
u-boot for Raspberry Pi 3
Building and Booting Upstream Linux and U-Boot for Raspberry Pi 2/3 ARM Boards, With proprietary bootloader files bootcode.bin, fixup.dat, start.elf

seL4Wiki / Hardware / Rpi3
The seL4 Microkernel

Boot Process

The Linux Boot Process (SysVinit vs. upstart vs. systemd)

Linux Framebuffer Device / Linux Splashscreen

  • Framebuffer /dev/fb0
  • Linux Framebuffer Device (kurz fbdev)
  • VESA-Framebuffer-Treiber (vesafb)
  • Nvidia: rivafb, nvidiafb
  • AMD: radeonfb
  • Plymouth – graphic animation / bootsplash

Plymouth

Plymouth

Tutorials

wiki.debian.org/plymouth
Getting the most out of plymouth or how to make raspbian jessie boot with a full splash screen
Customizing Boot Up Screen on Raspberry Pi
Introducing PIXEL (Pi Improved Xwindows Environment, Lightweight)
Plymouth

Framebuffer / Linux Framebuffer Device

The Frame Buffer Device

Tutorials

Framebuffer HOWTO – The Linux Documentation Project
Writing a Basic Framebuffer Driver
Framebuffer use
DirectFB

Wikipedia

Framebuffer
DirectFB

github

github.com/DirectFB/directfb

ATMT

Onkologie
Radiologie
Strahlentherapie
Bestrahlungsplanung
Tiefendosiskurve
Perkutan
Brachytherapie
Photon
Bremsstrahlung
Linearbeschleuniger (LINAC)
Nuklearmedizin
Radionuklidtherapie
Radioimmuntherapie
Radiochemotherapie
Strahlung
Ionisierende Strahlung
Elektromagnetische Welle
Ionisation
Dosisaufbau
Strahlendosis
Energiedosis D
Ionendosis J
Sekundäremission
Strahlenschaden
Strahlenresistenz
Radikale
Letale Dosis
Strahlenkrankheit
Strahlenrisiko
Kollimator

Alphastrahlung
Betastrahlung
Gammastrahlung

Desoxyribonukleinsäure (DNA)
Ribonukleinsäure (RNA)
Nukleotide
Transkription
Therapieformen, Intraoperative Radiotherapie (IORT), Bildgeführte Radiotherapie (IGRT), Intensitätsmodulierte Radiotherapie (IMRT)

Woche 2

Woche 3

Angiografie
Digitale Subtraktionsangiographie (DSA)
ALARA (As Low As Reasonably Achievable)

Woche 4

Swiss Society of Radiobiology and Medical Physics (SSRPM), Schweizerische Gesellschaft für Strahlenbiologie und Medizinische Physik

  • dual-energy computed tomography (DECT)
  • gemstone spectral imaging (GSI)
  • adaptive statistical iterative reconstruction (ASIR)
  • signal-to-noise ratio (SNR)
  • myocardial infarction (MI)
  • electrocardiogram (ECG)
  • delayed contrast-enhanced (DCE)
  • delayed contrast-enhancement (DCE)
  • multidetector computed tomography (MDCT)
  • coronary artery disease (CAD)
  • cardiac magnetic resonance (CMR)
  • direct digital radiography (DDR)
  • Contrast-detail curves (CDC)
  • Low-contrast structures (LCS)
  • modulation transfer function (MTF)
  • region of interest (ROI)
  • noise power spectrum (NPS)
  • normalized noise power spectrum (NNPS)
  • detective quantum efficiency (DQE)
  • Computed Tomography Dose Index (CTDI)
  • Contrast-to-noise ratio (CNR)
  • Dose Quantum Efficiency (DQE)
  • Detective Quantum Efficiency (DQE)
  • lens resolving power (RP)
  • dynamic range (DR)
  • Point Spread Function (PSF)
  • Line Spread Function (LSF)
  • Edge Spread Function (ESF)
  • a
  • scintillation speed class
  • radiography x-ray speed class

Investigating the detectability limits of a PEM system
Dependence of low contrast detail on exposure dose and tube voltage in digital flat-panel detector radiography—a pre-clinical phantom study
An algorithm for noise correction of dual-energy computed tomography material density images
Measurements and evaluation of the image noise power spectrum for computed radiography

Computed Tomography Dose Index (CTDI)
Contrast-to-noise ratio (CNR)
Szintillator

Image Quality of Photographic Cameras – Introduction to the MTF Measurement
Understanding Radiology Exposure Indicators – Speed Class

Woche 5

Brownsche Bewegung
Plancksches Strahlungsgesetz (Planck’s law)
Schwarzer Körper, Schwarzer Strahler, idealisierte thermische Strahlungsquelle
Wiensches Verschiebungsgesetz (Wien’s displacement law)
Stefan-Boltzmann-Gesetz (Stefan–Boltzmann law)
Kirchhoffsches Strahlungsgesetz (Kirchhoff’s law of thermal radiation)
Emissionsgrad (emissivity)
Rayleigh-Jeans-Gesetz
Bolometer
Mikrobolometer
Lambertsche W-Funktion
Wärmeleitung
Wärmeleitungsgleichung
Crank-Nicolson-Verfahren
Wärmeübertragung

Flüssigkeitsthermometer
Bimetallthermometer
Widerstandsthermometer
Kaltleiter (PTC)
Heissleiter (NTC)
Thermoelement
Thermoelektrizität

Halbleiter-Temperatursensor
Faseroptischer Sensor (FOS)
Faseroptische Temperaturmessung (DTS)

Glas
Quarzglas
Bauglas
Liste der Gläser

symptomat.de/Konduktion
symptomat.de/Radiation

Strahlungsaustausch
Absorptionsgrad
Kirchhoffsches Strahlungsgesetz
Thermodynamisches Gleichgewicht
Wärmestrom
Wärmeübertragung
Atmosphärisches Fenster

English

Thermal radiation
Thermography

Woche 6

Kohlenstofffaserverstärkter Kunststoff
Kapillarwelle
Heat Transfer with Thermal Waves and Thermal Resonance
Thermal effusivity
Wärmeeindringkoeffizient

What is NETD in a Thermal Camera?

Woche 8

Nuclear Magnetic Resonance (NMR and MRI)

Kernspinresonanz, magnetische Kernresonanz, nuclear magnetic resonance (NMR)
Feldgradienten-NMR
Magnetresonanztomographie (MRT), Magnetic Resonance Imaging (MRI)
Spektroskopie, Spektrometrie
Kernspinresonanzspektroskopie, (NMR-Spektroskopie)
Zeeman-Effekt
Spule (Elektrotechnik)
Magnetische Permeabilität μ (mu)
Magnetische Suszeptibilität χ (chi)
Magnetisierung M
Magnetismus
Dipolmoment
Magnetisches Dipolmoment (m, μ [mu])
Elementarteilchen (kleinsten bekannten Bausteine der Materie, kleiner als Atome, kleiner als Bestandteile der Atome [p, n, e])
Dipol
Elektrisches Dipolmoment
Magnetischer Dipol
Spin
Kernspin I
Drehimpuls
Drallsatz (Momentensatz, Drehimpulssatz, Impulsmomentsatz, Drehimpulsbilanz)
Bloch-Gleichungen

  • Feldstärke H
  • Flussdichte B
  • Magnetfeld
  • gyromagnetische Faktor γ (gamma)
  • Drehimpuls
  • magnetische Moment der Hülle (M oder L)

Woche 10

  • NMR and energy levels (PDF)
    Kernresonanzspektroskopie (NMR) Tutorium
    Shim (Magnetismus)
    Parts per million
    Chemische Verschiebung

    Bücher

    Aufbau eines mobilen Digital-Spektrometers für die parallele Kernspinresonanz-Relaxometrie an mikrostrukturierten Spulen-Arrays im Niederfeld
    von Richard Spiegelberg

    Modern Methods in Solid-state NMR: A Practitioner’s Guide
    herausgegeben von Paul Hodgkinson

    Strahlung

    SUVA: Strahlenschutz und Radioaktivität

    Elektromagnetisches Spektrum
    Plancksches Wirkungsquantum
    Photonenenergie – Energie der Lichtquanten

    Strahlung

    Elektromagnetische Wellen bestehen aus Photonen. Elektromagnetische Wellen mit kurzer Wellenlänge, also hoher Photonenenergie, werden im Sprachgebrauch häufig als elektromagnetische Strahlung bezeichnet: so z. B. Röntgenstrahlung, Bremsstrahlung, UV-Strahlung, Wärmestrahlung oder Infrarotstrahlung. Im langwelligen Bereich spricht man eher von Wellen, etwa Radiowellen.

    Elektromagnetische Welle

    Photonen mit genügender Energie (etwa von einigen Elektronvolt aufwärts) wirken auf Materie ionisierend und können chemische (photochemische) Wirkungen auslösen, wenn die Bindungsenergien überschritten werden (Fotochemie). Diese chemische Wirksamkeit wird auch als Aktinität bezeichnet.

    Spektroskopie / Detektor

    • Spektroskopie: Eigenschaften der Strahlung selbst zu studiere
    • Emissionsspektroskopie: Strahlenquelle herauszufinden
    • Absorptionsspektroskopie: Eigenschaften eines zwischen der Quelle und dem Spektrometer befindlichen Transportmediums zu untersuchen

    Spektroskopie

    Spektroskopie
    Molekülspektroskopie
    UV/VIS-Spektroskopie
    Röntgenspektroskopie
    Charakteristische Röntgenstrahlung
    Strahlenschutz
    Umschlossener Strahler

    Charakteristische Röntgenstrahlung
    Linienspektrum
    Spektrallinie
    Röntgenspektroskopie
    Nahinfrarotspektroskopie

    • UV: Ultra Violet
    • VIS: Visuelles Spektrum -> sichtbares Licht
    • NIR: near IR -> nahes Infrarot
    • MIR: mid IR -> mittleres Infrarot
    • FIR: far IR -> fernes Infrarot
    • nahes Infrarot (englisch: near infrared, NIR) ist kurzwellige IR-Strahlung, die sich direkt an den sichtbaren (roten) Bereich anschließt von 780 nm bis 1400 nm.
    • kurzwelliges Infrarot (englisch: short wavelength, SWIR) 1,4 bis 3,0 µm
    • mittleres Infrarot (englisch: mid wavelength, MWIR) mit Wellenlängen von 3,0 µm bis 8 µm.
    • langwelliges Infrarot (englisch: long-wavelength, LWIR) 8 bis 15 µm
    • fernes Infrarot (englisch: far infrared, FIR) ist langwellige IR-Strahlung von 15 µm bis 1 mm und reicht in den Bereich der Terahertzstrahlung.

    Detektor

    Strahlungsdetektor

    Nuklearmedizinische Diagnostik

    • CT
    • MRI
    • US
    • PET (Positronen-Emissions-Tomographie)
    • SPECT (Single Photon Emission CT)
    • Szintigraphie
    • Emissionscomputertomographie
    • Radiopharmakon („Tracer“)

    Nuklearmedizin
    Emissionscomputertomographie (ECT)
    Szintigrafie
    Gammakamera
    Positronen-Emissions-Tomographie (PET)

    Quark (Physik)

    Elemente

    Technetium (Tc)
    Radon (Rn)
    Iod (I)

    Radithor (zertifiziertes Radiumwasser)