4

My team is developing a software for a Embedded Linux solution. The problem we are facing is that it takes too much time for the system to be ready to start running our desired apps (that is, too much time to load the Linux Kernel). Generally it takes from 38 to 43 seconds for that to happen. We already revised the kernel configuration removing the files we knew we don't need, but it is still taking this much time.

My questions: what else can be done to make the kernel start be faster (preferentially without changes in the hardware)? Is it normal for a Embedded Linux to take this much time to charge? Is it possible to ask the Linux kernel to make it start our apps before the kernel is fully charged?

The system is a Texas Instruments OMAP L138.

What follows are images with all the most relevant messages that are shown in the Terminal when the kernel is booting. If one don't have a (general) answer for my questions, but know something about one of the lines that could help improving the kernel boot speed, feel free to answer as well!

First part Second part Third part Forth part Fifth part

2
  • 1
    Have you already seen this? Commented Nov 18, 2014 at 20:32
  • @JoelDavis No, I haven't. Thanks for the link! I'll show it to our Linux Kernel developer. Commented Nov 19, 2014 at 13:10

1 Answer 1

5

In your output, the point where the kernel is actually loaded is this one:

Init version 2.86 booting

Which is after 23 seconds. After that, init, a userspace process, takes over and begins configuration of the userspace, although this inevitably provokes activation of various kernel drivers, possibly including loading appropriate modules.

You haven't said what platform this is, but on, e.g., the 700 Mhz single core raspberry pi, this is ~4 seconds. So this is still very slow, indicating a problem.

If we subtract the gap between 0 and 19 seconds, you're down to what might be expected. This gap ends with a comment about MII PHY -- this is an ethernet device driver. If it is possible to boot the system with no networking, you could confirm this by configuring the ethernet driver out of the kernel and see if that gets to init quicker.

After the 23 second mark the major bottleneck will probably be I/O on the root filesystem. For some reason there is a 5 second gap between 25 - 30 seconds ending with a comment about a FAT filesystem error. In fact there's a few fs errors there. This implies the init system is trying to mount filesystems that don't exist, which will be a time waster.

Between 33 and 37 seconds you have more errors indicative of screw-ups involving how filesystems are arranged and/or how software which depends upon such is configured. One of these dependencies might be a tmpfs filesystem that's supposed to have been created in RAM but failed (hence missing files in /var/ and /tmp). You could ask a separate question posting your /etc/fstab and asking someone to explain it, if the point here is not clear.

1
  • thanks a lot for the contribution! I'll show the answer to our Linux kernel developer. Regarding the system, I'll edit the question now. Commented Nov 19, 2014 at 13:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.