Please CC me on any responses as I don't read the kernel-list in my
inbox.  Thanx.

I am looking for comments on the attached patch.  It's purpose is to
allow IP AutoConfig to happen additionally after the loading of an
initial ramdisk.

This allows one to use a "generic all-purpose" built kernel (i.e. a
fully modular kernel) to retrieve it's IP configuration via BOOTP or
RARP (and DHCP when that is ported into 2.4) as long as the ethernet
driver module for the installed ethernet card is loaded via the
initial ramdisk.

Of course, this elminates the need to build kernels with lots of
statically linked ethernet drivers or building lots of kernels with
specific drivers statically linked in.

My hope is that this is seen as a good idea (and a good
implementation) and that the patch is accepted into the Linux kernel.

All comments welcome.

Thanx,
b.

--- linux-2.2.17.old/init/main.c.orig   Tue Mar 27 15:59:08 2001
+++ linux-2.2.17/init/main.c    Tue Mar 27 16:01:03 2001
@@ -132,6 +132,10 @@
 kdev_t real_root_dev;
 #endif
 
+#if CONFIG_IP_PNP
+extern int __init ip_auto_config(void);
+#endif
+
 int root_mountflags = MS_RDONLY;
 char *execute_command;
 
@@ -863,6 +863,9 @@
                        while (pid != wait(&i));
                if (MAJOR(real_root_dev) != RAMDISK_MAJOR
                     || MINOR(real_root_dev) != 0) {
+#if CONFIG_IP_PNP
+                       ip_auto_config();
+#endif
                        error = change_root(real_root_dev,"/initrd");
                        if (error)
                                printk(KERN_ERR "Change root to /initrd: "
--- linux/net/ipv4/ipconfig.c   Wed May  9 00:05:43 2001
+++ linux/net/ipv4/ipconfig.c.new       Wed May  9 00:05:41 2001
@@ -823,7 +823,7 @@
  *     IP Autoconfig dispatcher.
  */
 
-static int __init ip_auto_config(void)
+int __init ip_auto_config(void)
 {
        if (!ic_enable)
                return 0;

Reply via email to