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. See http://elinux.org/Initcall_Debug Also, try turning on timestamps for printks with "time" on the kernel command line. See http://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: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel