[PATCH 1/3] efi: payload: image: set LoaderTimeExecUSec for kernel images
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Nov 28 09:21:53 PST 2025
We already do this for handover, so systemd can show time spent since
barebox kicked off kernel boot.
Populate it for the non-legacy boot as well.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/payload/image.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/efi/payload/image.c b/efi/payload/image.c
index 22ff5d27ced6..5e268ed0ce35 100644
--- a/efi/payload/image.c
+++ b/efi/payload/image.c
@@ -10,6 +10,7 @@
#include <clock.h>
#include <common.h>
#include <linux/sizes.h>
+#include <linux/ktime.h>
#include <memory.h>
#include <init.h>
#include <driver.h>
@@ -129,6 +130,9 @@ int efi_execute_image(efi_handle_t handle,
}
printf("...\n");
+ efi_set_variable_usec("LoaderTimeExecUSec", &efi_systemd_vendor_guid,
+ ktime_to_us(ktime_get()));
+
shutdown_barebox();
}
--
2.47.3
More information about the barebox
mailing list