[bootlin/training-materials updates] master: debugging: labs: improve kexec crash course (a515def6)

Clément Léger clement.leger at bootlin.com
Wed Nov 16 12:26:06 CET 2022


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

>---------------------------------------------------------------

commit a515def622608f0f94f8edf8fe0ef6561652f3cc
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Wed Nov 16 12:26:04 2022 +0100

    debugging: labs: improve kexec crash course
    
    Add complete command line since it since to crash with the default one.
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


>---------------------------------------------------------------

a515def622608f0f94f8edf8fe0ef6561652f3cc
 .../debugging-kernel-debugging.tex                           | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
index 13b8ee71..71c50039 100644
--- a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
+++ b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
@@ -193,11 +193,13 @@ debugged using gdb or crash.
 First of all we need to setup a kexec sutiable memory zone for our crash kernel
 image. THis is achieved via the linux command line. Reboot, interrupt U-Boot and
 add the \code{crashkernel=80M} parameter. This will tell the kernel to reserve
-80M of memory to load a "rescue" kernel that will be booted on panic.
+80M of memory to load a "rescue" kernel that will be booted on panic. We will
+also add an option which will panic the kernel on oops to allow executing the
+kexec kernel.
 
 \begin{bashinput}
 STM32MP> env edit bootargs
-STM32MP> <existing bootargs> crashkernel=80M
+STM32MP> <existing bootargs> crashkernel=80M oops=panic
 STM32MP> boot
 \end{bashinput}
 
@@ -219,10 +221,12 @@ following command:
 
 \begin{bashinput}
 $ kexec --type zImage -p /mnt/boot/zImage --dtb=/mnt/boot/stm32mp157a-dk1.dtb
-        --append="console=ttySTM0 maxcpus=1 reset_devices"
+  --command-line="root=/dev/nfs ip=192.168.1.215:::::eth0
+  nfsroot=192.168.1.105:/srv/nfs/stm32_debug,nfsvers=3,tcp rw console=ttySTM0
+  maxcpus=1 reset_devices"
 \end{bashinput}
 
-Once done, you can trigger a crash using the previously mentionned watchdog
+Once done, you can trigger a crash using the previously mentioned watchdog
 command:
 
 \begin{bashinput}




More information about the training-materials-updates mailing list