![]() ![]() Edit the nf file by using UMS (USB Mass Storage): see How to use USB mass storage in U-Boot for details.Vi /boot/mmc0_stm32mp157c-ev1_extlinux/nf Mount a boot partition from the Linux kernel console, and then update the nf file using the vi editor (see man page, or introduction page ).In order to activate debug messages during the boot process, even before userspace and debugfs exist, use the kernel's command-line parameter: dyndbgįor instance, the kernel bootargs can be modified in the following ways: ![]() If you want to return to the default console log level, you have to get this default value from the procfs entry /proc/sys/kernel/printk:ĨĔđ 7 dmesg -n 7 cat /proc/sys/kernel/printkĥ Debug messages during boot process Please follow this article to get a serial console for the target: How to get Terminal WarningĪs all traces are now synchronously emitted, real-time is affected Only error, warning and informational traces are emitted synchronously on the console (that is, loglevel=5), so if you need to see the lower level traces too, you need to change the console loglevel to "8". ![]() In the case of a crash, or impossibility to call dmesg, it is sometimes useful to have traces synchronously emitted on the console. For example, you can match all USB drivers:Įcho " file drivers/usb/* +p" > /sys/kernel/debug/dynamic_debug/controlĤ Synchronous tracing on the console The match rule supports * (matches zero or more characters) and ? (matches exactly one character). A another method is to use a wildcard.Multiple commands can be written together, separated by ' ' or '\n'.Įcho " file stm32-adc.c +p file stm32-adc-core.c +p" > /sys/kernel/debug/dynamic_debug/control.For instance, if you are looking for a particular file to find a particular line:Ĭat /sys/kernel/debug/dynamic_debug/control | grep adcĭrivers/iio/adc/stm32-adc.c: 1515 stm32_adc_conf_scan_seq =p "%s chan %d to %s%d\012"ĭrivers/iio/adc/stm32-adc.c: 1438 stm32_adc_awd_set =p "%s chan%d htr:%d ltr:%d\012"ĭrivers/iio/adc/stm32-adc.c: 2182 stm32_adc_dma_start =p "%s size=%d watermark=%d\012"ĭrivers/iio/adc/stm32-adc.c: 2304 stm32_adc_trigger_handler =p "%s bufi=%d\012"ĭrivers/iio/adc/stm32-adc.c: 2443 stm32_adc_chan_of_init =p "Configured to use injected\012"ĭrivers/iio/adc/stm32-adc.c: 2364 stm32_adc_of_get_resolution =p "Using %u bits resolution\012".If you want to list all available traces (warning: it is a long file so you may need to use "tee" or another solution to save it):Ĭat /sys/kernel/debug/dynamic_debug/control | tee /tmp/dynamic_log.log.For an entire " module (module means ~.ko, so not applicable for a statically linked driver)":Įcho " module cfg80211 +p" > /sys/kernel/debug/dynamic_debug/control.Track only one line with dev_dbg() in a file (you can add several files and several lines if necessary, please use the last line number of the function call):Įcho " file stm32-adc.c line 1438 +p" > /sys/kernel/debug/dynamic_debug/control.Note that just the file name or full file path can be given, here stm32-adc.c or drivers/iio/adc/stm32-adc.c Track all dev_*dbg/pr_debug() in a file (you can add several files if necessary):Įcho " file stm32-adc.c +p" > /sys/kernel/debug/dynamic_debug/control.T : Include thread ID in messages not generated from interrupt context 3 Examples M : Include module name in the printed message p : Causes a printk() message to be emitted to dmesg L : Include line number in the printed message : remove the given flags + : add the given flagsį : Include the function name in the printed message The change operation is one of the characters: ![]() The flag specification comprises a change operation followed by one or more flag characters. The command includes keywords and flag elements (for details see the Linux kernel documentation ).įunc : function name file : source filename module : module name format : format string line : line number (including ranges of line numbers) The colored keywords above are illustrated by examples in the next chapter. The dynamic debug trace configuration is done through a control file in the debugfs filesystem: /dynamic_debug/control When the dynamic debug traces are activated, the trace results are printed in dmesg (or /proc/kmsg), and in the console if console loglevel is set to 8. Note that the verbose dev_vdbg() calls cannot be dynamically activated. Currently, if CONFIG_DYNAMIC_DEBUG is set, all pr_debug()/dev_dbg() calls can be dynamically enabled per-callsite." extracted from the Linux kernel documentation. "Dynamic debug is designed to allow you to dynamically enable/disable kernel code to obtain additional kernel information. As prerequisite to reading this article, please refer to the Dmesg and Linux kernel log page. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |