Re: [uCsimm] Problem writing to /dev/ttyS0

From: David Beckemeyer (david@bdt.com)
Date: Thu Apr 12 2001 - 22:28:53 EDT


There's no easy way to get rid of the boot-up messages, but you can
of course not start getty on the console to solve the problem after
boot.

There has been some discussion about getting rid of the boot messages.
Check the archives.

In terms of the not running getty, what I did is change the init
program (src/init/simpleinit.c) to check for a bootloader
environment variable. If the variable 'SKIPINIT' is set to the value
'true' then init doesn't run the stuff in inittab. This makes it
possible to turn it on andoff without loading a new image.

The diffs are below:

*** simpleinit.c.orig Wed Sep 8 17:20:54 1999
--- simpleinit.c Wed Jan 10 00:14:53 2001
***************
*** 35,40 ****
--- 35,48 ----
     console ttys. */
  /* #define SPECIAL_CONSOLE_TERM */
  
+ /* Define this to look in bootloader environment to skip inittab */
+ #define INIT_SKIP_TEST
+
+ #ifdef INIT_SKIP_TEST
+ #include "bootstd.h"
+ _bsc1(char *,getbenv,char *,a)
+ #endif
+
  #define ever (;;)
  
  struct initline {
***************
*** 88,93 ****
--- 96,104 ----
  {
          int vec,i;
          pid_t pid;
+ #ifdef INIT_SKIP_TEST
+ char *vp;
+ #endif
  
  #ifdef SET_TZ
          set_tz();
***************
*** 116,121 ****
--- 127,145 ----
          for(i = 0; i < NUMCMD; i++)
                  inittab[i].pid = -1;
  
+ #ifdef INIT_SKIP_TEST
+ vp = getbenv("SKIPINIT");
+ if (vp) {
+ if (strcmp(vp, "true") == 0) {
+ for (;;) {
+ printf("init: SKIPINIT true, sleeping...\n");
+ while (wait(&vec) > 0)
+ ;
+ sleep(60);
+ }
+ }
+ }
+ #endif
          read_inittab();
  
  #ifdef DEBUGGING
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST