![]() ![]() The kernel has an argument to minimize the amount of kernel messages displaying: “quiet”. If the messages were sent asynchronously, the last visible message would not indicate the location of a crash… This has the advantage that when the kernel crashes, all the messages up to that point are visible. LINUX U BOOT TUTORIAL SERIALThe exact behaviour depends on the serial console used, but the LPUART (the driver for Vybrid’s console) waits synchronously until the character is sent over the serial port. ![]() Similar to U-Boot, the Linux kernel prints all messages synchronously to the serial console. The shipped kernel has a zipped size of 4316kB and a boot time of 2.56 seconds. We will use the timestamp of that message to compare boot times. The string “Freeing unused kernel memory” is the last message emitted before the init process is started, and hence marks the end of the kernels “linear” init procedure (see kernel_init in init/main.c). The end of the boot time is somewhat hard to determine, since the kernel continues to initialize hardware even after the root file system has been mounted and the first user space process (init) starts running (delayed initialization). grabserial -d /dev /ttyUSB1 -t -m "^Starting kernel.*" To measure the kernel boot time only, the “match” feature of grabserial can be used to reset the timestamp in the last message printed by the boot loader. Obviously, the kernel size and the load time correlate linearly hence optimizing the kernel size will help to improve the boot time further. And finally jump into the kernels start addressīoot time to Kernel start with this improvement: ~750msĪccording to the timestamps, most of the time is spent in attaching UBI and mounting the UBIFS as well as loading the kernel (~380ms).Loading and patching the device tree (~35ms).Without Fastmap it would take around 1.6s) UBI initialization and UBIFS mount (~300ms, thanks to a feature called Fastmap.U-Boot initialization (~110ms, measured from the first character received).With the current release V2.5 Beta 1, the time from the first character to the Kernel start is ~1.85 seconds. Real optimization potential and flexibility are within the boot loader (U-Boot). Other than minimizing the boot loader’s size, optimizations are rather hard. The runtime is usually rather short and influenced by the boot loader’s size. This firmware loads the boot loader from the boot media. Arm SoCs boot from a firmware stored on an internal ROM. This phase is usually fixed and in the range of 10-200ms. The hardware initialization phase is needed to fulfil power sequencing requirements and bus or SoC reset timing requirements. There are actually two more phases before the boot loader can run: Hardware initialization and boot ROM. There are roughly three phases of a Linux system boot, which we are listed below and will be examined during the course of this blog. However, I do present some measurements and improvements specifically using our NXP ®/Freescale Vybrid-based module - Colibri VF61. This article is generally applicable to all of our modules. The first number represents the time stamp (since the first character was received) while the second number shows the delta between the timestamps of the current and the last line. This utility tool adds a timestamp to each line captured from the serial port as shown below: $. A popular utility tool to monitor the timings of serial output is Tim Bird's grabserial. In most cases simple monitoring of the serial port from a host system is accurate enough. ![]() If an exact end-to-end boot time is required, it might even be necessary to involve the hardware (e.g. Please refer to their respective articles on our developer website.īefore starting the optimization, we need an appropriate method to measure the boot time. Note: A few tips mentioned in this article require recompiling the U-Boot, Kernel or rebuilding a root file system from scratch. This article provides a few methodologies and low-hanging fruit for improving boot time on Toradex System on Modules. accepting commands over Ethernet or displaying a user interface). Often the system does not need to be immediately ready for all its tasks, but it should be ready for certain mission-critical tasks (e.g. Some applications have specific requirements for a system’s boot time. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |