summaryrefslogtreecommitdiff
path: root/application-devel/cross-devel
diff options
context:
space:
mode:
Diffstat (limited to 'application-devel/cross-devel')
-rw-r--r--application-devel/cross-devel/Makefile8
-rw-r--r--application-devel/cross-devel/handout_cross-devel_de.tex19
-rw-r--r--application-devel/cross-devel/hints_cross-devel_de.tex26
-rw-r--r--application-devel/cross-devel/linutronix-left.pngbin0 -> 17432 bytes
-rw-r--r--application-devel/cross-devel/linutronix-right.pngbin0 -> 5559 bytes
-rw-r--r--application-devel/cross-devel/linutronix.pngbin0 -> 24712 bytes
-rw-r--r--application-devel/cross-devel/pres_cross-devel_de.tex224
7 files changed, 277 insertions, 0 deletions
diff --git a/application-devel/cross-devel/Makefile b/application-devel/cross-devel/Makefile
new file mode 100644
index 0000000..bd4d45f
--- /dev/null
+++ b/application-devel/cross-devel/Makefile
@@ -0,0 +1,8 @@
+all:
+ pdflatex handout_cross-devel_de.tex
+ pdflatex pres_cross-devel_de.tex
+ pdflatex hints_cross-devel_de.tex
+
+clean:
+ rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out
+
diff --git a/application-devel/cross-devel/handout_cross-devel_de.tex b/application-devel/cross-devel/handout_cross-devel_de.tex
new file mode 100644
index 0000000..b6e7158
--- /dev/null
+++ b/application-devel/cross-devel/handout_cross-devel_de.tex
@@ -0,0 +1,19 @@
+\documentclass{lxarticle}
+\usepackage{german}
+\usepackage[utf8]{inputenc}
+\usepackage{lxheaders}
+\usepackage{lxextras}
+
+\begin{document}
+
+\section*{Titel}
+
+\subsection*{Abschnitt1}
+
+Text
+
+\subsection*{Abschnitt2}
+
+Text
+
+\end{document}
diff --git a/application-devel/cross-devel/hints_cross-devel_de.tex b/application-devel/cross-devel/hints_cross-devel_de.tex
new file mode 100644
index 0000000..11c5c34
--- /dev/null
+++ b/application-devel/cross-devel/hints_cross-devel_de.tex
@@ -0,0 +1,26 @@
+\documentclass{lxarticle}
+\usepackage{german}
+\usepackage[utf8]{inputenc}
+\usepackage{lxheaders}
+\usepackage{lxextras}
+
+\begin{document}
+
+\section*{Block \lq Was ist Linux?\rq}
+
+\subsection*{Lernziele}
+\begin{itemize}
+\item Lernziel 1
+\item Lernziel 2
+\item Lernziel 3
+\end{itemize}
+
+\subsection*{Unterrichts-Ablauf}
+
+Hinweise zur Präsentation, Zeitplanung, etc.
+
+\subsection*{Übungen bei vorhandener Hardware}
+
+Hinweise zu Übungen, Zeitlimit dazu.
+
+\end{document}
diff --git a/application-devel/cross-devel/linutronix-left.png b/application-devel/cross-devel/linutronix-left.png
new file mode 100644
index 0000000..c9864c8
--- /dev/null
+++ b/application-devel/cross-devel/linutronix-left.png
Binary files differ
diff --git a/application-devel/cross-devel/linutronix-right.png b/application-devel/cross-devel/linutronix-right.png
new file mode 100644
index 0000000..136f35d
--- /dev/null
+++ b/application-devel/cross-devel/linutronix-right.png
Binary files differ
diff --git a/application-devel/cross-devel/linutronix.png b/application-devel/cross-devel/linutronix.png
new file mode 100644
index 0000000..0c0e706
--- /dev/null
+++ b/application-devel/cross-devel/linutronix.png
Binary files differ
diff --git a/application-devel/cross-devel/pres_cross-devel_de.tex b/application-devel/cross-devel/pres_cross-devel_de.tex
new file mode 100644
index 0000000..c792682
--- /dev/null
+++ b/application-devel/cross-devel/pres_cross-devel_de.tex
@@ -0,0 +1,224 @@
+\documentclass{beamer}
+\usetheme{linutronix}
+\usepackage{german}
+\usepackage[utf8]{inputenc}
+\usepackage{pgf}
+\usepackage{graphicx}
+\usepackage{lxextras}
+
+\title{Block \lq Cross Development\rq}
+\institute{Linutronix GmbH}
+
+\lstset{keywordstyle=\color{blue},commentstyle=\color{orange}}
+
+\begin{document}
+
+\maketitle
+
+\begin{frame}
+\frametitle{Übersicht}
+\tableofcontents
+\end{frame}
+
+\section{Cross Übersetzen}
+\begin{frame}[containsverbatim]
+\frametitle{Cross ''Hello world''}
+\begin{lstlisting}[language=c]
+/* cross_hello.c */
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello cross compiling world\n");
+ return 0;
+}
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Übersetzen für das Zielsystem}
+\begin{lstlisting}[language=bash]
+# Uebersetzen
+powerpc-linux-gnu-gcc -static -o cross_hello \
+cross_hello.c
+\end{lstlisting}
+\begin{lstlisting}[language=bash]
+# Executable ueberpruefen
+$ file cross_hello
+cross_hello: ELF 32-bit MSB executable, PowerPC
+or cisco 4500, version 1 (SYSV),
+dynamically linked (uses shared libs),
+for GNU/Linux 2.6.10, with unknown
+[...]
+not stripped
+\end{lstlisting}
+\end{frame}
+
+\section{Testing auf dem Host}
+
+\begin{frame}
+\frametitle{Qemu als Werkzeug zur Cross Entwicklung}
+\begin{alertblock}{Was ist Qemu?}
+Qemu ist eine sehr performante Emulations- und Virtualisierungsumgebung für alle
+gängigen CPU Architekturen.
+\end{alertblock}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Testen eines Executables mit der Qemu user emulation}
+\begin{lstlisting}[language=bash]
+$ ./cross_hello
+bash: ./cross_hello: cannot execute binary file
+$ qemu-ppc ./cross_hello
+Hello cross compiling world
+\end{lstlisting}
+\end{frame}
+
+\section{Rootfilesystem}
+\subsection{Filesystem from scratch}
+\begin{frame}[containsverbatim]
+\frametitle{Erstellen eines Rootfilesystems für die Zielarchitektur}
+1) Busybox
+\begin{lstlisting}[language=bash]
+mkdir /tftpboot/nfsroot
+cd busybox-1.16.1
+make menuconfig
+make CROSS_COMPILE=powerpc-linux-gnu- install
+rsync -Hav _install/ /tftpboot/nfsroot
+cd /tftpboot/nfsroot
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Erstellen eines Rootfilesystems für die Zielarchitektur}
+2) Grundstruktur erstellen:
+\begin{lstlisting}[language=bash]
+# Verzeichnisstruktur
+mkdir lib etc tmp dev mnt sys proc
+
+# Devices nodes (als root!)
+mknod dev/console c 5 1
+mknod dev/null c 1 3
+mknod dev/ttyS0 c 4 64
+mknod dev/tty0 c 4 0
+mknod dev/tty1 c 4 1
+mknod dev/tty2 c 4 2
+mknod dev/tty3 c 4 3
+mknod dev/tty4 c 4 4
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Erstellen eines Rootfilesystems für die Zielarchitektur}
+3) Startscript(e) erstellen
+\begin{lstlisting}[language=bash]
+cd /tftpboot/nfsroot
+mkdir etc/rc.d
+vim etc/init.d/rcS
+\end{lstlisting}
+/etc/rc.d/rcS:
+\begin{verbatim}
+#!/bin/sh
+mount -t proc proc /proc
+mount -t sysfs sysfs /sys
+
+mount -o remount,rw /
+\end{verbatim}
+\begin{lstlisting}[language=bash]
+chmod u+rw etc/rc.d/rcS
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Erstellen eines Rootfilesystems für die Zielarchitektur}
+4) Libraries kopieren
+\begin{lstlisting}[language=bash]
+# Loader
+$ cp /path_to_my_libc/lib/ld.so.1 \
+/tftpboot/nfsroot/lib
+# Getting the dependencies and copy them
+$ powerpc-linux-gnu-objdump -x \
+/tftpboot/nfsroot/bin/busybox | grep NEEDED
+ NEEDED libm.so.6
+ NEEDED libc.so.6
+$ cp /path_to_my_libc/lib/libm.so.6 \
+/tftpboot/nfsroot/lib
+$ cp /path_to_my_libc/lib/libc.so.6 \
+/tftpboot/nfsroot/lib
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+\frametitle{Erstellen eines Rootfilesystems für die Zielarchitektur}
+5) Berechtigungen korrigieren:
+\begin{lstlisting}[language=bash]
+chown -R root:root rootfs
+\end{lstlisting}
+That's it!! :)
+\end{frame}
+
+\subsection{Exportieren per NFS}
+\subsubsection{Konfiguration}
+\begin{frame}[containsverbatim]
+\frametitle{Exportieren per NFS}
+1) nfs-kernel-server installieren
+\begin{lstlisting}
+# Auf Debian basierten Systemen (als root)
+apt-get install nfs-kernel-server
+\end{lstlisting}
+\end{frame}
+\begin{frame}[containsverbatim]
+\frametitle{Exportieren per NFS}
+2) Directory exportieren
+\begin{lstlisting}[language=bash]
+vim /etc/exports
+\end{lstlisting}
+\begin{verbatim}
+/tftpboot/nfsroot \
+192.168.0.0/255.255.255.0\
+(rw,no_root_squash,no_subtree_check,insecure) \
+127.0.0.1\
+(rw,no_root_squash,no_subtree_check,insecure) \
+10.0.2.0/255.255.255.0\
+(rw,no_root_squash,no_subtree_check,insecure)
+\end{verbatim}
+\begin{lstlisting}[language=bash]
+/etc/init.d/nfs-kernel-server restart
+\end{lstlisting}
+\end{frame}
+\subsubsection{Filesystem mit Qemu testen}
+\begin{frame}[containsverbatim]
+\frametitle{RFS mit Qemu booten}
+\begin{lstlisting}
+qemu-system-ppc -nographic \
+-kernel images/vmlinux \
+-append \
+"console=ttyS0 ip=dhcp \
+root=/dev/nfs \
+nfsroot=10.0.2.2:/tftpboot/nfsroot" \
+-net nic -net user
+\end{lstlisting}
+\end{frame}
+\begin{frame}[containsverbatim]
+\frametitle{RFS mit Qemu booten}
+\begin{verbatim}
+[...]
+IP-Config: Got DHCP answer from 10.0.2.2, my address
+IP-Config: Complete:
+ device=eth0, addr=10.0.2.15, mask=255.255.255.0
+ host=10.0.2.15, domain=, nis-domain=(none),
+ bootserver=10.0.2.2, rootserver=10.0.2.2, rootpath=
+Looking up port of RPC 100003/2 on 10.0.2.2
+Looking up port of RPC 100005/1 on 10.0.2.2
+VFS: Mounted root (nfs filesystem) readonly.
+Freeing unused kernel memory: 208k init
+
+Please press Enter to activate this console.
+\end{verbatim}
+\end{frame}
+\subsubsection{Filesystem auf dem Target testen}
+\begin{frame}
+\frametitle{Auf dem Target}
+HAND'S ON! :)
+\end{frame}
+\end{document}