Hi,Tim and Greg Thanks for your information. I used Initcall_Debug flag and found that the initialization of FFUART takes about 4 seconds. By tracing step by step, found the time ran away in release_console_sem() function, located at printk.c. I am confused why release_console_sem() took so long time. Is there any other driver invoked release_console_sem() and did not exited during its initializing before FFUART is initialized?
Not just kernel but the whole system takes 2 minutes to boot up. Today, I added a the same log output after do_one_initcall(*call), but 2 minutes also are needed. The result is different from what I have got before.It's so strange. and while booting up, I found there are several times that no kernel log information is outputted until after about 4 or 5 seconds. Because there is no kernel log at the moment, I don't know what the kernel was doing. Maybe 2 minutes of booting time was caused by these several times of 4 or 5 seconds. Except for log information, Are there any other methods to know what the kernel was doing during no-log phase of kernel booting? Thank you On 6月19日, 上午2时02分, Tim Bird <[email protected]> wrote: > On 06/16/2010 08:21 AM, Gary wrote: > > > > > > > Hi, all > > > Now my device needs 2 minutes to boot up. > > But I found that the booting time will be reduced to 1 minute after I > > add just a printk(..) invoking as shown below. > > Even though the booting time has been reduced by adding one line of > > routine,but I have not found the real reason why the device needs 2 > > minutes to boot up. > > > Do you have any ideas or suggestions on my question? > > > /linux2.6.29/init/main.c > > > static void __init do_initcalls(void) > > { > > initcall_t *call; > > for (call = __early_initcall_end; call < __initcall_end; call++){ > > do_one_initcall(*call); > > printk("yangwd, do it,0x%x\r\n",call); // just add this line of > > routine > > } > > /* Make sure there is no pending stuff from the initcall sequence */ > > flush_scheduled_work(); > > } > > Well, as Greg said, the first thing you should do is use initcall_debug. > Seehttp://elinux.org/Initcall_Debug > > Also, try turning on timestamps for printks with "time" on the kernel > command line. Seehttp://elinux.org/Printk_Times > > Is it the kernel that's taking 2 minutes, or the whole system? > > Note that on Android, the very first boot of a newly installed system > will take a very long time, due to building a dalvik cache of pre-processed > classes. > > Just inserting a single printk in the initcall loop shouldn't have > any effect on bootup time. > > If you're still seeing funny stuff after turning on some more > timing debugging info, please send you kernel message log output. > -- Tim > > ============================= > Tim Bird > Architecture Group Chair, CE Linux Forum > Senior Staff Engineer, Sony Network Entertainment > ============================= -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
