log: Add a new logging feature
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | Revert "sandbox: remove os_putc() and os_puts()"arch/ include/ | +31 | 1 reply | |
| 1/13 | Revert "sandbox: remove os_putc() and os_puts()" | +0 | 0 replies | |
| 2/13 | Revert "sandbox: Drop special case console code for sandbox"common/ configs/ | +8 | 1 reply | |
| 2/13 | Revert "sandbox: Drop special case console code for sandbox" | +0 | 0 replies | |
| 3/13 | Move debug and logging support to a separate headerinclude/ include/ | +80 | 1 reply | |
| 4/13 | mtdparts: Correct use of debug()cmd/ | +0 | 1 reply | |
| 5/13 | Drop the log buffercmd/ cmd/ common/ +9 more | +5 | 1 reply | |
| 6/13 | log: Add an implemention of loggingMAINTAINERS common/ common/ +3 more | +555 | 2 replies | |
| 6/13 | log: Add an implemention of logging | +0 | 5 replies | |
| 6/13 | log: Add an implemention of logging | +0 | 2 replies | |
| 6/13 | log: Add an implemention of logging | +0 | 1 reply | |
| 6/13 | log: Add an implemention of logging | +0 | 0 replies | |
| 6/13 | log: Add an implemention of logging | +0 | 1 reply | |
| 6/13 | log: Add an implemention of logging | +0 | 0 replies | |
| 7/13 | log: Add a console drivercommon/ common/ common/ | +44 | 1 reply | |
| 7/13 | log: Add a console driver | +0 | 0 replies | |
| 8/13 | log: Add a 'log level' commandcmd/ cmd/ cmd/ | +63 | 1 reply | |
| 9/13 | log: Add a test commandcmd/ cmd/ common/ +4 more | +233 | 1 reply | |
| 10/13 | log: Plumb logging into the init sequencecommon/ common/ common/ +1 more | +8 | 1 reply | |
| 11/13 | log: sandbox: Enable loggingconfigs/ | +3 | 1 reply | |
| 12/13 | log: test: Add a pytest for loggingtest/ | +106 | 0 replies | |
| 13/13 | log: Add documentationdoc/ | +220 | 2 replies | |
| 13/13 | log: Add documentation | +0 | 0 replies |
Reviews trailers per patch
10 of 23 patches have a Reviewed-by or Acked-by.
| Patch | Bin Meng |
|---|---|
| 1/13 | |
| 1/13 | |
| 2/13 | |
| 2/13 | |
| 3/13 | R-b |
| 4/13 | R-b |
| 5/13 | R-b |
| 6/13 | |
| 6/13 | |
| 6/13 | |
| 6/13 | |
| 6/13 | |
| 6/13 | |
| 6/13 | |
| 7/13 | R-b |
| 7/13 | R-b |
| 8/13 | R-b |
| 9/13 | |
| 10/13 | R-b |
| 11/13 | R-b |
| 12/13 | |
| 13/13 | R-b |
| 13/13 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH 00/13] log: Add a new logging feature
U-Boot currently has fairly rudimentary logging features. A basic printf() provides console output and debug() provides debug output which is activated if DEBUG is defined in the file containing the debug() statements.
It would be useful to have a few more features:
- control of debug output at runtime, so problems can potentially be debugged without recompiling U-Boot
- control of which subsystems output debug information, so that (for example) it is possible to enable debugging for MMC or SATA at runtime
- indication of severity with each message, so that the user can control whether just errors are displayed, warnings, or all debug messages
- sending logging information to different destinations, such as console, memory, linux, etc,
At present U-Boot has a logbuffer feature which records output in a memory buffer for later display or storage. This is useful but is not at present enabled for any board.
This series introduced a new logging system which supports:
- various log levels from panic to debug
- log categories including all uclasses and a few others
- log drivers to which all log records can be sent
- log filters which control which log records make it to which drivers
Enabling logging with the default options does not add much to code size. By default the maximum recorded log level is LOGL_INFO, meaning that debug messages (and above) are discarded a build-time. Increasing this level provides more run-time flexibility to enable/disable logging at the cost of increased code size.
This feature is by no means finished. The README provides a long list of features and clean-ups that could be done. But hopefully this is a starting point for improving this important area in U-Boot.
The series is available at u-boot-dm/log-working
Simon Glass (13):
Revert "sandbox: remove os_putc() and os_puts()" Revert "sandbox: Drop special case console code for sandbox" Move debug and logging support to a separate header
mtdparts: Correct use of debug()
Drop the log buffer
log: Add an implemention of logging
log: Add a console driver
log: Add a 'log level' command
log: Add a test command
log: Plumb logging into the init sequence
log: sandbox: Enable logging
log: test: Add a pytest for logging
log: Add documentation
MAINTAINERS | 9 ++ arch/sandbox/cpu/os.c | 11 ++ cmd/Kconfig | 8 + cmd/Makefile | 2 +- cmd/log.c | 326 +++++--------------------------------- cmd/mtdparts.c | 3 - common/Kconfig | 86 ++++++++++ common/Makefile | 2 + common/board_f.c | 23 +-- common/board_r.c | 27 +--- common/console.c | 7 + common/image.c | 9 -- common/log.c | 247 +++++++++++++++++++++++++++++ common/log_console.c | 23 +++ common/stdio.c | 6 - configs/sandbox_defconfig | 5 +- doc/README.log | 220 +++++++++++++++++++++++++ include/asm-generic/global_data.h | 8 +- include/common.h | 64 +------- include/log.h | 311 ++++++++++++++++++++++++++++++++++++ include/logbuff.h | 49 ------ include/os.h | 20 +++ include/post.h | 4 +- post/post.c | 9 -- post/tests.c | 4 - scripts/config_whitelist.txt | 1 - test/Makefile | 1 + test/log/Makefile | 7 + test/log/log_test.c | 204 ++++++++++++++++++++++++ test/py/tests/test_log.py | 106 +++++++++++++ 30 files changed, 1322 insertions(+), 480 deletions(-) create mode 100644 common/log.c create mode 100644 common/log_console.c create mode 100644 doc/README.log create mode 100644 include/log.h delete mode 100644 include/logbuff.h create mode 100644 test/log/Makefile create mode 100644 test/log/log_test.c create mode 100644 test/py/tests/test_log.py
Signature · 1 line
2.14.1.690.gbb1197296e-goog