diff options
| author | Michal Simek <[email protected]> | 2026-04-02 17:36:59 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-04-17 08:02:42 +0200 |
| commit | fc36b91243393d73d4507ca5d50f7231011a7fe0 (patch) | |
| tree | fb3292ab7e711cdd4cc78d8a2118b12761c89e13 /common | |
| parent | 583efb5040587f06bab5f5d3eb321186c3a39fe4 (diff) | |
event: Introduce EVT_POST_PREBOOT event
Add a new EVT_POST_PREBOOT event type which is fired in main_loop()
after the preboot command has been executed.
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/event.c | 3 | ||||
| -rw-r--r-- | common/main.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/common/event.c b/common/event.c index 8d7513eb10b..398e713d2f8 100644 --- a/common/event.c +++ b/common/event.c @@ -49,6 +49,9 @@ const char *const type_name[] = { /* main loop events */ "main_loop", + /* post preboot events */ + "post_preboot", + /* livetree has been built */ "of_live_init", }; diff --git a/common/main.c b/common/main.c index b0b6e74f5d3..4b4504557f6 100644 --- a/common/main.c +++ b/common/main.c @@ -19,6 +19,7 @@ #include <net.h> #include <version_string.h> #include <efi_loader.h> +#include <event.h> static void run_preboot_environment_command(void) { @@ -53,6 +54,9 @@ void main_loop(void) if (IS_ENABLED(CONFIG_USE_PREBOOT)) run_preboot_environment_command(); + if (event_notify_null(EVT_POST_PREBOOT)) + return; + if (IS_ENABLED(CONFIG_UPDATE_TFTP)) update_tftp(0UL, NULL, NULL); |
