Activate CONFIG_PRINTK_TIME kernel option, so that you can see a nice
timing in front of all your printk. I don't know if it is available in MV 2.6.10
kernel, but it is in MV 2.6.18.

Initial ramdisk initialisation can take some times too.

Also consider that  printk messages are printed when the console is
fully initialised. That is why printk timing is such a cool options.
The timing in front of it is related to the moment the printk call is made, not 
the moment
the message is actually written on the console.

In fact, a lot of the printk messages probably happen before the console is initialised, and you can see them all at the same time, even if they happened just after "Starting kernel ..."

If you don't have the CONFIG_PRINTK_TIME options available, another options is
to use the so called printascii hack, that consist in forcing the printk to use the low level serial console (the one that outputs dot when you use a zImage ?).

There are various version, but attched is mine for a 2.6.18 kernel.

Jean-Philippe François



Steve Ressler a écrit :
Hi,

I'm trying to get my boot time down under 2 seconds. I have followed the steps listed at http://wiki.davincidsp.com/index.php?title=All_This_For_1_Second_Boot and this has gotten me to about 3-4 seconds.

My question is that I am seeing a pause between the last output of u-boot and the first output of the kernel which seems strange to me. This pause is on the order of 1.5 seconds, which if I could eliminate would put me right where I want to be.

The output is shown below. The pause I am talking about happens between "Starting kernel ..." and "Linux version 2.6.10_mv...."

I am using an uncompressed kernel with virtually no options enabled, just to try and find the baseline fastest boot speed I can. Can anyone help me?


## Booting image at 80007fc0 ...
   Image Name:   LCIS-Linux
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1132352 Bytes =  1.1 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 80900000 ...
   Image Name:   Ramdisk
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    700416 Bytes = 684 kB
   Load Address: 80900000
   Entry Point:  80900000

Starting kernel ...

Linux version 2.6.10_mvl401-davinci_evm-PSP_01_30_00_082 (sress...@bonneville) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.104.0600975 20069
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
DM6443
MUX: initialized CLK_OUT0
Built 1 zonelists
Kernel command line: mem=15M console=ttyS0,115200n8 root=/dev/ram0 ro ip=off lpj=741376 init=/bin/sh
...
...


Thanks for any help,
-Steve Ressler


------------------------------------------------------------------------

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Index: .kernel/kernel/printk.c
===================================================================
--- .kernel.orig/kernel/printk.c        2009-02-28 02:52:32.000000000 +0100
+++ .kernel/kernel/printk.c     2009-04-30 14:12:29.000000000 +0200
@@ -41,6 +41,7 @@
 {
 }
 
+extern void printascii(const char *);
 #define __LOG_BUF_LEN  (1 << CONFIG_LOG_BUF_SHIFT)
 
 /* printk's without a loglevel use this.. */
@@ -552,7 +553,7 @@
 
        /* Emit the output into the temporary buffer */
        printed_len = vscnprintf(printk_buf, sizeof(printk_buf), fmt, args);
-
+        printascii(printk_buf);
        if (printed_len > 0) {
                unsigned int loglevel;
                int mark_len;
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to