public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How can I add a function to the kernel initialization
@ 2001-04-11  8:07 antonpoon
  2001-04-11 11:22 ` Bart Trojanowski
  0 siblings, 1 reply; 4+ messages in thread
From: antonpoon @ 2001-04-11  8:07 UTC (permalink / raw)
  To: linux-kernel

I have written a driver for a character set LCD module using parallel port. I want to display a message when the kernel is initialized. 

I added the following to start_kernel() in init/main.c

#include <stdio.h>

{
  int i;
  char line = "Loading Kernel";
  FILE *ptr;
  ptr = fopen("/dev/lcd","w");
  
  for (i=0;i<10;i++)
  {
  	fprintf(ptr, "%s\n", line);
  }
  fclose(ptr);
}
   
Error was found, it looks like that it can not include stdio.h in the initialization.
How can I do that?

I wish to be personally CC'ed the answers/comments posted to the list in response to my posting. Thank you.

Best Regards,
Anton



---------------------------------------------
 Åwªï¨Ï¥ÎHongKong.com¶l¥ó¨t²Î
 Thank you for using hongkong.com Email system


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: How can I add a function to the kernel initialization
@ 2001-04-15 14:20 James Simmons
  0 siblings, 0 replies; 4+ messages in thread
From: James Simmons @ 2001-04-15 14:20 UTC (permalink / raw)
  To: antonpoon; +Cc: Geert Uytterhoeven, Linux Kernel Mailing List


Is this a HD44780 LCD? Geert wrote a console driver sometime ago for this.
He had a driver for it. If he still doesn't I have a copy of the code.

MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@linux-fbdev.org]               ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-15 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-11  8:07 How can I add a function to the kernel initialization antonpoon
2001-04-11 11:22 ` Bart Trojanowski
2001-04-11 13:16   ` Padraig Brady
  -- strict thread matches above, loose matches on Subject: below --
2001-04-15 14:20 James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox