All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ip autoconfig with modules, kernel 2.4
@ 2001-05-10 16:49 Brian J. Murrell
  2001-05-10 17:00 ` Russell King
  0 siblings, 1 reply; 6+ messages in thread
From: Brian J. Murrell @ 2001-05-10 16:49 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

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.


[-- Attachment #2: Patch for ipautoconfig with ethernet modules --]
[-- Type: text/plain, Size: 875 bytes --]

--- 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;

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

end of thread, other threads:[~2001-05-11 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-10 16:49 [PATCH] ip autoconfig with modules, kernel 2.4 Brian J. Murrell
2001-05-10 17:00 ` Russell King
2001-05-11 18:13   ` Brian J. Murrell
2001-05-11 18:21     ` Peter Svensson
2001-05-11 18:38     ` Russell King
2001-05-11 18:49       ` Brian J. Murrell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.