[bootlin/training-materials updates] master: slides/kernel-driver-development-debugging: Create a slide for ealyprintk and add earlycon (5506bc87)

Miquel Raynal miquel.raynal at bootlin.com
Fri Mar 31 19:51:30 CEST 2023

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/5506bc87da4a6a89c954a1e8b3f6d7d2b5e39ef4


commit 5506bc87da4a6a89c954a1e8b3f6d7d2b5e39ef4
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Fri Mar 31 19:15:57 2023 +0200

    slides/kernel-driver-development-debugging: Create a slide for ealyprintk and add earlycon


 .../kernel-driver-development-debugging.tex        | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex b/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
index 2e38fbeb..41f54c8a 100644
--- a/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
+++ b/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
@@ -123,6 +123,30 @@
+  \frametitle{Early traces}
+  \begin{itemize}
+  \item If something breaks before the \code{tty} layer, serial driver
+    and serial console are properly registered, you might just have
+    nothing else after "\code{Starting kernel...}"
+  \item On ARM, if your platform implements it, you can activate
+    (\kconfig{CONFIG_DEBUG_LL} and \kconfig{CONFIG_EARLYPRINTK}), and add
+    \code{earlyprintk} to the kernel command line
+    \begin{itemize}
+    \item Assembly routines to just push a character and wait for it to
+      be sent
+    \item Extremely basic, but is part of the uncompressed section, so
+      available even if the kernel does not uncompress correctly!
+    \end{itemize}
+  \item On other platforms, hoping that your serial driver implements
+    \kfunc{OF_EARLYCON_DECLARE}, you can enable \kconfig{SERIAL_EARLYCON}
+    \begin{itemize}
+    \item The kernel will try to hook an appropriate \code{earlycon}
+      UART driver using the \code{stdout-path} of the device-tree.
+    \end{itemize}
+  \end{itemize}
   \frametitle{More kernel debugging tips}
@@ -131,9 +155,5 @@
     \item Is turned on by default
     \item To get oops messages with symbol names instead of raw addresses
-  \item On ARM, if your kernel doesn't boot or hangs without any
-    message, you can activate early debugging options
-    (\kconfig{CONFIG_DEBUG_LL} and \kconfig{CONFIG_EARLYPRINTK}), and add
-    \code{earlyprintk} to the kernel command line.

More information about the training-materials-updates mailing list