From 32cc6ae273128510cffc536fc72f260181ef1744 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 11 Feb 2022 13:23:18 -0700 Subject: patman: Correct pylint errors Fix pylint errors that can be fixed and mask those that seem to be incorrect. Signed-off-by: Simon Glass --- doc/develop/python_cq.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/develop') diff --git a/doc/develop/python_cq.rst b/doc/develop/python_cq.rst index 3f99f1d9c0b..1e209ff197d 100644 --- a/doc/develop/python_cq.rst +++ b/doc/develop/python_cq.rst @@ -77,4 +77,15 @@ If the pylint version is updated in CI, this may result in needing to regenerate `scripts/pylint.base`. +Checking for errors +------------------- + +If you only want to check for pylint errors, use:: + + PYTHONPATH=/path/to/scripts/dtc/pylibfdt/ make pylint_err + +This will show only pylint errors. Note that you must set PYTHONPATH to point +to the pylibfdt directory build by U-Boot (typically the sandbox_spl board). If +you have used `make qcheck` then it sill be in `board-sandbox_spl`. + .. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/ -- cgit v1.2.3 From abe5d1184f276a0789365316061a14834dbc8dc4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 4 Mar 2022 08:43:08 -0700 Subject: event: Add documentation Add documentation for events, including the event command. Signed-off-by: Simon Glass --- doc/develop/event.rst | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/develop/index.rst | 1 + 2 files changed, 67 insertions(+) create mode 100644 doc/develop/event.rst (limited to 'doc/develop') diff --git a/doc/develop/event.rst b/doc/develop/event.rst new file mode 100644 index 00000000000..6e144cfcddf --- /dev/null +++ b/doc/develop/event.rst @@ -0,0 +1,66 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Events +====== + +U-Boot supports a way for various events to be handled by interested +subsystems. This provide a generic way to handle 'hooks' like setting up the +CPUs after driver model is active, or reading a partition table after a new +block device is probed. + +Rather than using weak functions and direct calls across subsystemss, it is +often easier to use an event. + +An event consists of a type (e.g. EVT_DM_POST_INIT) and some optional data, +in `union event_data`. An event spy can be creasted to watch for events of a +particular type. When the event is created, it is sent to each spy in turn. + + +Declaring a spy +--------------- + +To declare a spy, use something like this:: + + static int snow_setup_cpus(void *ctx, struct event *event) + { + /* do something */ + return 0; + } + EVENT_SPY(EVT_DM_POST_INIT, snow_setup_cpus); + +Your function is called when EVT_DM_POST_INIT is emitted, i.e. after driver +model is inited (in SPL, or in U-Boot proper before and after relocation). + + +Debugging +--------- + +To assist with debugging events, enable `CONFIG_EVENT_DEBUG` and +`CONFIG_CMD_EVENT`. The :doc:`../usage/event` command can then be used to +provide a spy list. + +It is also possible to list spy information from the U-Boot executable,, using +the `event_dump.py` script:: + + $ scripts/event_dump.py /tmp/b/sandbox/u-boot + Event type Id Source location + -------------------- ------------------------------ ------------------------------ + EVT_MISC_INIT_F f:sandbox_misc_init_f arch/sandbox/cpu/start.c:125 + +This shows each event spy in U-Boot, along with the event type, function name +(or ID) and source location. + +Note that if `CONFIG_EVENT_DEBUG` is not enabled, the event ID is missing, so +the function is shown instead (with an `f:` prefix as above). Since the ID is +generally the same as the function name, this does not matter much. + +The event type is decoded by the symbol used by U-Boot for the event linker +list. Symbols have the form:: + + _u_boot_list_2_evspy_info_2_EVT_MISC_INIT_F + +so the event type can be read from the end. To manually list spy information +in an image, use $(CROSS_COMPILE)nm:: + + nm u-boot |grep evspy |grep list + 00000000002d6300 D _u_boot_list_2_evspy_info_2_EVT_MISC_INIT_F diff --git a/doc/develop/index.rst b/doc/develop/index.rst index 93ebfa485f5..2e6d6c302a5 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -17,6 +17,7 @@ Implementation distro driver-model/index environment + event global_data logging makefiles -- cgit v1.2.3 From eeec00072d7a0b5b91896d014618e558ce438738 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 24 Mar 2022 17:18:06 -0400 Subject: global: Remove CONFIG_SYS_EXTRA_OPTIONS support All options have now been migrated to Kconfig correctly so remove this support. Signed-off-by: Tom Rini --- doc/develop/moveconfig.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc/develop') diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst index 2f53ea52b71..bfb7aff3582 100644 --- a/doc/develop/moveconfig.rst +++ b/doc/develop/moveconfig.rst @@ -295,8 +295,7 @@ Available options -y, --yes Instead of prompting, automatically go ahead with all operations. This - includes cleaning up headers, CONFIG_SYS_EXTRA_OPTIONS, the config whitelist - and the README. + includes cleaning up headers, the config whitelist and the README. To see the complete list of supported options, run:: -- cgit v1.2.3 From 25b8acee2ea11a9edc100c42a61f5d6187eb6167 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 2 Apr 2022 18:18:57 -0400 Subject: Revert "global: Remove CONFIG_SYS_EXTRA_OPTIONS support" Unfortunately, we require additional logic to buildman to support this removal and still use SYS_SOC, etc, for build targets. This reverts commit eeec00072d7a0b5b91896d014618e558ce438738. Signed-off-by: Tom Rini --- doc/develop/moveconfig.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/develop') diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst index bfb7aff3582..2f53ea52b71 100644 --- a/doc/develop/moveconfig.rst +++ b/doc/develop/moveconfig.rst @@ -295,7 +295,8 @@ Available options -y, --yes Instead of prompting, automatically go ahead with all operations. This - includes cleaning up headers, the config whitelist and the README. + includes cleaning up headers, CONFIG_SYS_EXTRA_OPTIONS, the config whitelist + and the README. To see the complete list of supported options, run:: -- cgit v1.2.3