\subsection{Creating SDCard images}

\begin{frame}[fragile]
\frametitle{using wic}
\begin{lstlisting}
$ cd ~/poky/meta-schulung
$ mkdir -p scripts/lib/wic/canned-wks
$ pluma scripts/lib/wic/canned-wks/core-image-schulung.vexpress.wks
\end{lstlisting}
\begin{verbatim}
part / --source rootfs --fstype=ext2 --label rootfs \
               --ondisk mmc --align 1024 --use-uuid
\end{verbatim}
\begin{lstlisting}
$ pluma conf/machine/vexpress.conf
\end{lstlisting}
\begin{verbatim}
DEFAULTTUNE ?= "armv7athf-neon"
require conf/machine/include/tune-cortexa8.inc
SERIAL_CONSOLE = "115200 ttyAMA0"
PREFERRED_PROVIDER_virtual/kernel = "linux-vanilla"
IMAGE_FSTYPES = "wic"
\end{verbatim}
\begin{lstlisting}
$ cd ~/poky/build-schulung
$ bitbake core-image-schulung
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Run SDCard Image in qemu}
\begin{lstlisting}
$ cd ~/poky/build-schulung
$ ./tmp/sysroots-components/x86_64/qemu-native/usr/bin/qemu-system-arm \
    -M vexpress-a9 -nographic \
    -net nic -net user,hostfwd=tcp::1534-:1534,hostfwd=tcp::2345-:2345 \
    -drive if=sd,format=raw,\
file=tmp/deploy/images/vexpress/core-image-schulung-vexpress.wic
    -dtb    tmp/deploy/images/vexpress/vexpress-v2p-ca9.dtb \
    -kernel tmp/deploy/images/vexpress/zImage \
    -append \
"console=ttyAMA0,115200 root=/dev/mmcblk0p1 rw ip=dhcp init=/bin/example"
\end{lstlisting}
Qemu can be quit by pressing 'ctrl-a x'
\end{frame}
