summaryrefslogtreecommitdiff
path: root/linux-basics
diff options
context:
space:
mode:
authorManuel Traut <manut@mecka.net>2013-03-10 12:13:49 +0100
committerManuel Traut <manut@mecka.net>2013-03-10 12:13:49 +0100
commit9c0f862749f30800837a45aff5abdcb529867dbc (patch)
treeb0ca51fff64f12fac03aea4afaa1fa722376844b /linux-basics
parent33b79c725448efd2c9a72e2ae9a1fb04270492f5 (diff)
parentcea5039322781f6085dd47954af5584ca3f78911 (diff)
Merge branch 'schulung'
updates from current linutronix schulung.git Conflicts: Makefile configpres.tex flash-memory/ubi/handout_ubi_de.tex handout.tex index.txt pres_master.tex vorl.tex vorl1.tex vorl2.tex vorl3.tex vorl4.tex vorl5.tex Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'linux-basics')
-rw-r--r--linux-basics/boot-process-basics/Makefile9
-rw-r--r--linux-basics/boot-process-basics/pres_boot-process-basics_de.tex156
-rw-r--r--linux-basics/fromscratch_vs_debian/pres_fromscatch_vs_debian_en.tex2
-rw-r--r--linux-basics/xorg-basics/Makefile9
-rw-r--r--linux-basics/xorg-basics/pres_xorg_en.tex182
5 files changed, 357 insertions, 1 deletions
diff --git a/linux-basics/boot-process-basics/Makefile b/linux-basics/boot-process-basics/Makefile
new file mode 100644
index 0000000..d641258
--- /dev/null
+++ b/linux-basics/boot-process-basics/Makefile
@@ -0,0 +1,9 @@
+all:
+ for pdf in `ls -1 *.tex` ; do \
+ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \
+ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \
+ done
+
+clean:
+ rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out
+
diff --git a/linux-basics/boot-process-basics/pres_boot-process-basics_de.tex b/linux-basics/boot-process-basics/pres_boot-process-basics_de.tex
new file mode 100644
index 0000000..6175d86
--- /dev/null
+++ b/linux-basics/boot-process-basics/pres_boot-process-basics_de.tex
@@ -0,0 +1,156 @@
+\input{configpres}
+
+\title{Der Linux-Boot-Prozess}
+\maketitle
+
+\begin{frame}
+\frametitle{Komponenten des Bootprozesses}
+\begin{itemize}
+\item Bootloader
+\item Linux
+\item ''Userspace''
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Ablauf des Bootprozesses}
+\begin{enumerate}
+\item Bootloader initialisiert Hardware
+\item Bootloader reloziert Kernel
+\item Bootloader übergibt Parameter und startet Kernel
+\item Linux bootet
+\item Linux Kernel bindet RFS ein
+\item Linux Kernel startet ersten Prozeß (/sbin/init, /linuxrc, oder mit init= spezifizierter Prozeß)
+\end{enumerate}
+\end{frame}
+
+\begin{frame}
+\frametitle{Das INIT System}
+\begin{itemize}
+\item System V Init (z.B. Debian)
+\item Upstart (Ubuntu)
+\item Systemd (z.B. Fedora)
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{System V Init}
+\begin{itemize}
+\item Verhalten in /etc/inittab definiert
+\item Startscripte in /etc/init.d
+\item Aufteilung in sogenannte Runlevels
+\item Runlevel beschreiben verschiedene Systemzustände (Shutdown, Single-User, Multi-User mit / ohne Netzwerk, ...)
+\item System V kennt keine Abhängigkeiten, sequentielles Ausführen der Startscripte
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Upstart}
+\begin{itemize}
+\item Ereignisgesteuert
+\item Kein /etc/inittab !!
+\item Konfigurationsdateien in /etc/init/, Beispiel:
+\begin{verbatim}
+start in stopped rc RUNLEVEL=[2345]
+stop on runlevel [!2345]
+respawn
+exec /sbin/getty -8 38400 tty1
+\end{verbatim}
+\item Upstart benötigt Runlevel, bildet aus Kompatibilitätsgründen aber Runlevel nach
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Upstart: Erweitertes Beispiel}
+\begin{verbatim}
+# /etc/init/smbd.conf
+description "SMB/CIFS File Server"
+author "Steve Langasek"
+
+start on (local-filesystems and net-device-up)
+stop on runlevel [!2345]
+
+respawn
+[...]
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Upstart: Erweitertes Beispiel}
+\begin{verbatim}
+# /etc/init/network-interface.conf
+description "configure network device"
+
+emits net-device-up
+emits net-device-down
+[...]
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+\frametitle{Systemd}
+\begin{itemize}
+\item Kann Prozesse parallel starten (ohne explizite Konfiguration der Abhängigkeiten):
+\begin{itemize}
+\item Legt Sockets zur Kommunikation der zu startenden Prozesse an
+\item Dorthin geschriebene Daten werden so lange gepuffert, bis der zu startende Prozeß diese entgegennehmen kann
+\end{itemize}
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Systemd}
+\begin{itemize}
+\item Konfiguration durch einzelne Textdateien und nicht durch Shellscripte
+\item Aktionen werden basierend von diesen Konfigurationen von Systemd (Linux-Executable) ausgeführt. Dies vermeidet das Starten vieler einzelner Shell-Instanzen.
+\item Administraion mittels systemctl
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Systemd}
+\begin{itemize}
+\item Targets übernehmen die Rolle von Runleveln (z.B. Runlevel 0 == poweroff.target)
+\item Mehrere Targets können gleichzeitig aktiv sein
+\item Konfigurationsdateien in /etc/systemd und /lib/systemd
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Systemd}
+\begin{itemize}
+\item Kompatibel zu System V Init. Skripte, die in /etc/init.d liegen, werden wie gewohnt gestartet
+\item Verwendet ''Control Groups'' zur Überwachung / Ausführung von Prozessen (daher mind. Kernel 2.6.24; und CGROUPS in .config aktivieren!!)
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Aufgaben des Bootloaders}
+\begin{itemize}
+\item Low-Level-Initialisierung:
+\item Clocks (CPU, PLLs, Peripherie...)
+\item Speicher (DRAM-Controller, NAND-Controller...)
+\item serielle Schnittstelle
+\item Parameterübergabe an den Linux Kernel
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Der Linux Kernel}
+\begin{itemize}
+\item Setzt Interrupts auf (z.B. Timer Interrupt)
+\item Lädt Treiber, initialisiert Hardware
+\item Mountet ''root filesystem'' nach /
+\item Startet ersten Prozeß
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Quellen}
+\begin{thebibliography}{1}
+\bibitem{kof} Linux 2012, Michael Kofler, PEARSON Verlag
+\bibitem{heise} http://www.heise.de/open/artikel/Das-Init-System-Systemd-Teil-1-1563259.html
+\end{thebibliography}
+\end{frame}
+
+\input{tailpres}
diff --git a/linux-basics/fromscratch_vs_debian/pres_fromscatch_vs_debian_en.tex b/linux-basics/fromscratch_vs_debian/pres_fromscatch_vs_debian_en.tex
index 6500966..25cd1cc 100644
--- a/linux-basics/fromscratch_vs_debian/pres_fromscatch_vs_debian_en.tex
+++ b/linux-basics/fromscratch_vs_debian/pres_fromscatch_vs_debian_en.tex
@@ -46,7 +46,7 @@ Disadvantages
\subsubsection{HOWTO}
\begin{frame}[containsverbatim]
\frametitle{cross debootstrap}
-\lstinputlisting[language=sh]{./linux-basics/fromscratch_vs_debian/deb.sh}
+\lstinputlisting[language=sh]{deb.sh}
\end{frame}
diff --git a/linux-basics/xorg-basics/Makefile b/linux-basics/xorg-basics/Makefile
new file mode 100644
index 0000000..d641258
--- /dev/null
+++ b/linux-basics/xorg-basics/Makefile
@@ -0,0 +1,9 @@
+all:
+ for pdf in `ls -1 *.tex` ; do \
+ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \
+ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \
+ done
+
+clean:
+ rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out
+
diff --git a/linux-basics/xorg-basics/pres_xorg_en.tex b/linux-basics/xorg-basics/pres_xorg_en.tex
new file mode 100644
index 0000000..80cd146
--- /dev/null
+++ b/linux-basics/xorg-basics/pres_xorg_en.tex
@@ -0,0 +1,182 @@
+% on the following slides, include icon in the left sidebar
+\def\lximg{/usr/share/lx/icons/fueller.png}
+
+\input{configpres}
+
+\section{X Windows}
+
+\title{The X Window System}
+\maketitle
+
+% stop displaying 'fueller.png' on the following slides
+\def\lximg{none}
+
+\begin{frame}
+\frametitle{X / X11 / XFree / Xorg ???}
+\begin{itemize}
+\item X11 is a graphical environment for UNIX systems (and windows systems...)
+\item XFree86 is an open source X11 implementation
+\item Xorg is the XServer release by the X.org foundation
+\item Xorg was forked from XFree86 4.4 RC2 (due to a license change in XFree)
+\item Most of the XFree developers moved to X.org
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Client / Server}
+\begin{figure}[h]
+\centering
+\includegraphics[width=10cm]{images/x_server_client.png}
+\end{figure}
+The X protocol is standardized!!!
+\end{frame}
+
+\begin{frame}
+\frametitle{The X protocol}
+The X-Server understands four different types of packets:
+\begin{itemize}
+\item Event
+\item Request
+\item Reply
+\item Error
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{X protocol: Example}
+\tiny
+1)
+\begin{verbatim}
+$ xtrace -D:9 -d:0 -k
+\end{verbatim}
+2)
+\begin{verbatim}
+$ xclock -display :9
+\end{verbatim}
+Then xtrace will show the communication:
+\begin{verbatim}
+...
+000:<:0001: 20: Request(98): QueryExtension name='BIG-REQUESTS'
+000:>:0001:32: Reply to QueryExtension: present=true(0x01) major-opcode=145
+ first-event=0 first-error=0
+000:<:0002: 4: BIG-REQUESTS-Request(145,0): Enable
+....
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{X protocol: Forward to a remote machine}
+Assuming you DIDN'T start your Xserver using ''-nolisten tcp'':
+\begin{verbatim}
+# On the host which should display the app
+$ xhost +192.168.0.104
+\end{verbatim}
+\begin{verbatim}
+$ On the machine which starts the app
+$ xlock -display 192.168.0.182:0
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{X via SSH}
+\begin{enumerate}
+\item Enable X11 forwarding on the server side:
+\begin{verbatim}
+# /etc/ssh/sshd_config
+X11Forwarding yes
+\end{verbatim}
+\item Connect from the client side using:
+\begin{verbatim}
+$ ssh -Y my_server
+# In the SSH session
+$ xclock
+\end{verbatim}
+Xclock will be displayed on the client's X server
+\end{enumerate}
+\end{frame}
+
+\begin{frame}
+\frametitle{What is a Window Manager OR Why do all the systems look different?}
+\begin{itemize}
+\item A window manager runs on top of the X window system
+\item Remember: X is based on a Client / Server infrastructure:
+\begin{itemize}
+\item The communication between client and server is redirected through the
+window manager
+\end{itemize}
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Architecture: Graphics / Graphics acceleration}
+\begin{figure}[h]
+\centering
+\includegraphics[width=6cm]{images/x_arch.png}
+\end{figure}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Configuration}
+\begin{verbatim}
+# First of all
+cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
+# then you can do
+$ Xorg -configure
+# On debian based systems you can do
+$ dpkg-reconfigure xserver-xorg
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Starting X}
+\begin{verbatim}
+# This will evaluate several files (Xsession, ...)
+$ startx
+# Evaluates xinitrc
+$ xinit
+# xinit can also explicitely start an application
+$ xinit xclock
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+\frametitle{The display manager}
+\begin{itemize}
+\item Managing X sessions (select the window manager, ...)
+\item Providing a login prompt
+\item Examples:
+\begin{itemize}
+\item XDM
+\item GDM
+\item KDM
+\item WDM
+\item entrance
+\end{itemize}
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{X on small systems}
+KDrive aka TinyX:
+\begin{itemize}
+\item Part of the Xorg release since 7.1
+\item Can directly run on on the framebuffer
+\item Debian package: \textbf{xserver-xfbdev}
+\item Can be built using something like:
+\begin{verbatim}
+./configure $XORG_OPTS \
+ --disable-xorg --disable-kdrive \
+ --enable-xfbdev --disable-glx \
+ --disable-dri
+\end{verbatim}
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\begin{thebibliography}{1}
+\bibitem{X} http://en.wikibooks.org/wiki/Guide\_to\_X11/Introduction
+\bibitem{XFree} http://en.wikipedia.org/wiki/X\_Window\_System
+\end{thebibliography}
+\end{frame}
+
+\input{tailpres}