=================================================================== RCS file: /cvs/prex-old/dev/core/main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- prex-old/dev/core/main.c 2008/07/18 10:07:50 1.1 +++ prex-old/dev/core/main.c 2008/08/08 13:37:11 1.2 @@ -36,7 +36,9 @@ #define MAXDRIVER 100 +#ifndef CONFIG_AUTOCONF extern struct driver *driver_table[]; +#endif /* * Entry point of driver module @@ -55,6 +57,7 @@ if (machine_init()) panic("driver_main: init failed"); +#ifndef CONFIG_AUTOCONF /* * Call init routine for all device drivers with init order. * Smaller value will be run first. @@ -73,4 +76,17 @@ } } } +#else + /* + * Enter autoconfiguration machinery. + * Attach 'root' pseudo device, which will then search for its children. + */ + printk("Entering autoconfiguration phase.\n"); + + config_attach_rootdev(); + + printk("Exiting autoconfiguration phase.\n"); + +#endif /* !CONFIG_AUTOCONF */ + }