[bootlin/training-materials updates] master: common: printk: add debug logs troubleshooting (cf7c4d2b)
Alexis Lothoré
alexis.lothore at bootlin.com
Fri Jul 7 10:42:32 CEST 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/cf7c4d2b1594f90b2e39f1641500478e80cf9821
>---------------------------------------------------------------
commit cf7c4d2b1594f90b2e39f1641500478e80cf9821
Author: Alexis Lothoré <alexis.lothore at bootlin.com>
Date: Fri Jul 7 10:39:20 2023 +0200
common: printk: add debug logs troubleshooting
Developpers may struggle to see logs inserted in their kernel or drivers.
Since there are multiple possibles reasons, provide a short troubleshooting
list to check to make sure that pr_debug/dev_dbg calls are properly
generated
Enable this new slide for debugging only for now
Fixes #204
Signed-off-by: Alexis Lothoré <alexis.lothore at bootlin.com>
>---------------------------------------------------------------
cf7c4d2b1594f90b2e39f1641500478e80cf9821
common/printk.tex | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/common/printk.tex b/common/printk.tex
index 5c267f0f..44d0b88a 100644
--- a/common/printk.tex
+++ b/common/printk.tex
@@ -155,3 +155,31 @@ dev_info(&pdev->dev, "in probe\n");
\end{itemize}
\end{frame}
}{}
+
+\ifthenelse{\equal{\training}{debugging}}{
+\begin{frame}
+ \frametitle{Debug logs troubleshooting}
+ \begin{itemize}
+ \item Make sure that your debug call is enabled: it must be visible in
+ \code{control} file in debugfs \textbf{and} be actived (\code{=p})
+ \item Is your log output only in kernel log buffer ?
+ \begin{itemize}
+ \item You can see it thanks to \code{dmesg}
+ \item You can lower \code{loglevel} to output it to console directly
+ \item You can also set \code{ignore_loglevel} in kernel command line to
+ force all kernel logs to console
+ \end{itemize}
+ \item If you are working on an out-of-tree module, you may prefer to define \code{DEBUG} in
+ your module source or Makefile instead of using dynamic debug
+ \item If configuration is done through kernel commandline, is it
+ properly interpreted ?
+ \begin{itemize}
+ \item Starting from 5.14, kernel will let you know about faulty
+ commandline:\\
+ \code{Unknown kernel command line parameters foo, will be passed to user
+ space.}
+ \item You may need to take care of special characters escaping (e.g: quotes)
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+}{}
\ No newline at end of file
More information about the training-materials-updates
mailing list