I am profiling the booting process of power PC board, what is the simplest way to profile the booting sequence ?
My first idea is to modify the u-boot/kernel code add printf/printk (using realtime device as reference) and print them on the console. However just printing them on the console may affect the time.
Any thoughts?
Regards, Robert.
The boot sequence starts when the computer is turned on, and is completed when the kernel is initialized and systemd is launched. The startup process then takes over and finishes the task of getting the Linux computer into an operational state. Overall, the Linux boot and startup process is fairly simple to understand.
The process of Uboot booting the kernel is to determine how to start the kernel by reading the bootcmd in the environment variable env. For example, uboot wants to read the kernel partition from the nand flash to the memory address 0x30007FC0 and start the kernel. You can use the following command: bootm 0x30007FC0.
The short answer to that question is U-Boot, but the more precise answer is that the U-Boot boot loader passes the kernel command-line transparently to the Linux kernel using a feature known as atags from a U-Boot variable named bootargs.
There is a wonderful utility called bootchart which will give you a graphical representation of the boot process and tell you when each task started and how long it took to complete.
Check it out.
(source: bootchart.org)
Everyone knows the best way to profile an u-boot is with sonar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With