Attached some patches that add a -p functionality to the boot process.
If booting with -p, every line printed during probing happens only
after one presses a key.

This was usefull to see the probe messages of a system that completely
hung (read: no scroll-back functionslity left) after probing.

-Guido
--- sbin/reboot/boot_i386.8.orig        Mon Nov 26 16:13:29 2001
+++ sbin/reboot/boot_i386.8     Sun Nov 25 16:46:57 2001
@@ -220,6 +220,8 @@
 and
 .Fl h
 options are automatically set.
+.It Fl p
+pause after each attached device during the device probing phase.
 .It Fl r
 use the statically configured default for the device containing the
 root file system
--- sys/boot/i386/libi386/bootinfo.c.orig       Mon Nov 26 16:13:16 2001
+++ sys/boot/i386/libi386/bootinfo.c    Sat Nov 24 00:10:23 2001
@@ -97,6 +97,9 @@
                case 'h':
                    howto |= RB_SERIAL;
                    break;
+               case 'p':
+                   howto |= RB_PAUSE;
+                   break;
                case 'r':
                    howto |= RB_DFLTROOT;
                    break;
--- sys/sys/reboot.h.orig       Mon Nov 26 16:13:05 2001
+++ sys/sys/reboot.h    Sat Nov 24 00:08:11 2001
@@ -61,6 +61,7 @@
 #define        RB_GDB          0x8000  /* use GDB remote debugger instead of DDB */
 #define        RB_MUTE         0x10000 /* Come up with the console muted */
 #define        RB_SELFTEST     0x20000 /* don't boot to normal operation, do selftest 
*/
+#define        RB_PAUSE        0x40000 /* pause after each line during autoconfig */
 
 #define        RB_BOOTINFO     0x80000000      /* have `struct bootinfo *' arg */
 
--- sys/kern/tty_cons.c.orig    Mon Nov 26 16:12:31 2001
+++ sys/kern/tty_cons.c Mon Nov 26 15:58:30 2001
@@ -98,6 +98,7 @@
 static d_close_t *cn_phys_close;       /* physical device close function */
 static d_open_t *cn_phys_open;         /* physical device open function */
        struct consdev *cn_tab;         /* physical console device info */
+static u_char cninit_notyetfinished=1; /* zero if we left autoconfigure */
 
 CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
@@ -175,6 +176,7 @@
        }
        cn_dev_t = cn_tab->cn_dev;
        cn_udev_t = dev2udev(cn_dev_t);
+       cninit_notyetfinished = 0;
 }
 
 static void
@@ -443,6 +445,12 @@
                if (c == '\n')
                        (*cn_tab->cn_putc)(cn_tab->cn_dev, '\r');
                (*cn_tab->cn_putc)(cn_tab->cn_dev, c);
+               if ((c == '\n') && (boothowto & RB_PAUSE) &&
+                   (cninit_notyetfinished)) {
+                       printf("<pause>\r");
+                       (void)cngetc();
+                       printf("       \r");
+               }
        }
 }
 

Reply via email to