File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2363,6 +2363,24 @@ Source: link:kernel_module/user/sleep_forever.c[]
2363
2363
2364
2364
This executable is a convenient simple init that does not panic and sleeps instead.
2365
2365
2366
+ ==== time_boot.out
2367
+
2368
+ Get a reasonable answer to "how long does boot take?":
2369
+
2370
+ ....
2371
+ ./run -F '/time_boot.out'
2372
+ ....
2373
+
2374
+ Dmesg contains a message of type:
2375
+
2376
+ ....
2377
+ [ 2.188242] time_boot.c
2378
+ ....
2379
+
2380
+ which tells us that boot took `2.188242` seconds.
2381
+
2382
+ Bibliography: https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014
2383
+
2366
2384
[[init-busybox]]
2367
2385
=== Run command at the end of BusyBox init
2368
2386
Original file line number Diff line number Diff line change 1
- /* https://stackoverflow .com/questions/12683169/measure-time-taken-for- linux-kernel-from-bootup-to-userpace/46517014#46517014 */
1
+ /* https://github .com/cirosantilli/ linux-kernel-module-cheat#time_boot-out */
2
2
3
3
#include <stdio.h>
4
4
#include <unistd.h>
You can’t perform that action at this time.
0 commit comments