rename init_dev_kmsg to time_boot and move doc to README

This commit is contained in:
Ciro Santilli
2018-07-09 17:03:05 +01:00
parent be6319ab89
commit 7b8811ee3d
2 changed files with 19 additions and 1 deletions

View File

@@ -2363,6 +2363,24 @@ Source: link:kernel_module/user/sleep_forever.c[]
This executable is a convenient simple init that does not panic and sleeps instead.
==== time_boot.out
Get a reasonable answer to "how long does boot take?":
....
./run -F '/time_boot.out'
....
Dmesg contains a message of type:
....
[ 2.188242] time_boot.c
....
which tells us that boot took `2.188242` seconds.
Bibliography: https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014
[[init-busybox]]
=== Run command at the end of BusyBox init

View File

@@ -1,4 +1,4 @@
/* https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014 */
/* https://github.com/cirosantilli/linux-kernel-module-cheat#time_boot-out */
#include <stdio.h>
#include <unistd.h>