diff -urN /mnt/raid/1/2.2/linux/Makefile linux/Makefile
--- /mnt/raid/1/2.2/linux/Makefile	Fri Sep  1 22:10:50 2000
+++ linux/Makefile	Sat Sep  2 09:10:00 2000
@@ -111,7 +111,7 @@
 FILESYSTEMS	=fs/filesystems.a
 NETWORKS	=net/network.a
 DRIVERS		=drivers/block/block.a \
-		 drivers/char/char.a \
+		 drivers/char/char.o \
 	         drivers/misc/misc.a
 LIBS		=$(TOPDIR)/lib/lib.a
 SUBDIRS		=kernel drivers mm fs net ipc lib
diff -urN /mnt/raid/1/2.2/linux/Rules.make linux/Rules.make
--- /mnt/raid/1/2.2/linux/Rules.make	Fri Sep  1 22:10:30 2000
+++ linux/Rules.make	Sat Sep  2 09:41:44 2000
@@ -77,7 +77,7 @@
 $(O_TARGET): $(ALL_O)
 	rm -f $@
 ifneq "$(strip $(ALL_O))" ""
-	$(LD) $(EXTRA_LDFLAGS) -r -o $@ $(ALL_O)
+	$(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(ALL_O), $^)
 else
 	$(AR) rcs $@
 endif
diff -urN /mnt/raid/1/2.2/linux/arch/alpha/vmlinux.lds linux/arch/alpha/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/alpha/vmlinux.lds	Wed Jun  7 23:26:42 2000
+++ linux/arch/alpha/vmlinux.lds	Sat Sep  2 12:35:03 2000
@@ -27,11 +27,16 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(2*8192);	/* Align double page for init_task_union */
   __init_end = .;
 
   /* The initial task and kernel stack */
   init_task : { *(init_task) }
+
 
   /* Global data */
   _data = .;
diff -urN /mnt/raid/1/2.2/linux/arch/arm/vmlinux-armo.lds linux/arch/arm/vmlinux-armo.lds
--- /mnt/raid/1/2.2/linux/arch/arm/vmlinux-armo.lds	Sun Sep  6 19:44:47 1998
+++ linux/arch/arm/vmlinux-armo.lds	Sat Sep  2 12:35:18 2000
@@ -41,8 +41,13 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(32768);
   __init_end = .;
+
 
   __bss_start = .;		/* BSS */
   .bss : {
diff -urN /mnt/raid/1/2.2/linux/arch/arm/vmlinux-armv.lds linux/arch/arm/vmlinux-armv.lds
--- /mnt/raid/1/2.2/linux/arch/arm/vmlinux-armv.lds	Sun Sep  6 19:44:47 1998
+++ linux/arch/arm/vmlinux-armv.lds	Sat Sep  2 12:35:26 2000
@@ -41,8 +41,13 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(4096);
   __init_end = .;
+
 
   __bss_start = .;		/* BSS */
   .bss : {
diff -urN /mnt/raid/1/2.2/linux/arch/i386/vmlinux.lds.S linux/arch/i386/vmlinux.lds.S
--- /mnt/raid/1/2.2/linux/arch/i386/vmlinux.lds.S	Mon Aug  9 21:04:38 1999
+++ linux/arch/i386/vmlinux.lds.S	Sun Sep  3 12:40:00 2000
@@ -42,8 +42,16 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
+  __initcall_start = .;		/* the init functions to be called */
+  .initcall.init : { *(.initcall.init) }
+  __initcall_end = .;
   . = ALIGN(4096);
   __init_end = .;
+
 
   . = ALIGN(32);
   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
diff -urN /mnt/raid/1/2.2/linux/arch/m68k/vmlinux.lds linux/arch/m68k/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/m68k/vmlinux.lds	Tue Jan  5 20:20:43 1999
+++ linux/arch/m68k/vmlinux.lds	Sat Sep  2 12:35:59 2000
@@ -35,6 +35,7 @@
 
   _edata = .;			/* End of data section */
 
+
   . = ALIGN(16);
   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
 
@@ -42,6 +43,10 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(8192);
   __init_end = .;
 
diff -urN /mnt/raid/1/2.2/linux/arch/ppc/vmlinux.lds linux/arch/ppc/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/ppc/vmlinux.lds	Wed Dec 30 19:55:07 1998
+++ linux/arch/ppc/vmlinux.lds	Sat Sep  2 12:36:12 2000
@@ -71,8 +71,13 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(4096);
   __init_end = .;
+
 
   . = ALIGN(4096);
   __pmac_begin = .;
diff -urN /mnt/raid/1/2.2/linux/arch/s390/vmlinux.lds linux/arch/s390/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/s390/vmlinux.lds	Tue Jan  4 19:12:12 2000
+++ linux/arch/s390/vmlinux.lds	Sat Sep  2 12:36:28 2000
@@ -42,8 +42,13 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(4096);
   __init_end = .;
+
 
   . = ALIGN(32);
   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
diff -urN /mnt/raid/1/2.2/linux/arch/sparc/vmlinux.lds linux/arch/sparc/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/sparc/vmlinux.lds	Thu Mar 11 01:53:36 1999
+++ linux/arch/sparc/vmlinux.lds	Sat Sep  2 12:36:40 2000
@@ -40,8 +40,14 @@
   .text.init : { *(.text.init) }
   __init_text_end = .;
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(4096);
   __init_end = .;
+
+
   __bss_start = .;
   .sbss      : { *(.sbss) *(.scommon) }
   .bss       :
diff -urN /mnt/raid/1/2.2/linux/arch/sparc64/vmlinux.lds linux/arch/sparc64/vmlinux.lds
--- /mnt/raid/1/2.2/linux/arch/sparc64/vmlinux.lds	Wed Aug  5 01:03:35 1998
+++ linux/arch/sparc64/vmlinux.lds	Sat Sep  2 12:36:53 2000
@@ -39,8 +39,14 @@
   __init_begin = .;
   .text.init : { *(.text.init) }
   .data.init : { *(.data.init) }
+  . = ALIGN(16);		/* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
   . = ALIGN(8192);
   __init_end = .;
+
+
   __bss_start = .;
   .sbss      : { *(.sbss) *(.scommon) }
   .bss       :
diff -urN /mnt/raid/1/2.2/linux/drivers/char/Makefile linux/drivers/char/Makefile
--- /mnt/raid/1/2.2/linux/drivers/char/Makefile	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/Makefile	Sat Sep  2 10:30:04 2000
@@ -11,21 +11,23 @@
 
 SUB_DIRS     := 
 MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS) rio ftape joystick drm
+ALL_SUB_DIRS := $(SUB_DIRS) rio ftape joystick drm agp
 
 #
 # This file contains the font map for the default (hardware) font
 #
 FONTMAPFILE = cp437.uni
 
-L_TARGET := char.a
+O_TARGET := char.o
 M_OBJS   :=
-L_OBJS   := tty_io.o n_tty.o tty_ioctl.o mem.o random.o
-LX_OBJS  := pty.o misc.o
+O_OBJS   := tty_io.o n_tty.o tty_ioctl.o mem.o random.o
+OX_OBJS  := pty.o misc.o
+obj-y 	 :=
+obj-m	 :=
 
 ifdef CONFIG_VT
-L_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o
-LX_OBJS += console.o selection.o
+O_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o
+OX_OBJS += console.o selection.o
 endif
 
 ifeq ($(CONFIG_SERIAL),y)
@@ -33,7 +35,7 @@
     ifeq ($(CONFIG_SGI_SERIAL),)
       ifeq ($(CONFIG_DECSTATION),)
 	ifeq ($(CONFIG_BAGET_MIPS),)
-      LX_OBJS += serial.o
+      OX_OBJS += serial.o
     endif
   endif
     endif
@@ -56,28 +58,28 @@
 ifndef CONFIG_BAGET_MIPS
 ifndef CONFIG_SUN_KEYBOARD
 ifdef CONFIG_VT
-LX_OBJS += keyboard.o
-endif
+OX_OBJS += keyboard.o
  ifneq ($(ARCH),m68k)
   ifneq ($(ARCH),s390)
-   L_OBJS += pc_keyb.o defkeymap.o
+   O_OBJS += pc_keyb.o defkeymap.o
  endif
  endif
+endif
 else
 ifdef CONFIG_PCI
-L_OBJS += defkeymap.o
-LX_OBJS += keyboard.o
+O_OBJS += defkeymap.o
+OX_OBJS += keyboard.o
 endif
 endif
 
 ifdef CONFIG_MAGIC_SYSRQ
-LX_OBJS += sysrq.o
+OX_OBJS += sysrq.o
 endif
 endif
 endif
 
 ifeq ($(CONFIG_ATARI_DSP56K),y)
-L_OBJS += dsp56k.o
+O_OBJS += dsp56k.o
 S = y
 else
   ifeq ($(CONFIG_ATARI_DSP56K),m)
@@ -87,7 +89,7 @@
 endif
 
 ifeq ($(CONFIG_ROCKETPORT),y)
-L_OBJS += rocket.o
+O_OBJS += rocket.o
 else
   ifeq ($(CONFIG_ROCKETPORT),m)
   M_OBJS += rocket.o
@@ -95,7 +97,7 @@
 endif
 
 ifeq ($(CONFIG_MOXA_SMARTIO),y)
-L_OBJS += mxser.o
+O_OBJS += mxser.o
 else
   ifeq ($(CONFIG_MOXA_SMARTIO),m)
   M_OBJS += mxser.o
@@ -103,7 +105,7 @@
 endif
 
 ifeq ($(CONFIG_MOXA_INTELLIO),y)
-L_OBJS += moxa.o
+O_OBJS += moxa.o
 else
   ifeq ($(CONFIG_MOXA_INTELLIO),m)
   M_OBJS += moxa.o
@@ -111,7 +113,7 @@
 endif
 
 ifeq ($(CONFIG_DIGI),y)
-L_OBJS += pcxx.o
+O_OBJS += pcxx.o
 else
   ifeq ($(CONFIG_DIGI),m)
   M_OBJS += pcxx.o
@@ -119,7 +121,7 @@
 endif
 
 ifeq ($(CONFIG_DIGIEPCA),y)
-L_OBJS += epca.o
+O_OBJS += epca.o
 else
   ifeq ($(CONFIG_DIGIEPCA),m)
   M_OBJS += epca.o
@@ -127,7 +129,7 @@
 endif
 
 ifeq ($(CONFIG_CYCLADES),y)
-L_OBJS += cyclades.o
+O_OBJS += cyclades.o
 else
   ifeq ($(CONFIG_CYCLADES),m)
   M_OBJS += cyclades.o
@@ -135,7 +137,7 @@
 endif
 
 ifeq ($(CONFIG_STALLION),y)
-L_OBJS += stallion.o
+O_OBJS += stallion.o
 else
   ifeq ($(CONFIG_STALLION),m)
   M_OBJS += stallion.o
@@ -143,7 +145,7 @@
 endif
 
 ifeq ($(CONFIG_ISTALLION),y)
-L_OBJS += istallion.o
+O_OBJS += istallion.o
 else
   ifeq ($(CONFIG_ISTALLION),m)
   M_OBJS += istallion.o
@@ -151,7 +153,7 @@
 endif
 
 ifeq ($(CONFIG_COMPUTONE),y)
-L_OBJS += ip2.o ip2main.o
+O_OBJS += ip2.o ip2main.o
 else
   ifeq ($(CONFIG_COMPUTONE),m)
   M_OBJS += ip2.o ip2main.o
@@ -159,7 +161,7 @@
 endif
 
 ifeq ($(CONFIG_RISCOM8),y)
-L_OBJS += riscom8.o
+O_OBJS += riscom8.o
 else
   ifeq ($(CONFIG_RISCOM8),m)
   M_OBJS += riscom8.o
@@ -167,7 +169,7 @@
 endif
 
 ifeq ($(CONFIG_ISI),y)
-L_OBJS += isicom.o
+O_OBJS += isicom.o
 else
   ifeq ($(CONFIG_ISI),m)
   M_OBJS += isicom.o
@@ -175,7 +177,7 @@
 endif
 
 ifeq ($(CONFIG_ESPSERIAL),y)
-L_OBJS += esp.o
+O_OBJS += esp.o
 else
   ifeq ($(CONFIG_ESPSERIAL),m)
   M_OBJS += esp.o
@@ -191,34 +193,27 @@
 endif
 
 ifeq ($(CONFIG_SPECIALIX),y)
-L_OBJS += specialix.o
+O_OBJS += specialix.o
 else
   ifeq ($(CONFIG_SPECIALIX),m)
   M_OBJS += specialix.o
   endif
 endif
 
-ifeq ($(CONFIG_SX),y)
-L_OBJS += sx.o generic_serial.o
-else
-  ifeq ($(CONFIG_SX),m)
-  M_OBJS += sx.o  generic_serial.o
-  endif
-endif
+obj-$(CONFIG_SX) += sx.o generic_serial.o
+obj-$(CONFIG_RIO) += rio/rio.o generic_serial.o
 
 ifeq ($(CONFIG_RIO),y)
-L_OBJS += rio/rio.o  generic_serial.o
 SUB_DIRS += rio
 MOD_SUB_DIRS += rio
 else
   ifeq ($(CONFIG_RIO),m)
-  M_OBJS += generic_serial.o
   MOD_SUB_DIRS += rio
   endif
 endif
 
 ifeq ($(CONFIG_ATIXL_BUSMOUSE),y)
-L_OBJS += atixlmouse.o
+O_OBJS += atixlmouse.o
 else
   ifeq ($(CONFIG_ATIXL_BUSMOUSE),m)
   M_OBJS += atixlmouse.o
@@ -226,7 +221,7 @@
 endif
 
 ifeq ($(CONFIG_BUSMOUSE),y)
-L_OBJS += busmouse.o
+O_OBJS += busmouse.o
 else
   ifeq ($(CONFIG_BUSMOUSE),m)
   M_OBJS += busmouse.o
@@ -234,7 +229,7 @@
 endif
 
 ifeq ($(CONFIG_PRINTER),y)
-L_OBJS += lp.o
+O_OBJS += lp.o
 else
   ifeq ($(CONFIG_PRINTER),m)
   M_OBJS += lp.o
@@ -242,7 +237,7 @@
 endif
 
 ifeq ($(CONFIG_JOYSTICK),y)
-L_OBJS += joystick/js.o
+O_OBJS += joystick/js.o
 SUB_DIRS += joystick
 MOD_SUB_DIRS += joystick
 else
@@ -252,7 +247,7 @@
 endif
 
 ifeq ($(CONFIG_DTLK),y)
-L_OBJS += dtlk.o
+O_OBJS += dtlk.o
 else
   ifeq ($(CONFIG_DTLK),m)
   M_OBJS += dtlk.o
@@ -260,7 +255,7 @@
 endif
 
 ifeq ($(CONFIG_MS_BUSMOUSE),y)
-L_OBJS += msbusmouse.o
+O_OBJS += msbusmouse.o
 else
   ifeq ($(CONFIG_MS_BUSMOUSE),m)
   M_OBJS += msbusmouse.o
@@ -268,7 +263,7 @@
 endif
 
 ifeq ($(CONFIG_82C710_MOUSE),y)
-L_OBJS += qpmouse.o
+O_OBJS += qpmouse.o
 else
   ifeq ($(CONFIG_82C710_MOUSE),m)
   M_OBJS += qpmouse.o
@@ -276,7 +271,7 @@
 endif
 
 ifeq ($(CONFIG_SOFT_WATCHDOG),y)
-L_OBJS += softdog.o
+O_OBJS += softdog.o
 else
   ifeq ($(CONFIG_SOFT_WATCHDOG),m)
   M_OBJS += softdog.o
@@ -284,7 +279,7 @@
 endif
 
 ifeq ($(CONFIG_PCWATCHDOG),y)
-L_OBJS += pcwd.o
+O_OBJS += pcwd.o
 else
   ifeq ($(CONFIG_PCWATCHDOG),m)
   M_OBJS += pcwd.o
@@ -292,7 +287,7 @@
 endif
 
 ifeq ($(CONFIG_ACQUIRE_WDT),y)
-L_OBJS += acquirewdt.o
+O_OBJS += acquirewdt.o
 else
   ifeq ($(CONFIG_ACQUIRE_WDT),m)
   M_OBJS += acquirewdt.o
@@ -300,7 +295,7 @@
 endif
 
 ifeq ($(CONFIG_60XX_WDT),y)
-L_OBJS += sbc60xxwdt.o
+O_OBJS += sbc60xxwdt.o
 else
   ifeq ($(CONFIG_60XX_WDT),m)
   M_OBJS += sbc60xxwdt.o
@@ -308,7 +303,7 @@
 endif
 
 ifeq ($(CONFIG_MIXCOMWD),y)
-L_OBJS += mixcomwd.o
+O_OBJS += mixcomwd.o
 else
   ifeq ($(CONFIG_MIXCOMWD),m)
   M_OBJS += mixcomwd.o
@@ -316,7 +311,7 @@
 endif
 
 ifeq ($(CONFIG_AMIGAMOUSE),y)
-L_OBJS += amigamouse.o
+O_OBJS += amigamouse.o
 else
   ifeq ($(CONFIG_AMIGAMOUSE),m)
     M_OBJS += amigamouse.o
@@ -324,7 +319,7 @@
 endif
 
 ifeq ($(CONFIG_ATARIMOUSE),y)
-L_OBJS += atarimouse.o
+O_OBJS += atarimouse.o
 else
   ifeq ($(CONFIG_ATARIMOUSE),m)
     M_OBJS += atarimouse.o
@@ -332,7 +327,7 @@
 endif
 
 ifeq ($(CONFIG_ADBMOUSE),y)
-L_OBJS += adbmouse.o
+O_OBJS += adbmouse.o
 else
   ifeq ($(CONFIG_ADBMOUSE),m)
     M_OBJS += adbmouse.o
@@ -340,7 +335,7 @@
 endif
 
 ifeq ($(CONFIG_PC110_PAD),y)
-L_OBJS += pc110pad.o
+O_OBJS += pc110pad.o
 else
   ifeq ($(CONFIG_PC110_PAD),m)
     M_OBJS += pc110pad.o
@@ -348,7 +343,7 @@
 endif
 
 ifeq ($(CONFIG_WDT),y)
-L_OBJS += wdt.o
+O_OBJS += wdt.o
 else
   ifeq ($(CONFIG_WDT),m)
     M_OBJS += wdt.o
@@ -356,12 +351,12 @@
 endif
 
 ifeq ($(CONFIG_RTC),y)
-L_OBJS += rtc.o
+O_OBJS += rtc.o
 endif
 
 ifeq ($(CONFIG_NVRAM),y)
   ifeq ($(CONFIG_PPC),)
-  L_OBJS += nvram.o
+  O_OBJS += nvram.o
   endif
 else
   ifeq ($(CONFIG_NVRAM),m)
@@ -372,7 +367,7 @@
 endif
 
 ifeq ($(CONFIG_AGP),y)
-L_OBJS += agp/agpgart.o
+O_OBJS += agp/agp.o
 ALL_SUB_DIRS += agp
 SUB_DIRS += agp
 else
@@ -383,7 +378,7 @@
 endif
     
 ifeq ($(CONFIG_VIDEO_DEV),y)
-LX_OBJS += videodev.o
+OX_OBJS += videodev.o
 else
   ifeq ($(CONFIG_VIDEO_DEV),m)
     MX_OBJS += videodev.o
@@ -399,7 +394,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_BT848),y)
-L_OBJS += bttv.o tuner.o
+O_OBJS += bttv.o tuner.o
 L_I2C=y
 else
   ifeq ($(CONFIG_VIDEO_BT848),m)
@@ -409,7 +404,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_MSP3400),y)
-L_OBJS += msp3400.o 
+O_OBJS += msp3400.o 
 L_I2C=y
 else
   ifeq ($(CONFIG_VIDEO_MSP3400),m)
@@ -419,7 +414,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_SAA5249),y)
-L_OBJS += saa5249.o
+O_OBJS += saa5249.o
 L_I2C=y
 else
   ifeq ($(CONFIG_VIDEO_SAA5249),m)
@@ -429,7 +424,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_BWQCAM),y)
-L_OBJS += bw-qcam.o
+O_OBJS += bw-qcam.o
 else
   ifeq ($(CONFIG_VIDEO_BWQCAM),m)
     M_OBJS += bw-qcam.o
@@ -437,7 +432,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_CQCAM),y)
-L_OBJS += c-qcam.o
+O_OBJS += c-qcam.o
 else
   ifeq ($(CONFIG_VIDEO_CQCAM),m)
     M_OBJS += c-qcam.o
@@ -445,7 +440,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_ZORAN),y)
-L_OBJS += buz.o
+O_OBJS += buz.o
 L_I2C=y
 else
   ifeq ($(CONFIG_VIDEO_ZORAN),m)
@@ -455,7 +450,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_LML33),y)
-L_OBJS += bt856.o bt819.o
+O_OBJS += bt856.o bt819.o
 else
   ifeq ($(CONFIG_VIDEO_LML33),m)
     M_OBJS += bt856.o bt819.o
@@ -463,7 +458,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_BUZ),y)
-L_OBJS += saa7111.o saa7185.o
+O_OBJS += saa7111.o saa7185.o
 else
   ifeq ($(CONFIG_VIDEO_BUZ),m)
     M_OBJS += saa7111.o saa7185.o
@@ -471,7 +466,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_PMS),y)
-L_OBJS += pms.o
+O_OBJS += pms.o
 else
   ifeq ($(CONFIG_VIDEO_PMS),m)
   M_OBJS += pms.o
@@ -479,7 +474,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_PLANB),y)
-L_OBJS += planb.o
+O_OBJS += planb.o
 else
   ifeq ($(CONFIG_VIDEO_PLANB),m)
   M_OBJS += planb.o
@@ -487,7 +482,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_VINO),y)
-L_OBJS += vino.o
+O_OBJS += vino.o
 else
   ifeq ($(CONFIG_VIDEO_VINO),m)
   M_OBJS += vino.o
@@ -495,7 +490,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_CPIA),y)
-LX_OBJS += cpia.o
+OX_OBJS += cpia.o
 else
   ifeq ($(CONFIG_VIDEO_CPIA),m)
     MX_OBJS += cpia.o
@@ -503,7 +498,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_CPIA_PP),y)
-L_OBJS += cpia_pp.o
+O_OBJS += cpia_pp.o
 else
   ifeq ($(CONFIG_VIDEO_CPIA_PP),m)
     M_OBJS += cpia_pp.o
@@ -511,7 +506,7 @@
 endif
 
 ifeq ($(CONFIG_VIDEO_CPIA_USB),y)
-L_OBJS += cpia_usb.o
+O_OBJS += cpia_usb.o
 else
   ifeq ($(CONFIG_VIDEO_CPIA_USB),m)
     M_OBJS += cpia_usb.o
@@ -519,7 +514,7 @@
 endif
 
 ifeq ($(CONFIG_RADIO_AZTECH),y)
-L_OBJS += radio-aztech.o
+O_OBJS += radio-aztech.o
 else
   ifeq ($(CONFIG_RADIO_AZTECH),m)
   M_OBJS += radio-aztech.o
@@ -527,7 +522,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_SF16FMI),y)
-L_OBJS += radio-sf16fmi.o
+O_OBJS += radio-sf16fmi.o
 else
   ifeq ($(CONFIG_RADIO_SF16FMI),m)
   M_OBJS += radio-sf16fmi.o
@@ -535,7 +530,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_RTRACK),y)
-L_OBJS += radio-aimslab.o
+O_OBJS += radio-aimslab.o
 else
   ifeq ($(CONFIG_RADIO_RTRACK),m)
   M_OBJS += radio-aimslab.o
@@ -543,7 +538,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_RTRACK2),y)
-L_OBJS += radio-rtrack2.o
+O_OBJS += radio-rtrack2.o
 else
   ifeq ($(CONFIG_RADIO_RTRACK2),m)
   M_OBJS += radio-rtrack2.o
@@ -551,7 +546,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_TYPHOON),y)
-L_OBJS += radio-typhoon.o
+O_OBJS += radio-typhoon.o
 else
   ifeq ($(CONFIG_RADIO_TYPHOON),m)
   M_OBJS += radio-typhoon.o
@@ -559,7 +554,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_ZOLTRIX),y)
-L_OBJS += radio-zoltrix.o
+O_OBJS += radio-zoltrix.o
 else
   ifeq ($(CONFIG_RADIO_ZOLTRIX),m)
   M_OBJS += radio-zoltrix.o
@@ -567,7 +562,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_CADET),y)
-L_OBJS += radio-cadet.o
+O_OBJS += radio-cadet.o
 else
   ifeq ($(CONFIG_RADIO_CADET),m)
   M_OBJS += radio-cadet.o
@@ -575,7 +570,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_MIROPCM20),y)
-L_OBJS += radio-miropcm20.o
+O_OBJS += radio-miropcm20.o
 else
   ifeq ($(CONFIG_RADIO_MIROPCM20),m)
   M_OBJS += radio-miropcm20.o
@@ -583,7 +578,7 @@
 endif
 
 ifeq ($(CONFIG_RADIO_GEMTEK),y)
-L_OBJS += radio-gemtek.o
+O_OBJS += radio-gemtek.o
 else
   ifeq ($(CONFIG_RADIO_GEMTEK),m)
   M_OBJS += radio-gemtek.o
@@ -591,7 +586,7 @@
 endif                                             
 
 ifeq ($(CONFIG_RADIO_TRUST),y)
-L_OBJS += radio-trust.o
+O_OBJS += radio-trust.o
 else
   ifeq ($(CONFIG_RADIO_TRUST),m)
   M_OBJS += radio-trust.o
@@ -599,7 +594,7 @@
 endif                                             
 
 ifeq ($(CONFIG_QIC02_TAPE),y)
-L_OBJS += tpqic02.o
+O_OBJS += tpqic02.o
 else
   ifeq ($(CONFIG_QIC02_TAPE),m)
   M_OBJS += tpqic02.o
@@ -607,7 +602,7 @@
 endif
 
 ifeq ($(CONFIG_FTAPE),y)
-L_OBJS       += ftape/ftape.o
+O_OBJS       += ftape/ftape.o
 SUB_DIRS     += ftape
 ifneq ($(CONFIG_ZFTAPE),n)
 MOD_SUB_DIRS += ftape
@@ -619,12 +614,13 @@
 endif
 
 ifdef CONFIG_H8
-LX_OBJS += h8.o
+OX_OBJS += h8.o
 endif
 
 
 ifeq ($(CONFIG_DRM),y)
 SUB_DIRS += drm
+O_OBJS += drm/drm.o
 MOD_SUB_DIRS += drm
 else
   ifeq ($(CONFIG_DRM),m)
@@ -634,7 +630,7 @@
 
 
 ifeq ($(L_I2C),y)
-LX_OBJS += i2c.o
+OX_OBJS += i2c.o
 else
   ifeq ($(M_I2C),y)
   MX_OBJS += i2c.o
@@ -645,7 +641,7 @@
 ifeq ($(CONFIG_HFMODEM),y)
 ALL_SUB_DIRS += hfmodem
 SUB_DIRS += hfmodem
-L_OBJS += hfmodem/hfmodem.o
+O_OBJS += hfmodem/hfmodem.o
 else
   ifeq ($(CONFIG_HFMODEM),m)
   ALL_SUB_DIRS += hfmodem
@@ -655,17 +651,26 @@
 endif
 
 ifeq ($(CONFIG_DZ),y)
-  L_OBJS += dz.o
+  O_OBJS += dz.o
 endif
 
 
 ifeq ($(CONFIG_TOSHIBA),y)
-L_OBJS += toshiba.o
+O_OBJS += toshiba.o
 else
   ifeq ($(CONFIG_TOSHIBA),m)
   M_OBJS += toshiba.o
   endif
 endif
+
+# remove objects from modular that are also built in
+obj-m           := $(filter-out $(obj-y), $(obj-m))
+
+# Translate to Rules.make lists.
+
+O_OBJS          += $(filter-out $(export-objs), $(obj-y))
+OX_OBJS         += $(filter     $(export-objs), $(obj-y))
+M_OBJS          += $(sort $(filter     $(module-list), $(obj-m)))
 
 
 include $(TOPDIR)/Rules.make
diff -urN /mnt/raid/1/2.2/linux/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c
--- /mnt/raid/1/2.2/linux/drivers/char/agp/agpgart_be.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/agp/agpgart_be.c	Sat Sep  2 09:06:25 2000
@@ -23,7 +23,6 @@
  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
-#define EXPORT_SYMTAB 1
 #include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/drmP.h linux/drivers/char/drm/drmP.h
--- /mnt/raid/1/2.2/linux/drivers/char/drm/drmP.h	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/drmP.h	Sun Sep  3 17:21:41 2000
@@ -131,14 +131,6 @@
 #define NOPAGE_OOM 0
 #endif
 
-				/* module_init/module_exit added in 2.3.13 */
-#ifndef module_init
-#define module_init(x)  int init_module(void) { return x(); }
-#endif
-#ifndef module_exit
-#define module_exit(x)  void cleanup_module(void) { x(); }
-#endif
-
 				/* Generic cmpxchg added in 2.3.x */
 #ifndef __HAVE_ARCH_CMPXCHG
 				/* Include this here so that driver can be
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/gamma_drv.c linux/drivers/char/drm/gamma_drv.c
--- /mnt/raid/1/2.2/linux/drivers/char/drm/gamma_drv.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/gamma_drv.c	Sat Sep  2 09:13:14 2000
@@ -35,11 +35,6 @@
 
 #include <linux/agp_backend.h>
 
-static __attribute__((unused)) void unused(void)
-{
-	agp_enable(0);
-}
-
 #ifndef PCI_DEVICE_ID_3DLABS_GAMMA
 #define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008
 #endif
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/i810_drv.c linux/drivers/char/drm/i810_drv.c
--- /mnt/raid/1/2.2/linux/drivers/char/drm/i810_drv.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/i810_drv.c	Sat Sep  2 12:22:00 2000
@@ -35,11 +35,6 @@
 
 #include <linux/agp_backend.h>
 
-static __attribute__((unused)) void unused(void)
-{
-	agp_enable(0);
-}
-
 #define I810_NAME	 "i810"
 #define I810_DESC	 "Intel I810"
 #define I810_DATE	 "20000719"
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/mga_drv.c linux/drivers/char/drm/mga_drv.c
--- /mnt/raid/1/2.2/linux/drivers/char/drm/mga_drv.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/mga_drv.c	Sat Sep  2 12:21:46 2000
@@ -36,11 +36,6 @@
 
 #include <linux/agp_backend.h>
 
-static __attribute__((unused)) void unused(void)
-{
-	agp_enable(0);
-}
-
 #define MGA_NAME	 "mga"
 #define MGA_DESC	 "Matrox g200/g400"
 #define MGA_DATE	 "20000719"
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/r128_drv.c linux/drivers/char/drm/r128_drv.c
--- /mnt/raid/1/2.2/linux/drivers/char/drm/r128_drv.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/r128_drv.c	Sun Sep  3 13:57:57 2000
@@ -30,15 +30,11 @@
  */
 
 #include <linux/config.h>
+#include <linux/init.h>
 #include "drmP.h"
 #include "r128_drv.h"
 
 #include <linux/agp_backend.h>
-
-static __attribute__((unused)) void unused(void)
-{
-	agp_enable(0);
-}
 
 #define R128_NAME	 "r128"
 #define R128_DESC	 "ATI Rage 128"
diff -urN /mnt/raid/1/2.2/linux/drivers/char/drm/tdfx_drv.c linux/drivers/char/drm/tdfx_drv.c
--- /mnt/raid/1/2.2/linux/drivers/char/drm/tdfx_drv.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/char/drm/tdfx_drv.c	Sat Sep  2 09:13:30 2000
@@ -36,11 +36,6 @@
 
 #include <linux/agp_backend.h>
 
-static __attribute__((unused)) void unused(void)
-{
-	agp_enable(0);
-}
-
 #define TDFX_NAME	 "tdfx"
 #define TDFX_DESC	 "3dfx Banshee/Voodoo3+"
 #define TDFX_DATE	 "20000719"
diff -urN /mnt/raid/1/2.2/linux/drivers/net/acenic.c linux/drivers/net/acenic.c
--- /mnt/raid/1/2.2/linux/drivers/net/acenic.c	Fri Sep  1 22:10:50 2000
+++ linux/drivers/net/acenic.c	Sat Sep  2 23:53:19 2000
@@ -608,6 +608,7 @@
 MODULE_PARM(max_tx_desc, "1-" __MODULE_STRING(8) "i");
 MODULE_PARM(rx_coal_tick, "1-" __MODULE_STRING(8) "i");
 MODULE_PARM(max_rx_desc, "1-" __MODULE_STRING(8) "i");
+#endif
 
 
 void __exit ace_module_cleanup(void)
@@ -697,7 +698,6 @@
 		root_dev = next;
 	}
 }
-#endif
 
 
 int __init ace_module_init(void)
diff -urN /mnt/raid/1/2.2/linux/drivers/scsi/megaraid.c linux/drivers/scsi/megaraid.c
--- /mnt/raid/1/2.2/linux/drivers/scsi/megaraid.c	Fri Sep  1 22:10:51 2000
+++ linux/drivers/scsi/megaraid.c	Sat Sep  2 10:18:40 2000
@@ -1934,8 +1934,9 @@
 	  remove_proc_entry("config", megaCfg->controller_proc_dir_entry);
 	  remove_proc_entry("mailbox", megaCfg->controller_proc_dir_entry);
           for (i = 0; i < numCtlrs; i++) {
-                char buf[12] ={0};
-		sprintf(buf,"%d",i);
+                char buf[12];
+                memset(buf,0,12);
+                sprintf(buf,"%d",i);
           	remove_proc_entry(buf,mega_proc_dir_entry);
 	 }
          remove_proc_entry("megaraid", &proc_root);
diff -urN /mnt/raid/1/2.2/linux/drivers/sound/cs4281.c linux/drivers/sound/cs4281.c
--- /mnt/raid/1/2.2/linux/drivers/sound/cs4281.c	Fri Sep  1 22:10:36 2000
+++ linux/drivers/sound/cs4281.c	Sun Sep  3 14:45:14 2000
@@ -76,16 +76,6 @@
 #include <linux/version.h>
 
 #if LINUX_VERSION_CODE < 0x02030d
-#ifdef MODULE
-#define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
-#else
-#define __exit __attribute__ ((unused, __section__ (".text.init")))
-#define module_exit(x) // nothing 
-#define module_init(x) // nothing 
-#endif
-
 #define DECLARE_WAIT_QUEUE_HEAD(w) struct wait_queue *w = NULL
 #define DECLARE_WAITQUEUE(w,c) struct wait_queue w = {(c), NULL}
 #define wait_queue_head_t struct wait_queue *
@@ -182,7 +172,7 @@
 };
 
 
-struct cs4281_state *devs = NULL;
+static struct cs4281_state *devs = NULL;
 // --------------------------------------------------------------------- 
 //
 //		Hardware Interfaces For the CS4281
diff -urN /mnt/raid/1/2.2/linux/drivers/sound/es1370.c linux/drivers/sound/es1370.c
--- /mnt/raid/1/2.2/linux/drivers/sound/es1370.c	Fri Sep  1 22:10:37 2000
+++ linux/drivers/sound/es1370.c	Sun Sep  3 14:43:53 2000
@@ -164,12 +164,8 @@
 
 #ifdef MODULE
 #define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
 #else
 #define __exit __attribute__ ((unused, __section__ (".text.init")))
-#define module_exit(x) /* nothing */
-#define module_init(x) /* nothing */
 #endif
 
 #define DECLARE_WAIT_QUEUE_HEAD(w) struct wait_queue *w = NULL
diff -urN /mnt/raid/1/2.2/linux/drivers/sound/es1371.c linux/drivers/sound/es1371.c
--- /mnt/raid/1/2.2/linux/drivers/sound/es1371.c	Fri Sep  1 22:10:37 2000
+++ linux/drivers/sound/es1371.c	Sun Sep  3 14:44:08 2000
@@ -132,12 +132,8 @@
 
 #ifdef MODULE
 #define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
 #else
 #define __exit __attribute__ ((unused, __section__ (".text.init")))
-#define module_exit(x) /* nothing */
-#define module_init(x) /* nothing */
 #endif
 
 #define DECLARE_WAIT_QUEUE_HEAD(w) struct wait_queue *w = NULL
diff -urN /mnt/raid/1/2.2/linux/drivers/sound/esssolo1.c linux/drivers/sound/esssolo1.c
--- /mnt/raid/1/2.2/linux/drivers/sound/esssolo1.c	Fri Sep  1 22:10:37 2000
+++ linux/drivers/sound/esssolo1.c	Sun Sep  3 14:44:19 2000
@@ -133,12 +133,8 @@
 #if LINUX_VERSION_CODE < 0x02030d
 #ifdef MODULE
 #define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
 #else
 #define __exit __attribute__ ((unused, __section__ (".text.init")))
-#define module_exit(x) /* nothing */
-#define module_init(x) /* nothing */
 #endif
 
 #define DECLARE_WAIT_QUEUE_HEAD(w) struct wait_queue *w = NULL
diff -urN /mnt/raid/1/2.2/linux/drivers/sound/sonicvibes.c linux/drivers/sound/sonicvibes.c
--- /mnt/raid/1/2.2/linux/drivers/sound/sonicvibes.c	Thu May  4 02:16:46 2000
+++ linux/drivers/sound/sonicvibes.c	Sun Sep  3 14:44:29 2000
@@ -115,12 +115,8 @@
 
 #ifdef MODULE
 #define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
 #else
 #define __exit __attribute__ ((unused, __section__ (".text.init")))
-#define module_exit(x) /* nothing */
-#define module_init(x) /* nothing */
 #endif
 
 #define DECLARE_WAIT_QUEUE_HEAD(w) struct wait_queue *w = NULL
diff -urN /mnt/raid/1/2.2/linux/drivers/usb/Config.in linux/drivers/usb/Config.in
--- /mnt/raid/1/2.2/linux/drivers/usb/Config.in	Fri Sep  1 22:10:52 2000
+++ linux/drivers/usb/Config.in	Sun Sep  3 10:35:25 2000
@@ -48,7 +48,7 @@
    dep_tristate '  USB Kodak DC-2xx Camera support' CONFIG_USB_DC2XX $CONFIG_USB
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
 	   dep_tristate '  USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)' CONFIG_USB_MDC800 $CONFIG_USB
-      dep_tristate '  USB Mass Storage support (EXPERIMENTAL)' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
+      dep_tristate '  USB Mass Storage support (EXPERIMENTAL)' CONFIG_USB_STORAGE m
       if [ "$CONFIG_USB_STORAGE" != "n" ]; then
          bool '    USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG
       fi
@@ -60,9 +60,11 @@
       dep_tristate '  USB ADMtek Pegasus-based device support (EXPERIMENTAL)' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET
       dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB
       dep_tristate '  D-Link USB FM radio support (EXPERIMENTAL)' CONFIG_USB_DSBR $CONFIG_USB $CONFIG_VIDEO_DEV
-      dep_tristate '  Microtek X6USB scanner support (EXPERIMENTAL)' CONFIG_USB_MICROTEK $CONFIG_SCSI
+      dep_tristate '  Microtek X6USB scanner support (EXPERIMENTAL)' CONFIG_USB_MICROTEK m
+   fi
+   if [ "$CONFIG_NET" = "y" ]; then
+      dep_tristate '  Kawasaki USB-ethernet controller' CONFIG_USB_KAWETH $CONFIG_USB
    fi
-   dep_tristate '  Kawasaki USB-ethernet controller' CONFIG_USB_KAWETH $CONFIG_USB
 
 comment 'USB HID'
    dep_tristate '  USB Human Interface Device (HID) support' CONFIG_USB_HID $CONFIG_USB
@@ -72,7 +74,7 @@
    fi
    dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB
    dep_tristate '  Logitech WingMan Force joystick support' CONFIG_USB_WMFORCE $CONFIG_USB
-   dep_tristate '  Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB
+   dep_tristate '  Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB $CONFIG_VT
    dep_tristate '  Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_USB
    if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
       int '   Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
diff -urN /mnt/raid/1/2.2/linux/drivers/usb/inode.c linux/drivers/usb/inode.c
--- /mnt/raid/1/2.2/linux/drivers/usb/inode.c	Fri Sep  1 22:10:52 2000
+++ linux/drivers/usb/inode.c	Sat Sep  2 10:27:40 2000
@@ -703,7 +703,9 @@
                 remove_proc_entry("usb", proc_bus);
 #endif
 	usb_deregister(&usbdevfs_driver);
+#ifdef CONFIG_MODULES	
 	unregister_filesystem(&usbdevice_fs_type);
+#endif	
 }
 
 #if 0
diff -urN /mnt/raid/1/2.2/linux/drivers/usb/usb-core.c linux/drivers/usb/usb-core.c
--- /mnt/raid/1/2.2/linux/drivers/usb/usb-core.c	Fri Sep  1 22:10:52 2000
+++ linux/drivers/usb/usb-core.c	Sun Sep  3 15:39:50 2000
@@ -103,68 +103,6 @@
 #ifdef CONFIG_USB_PLUSB
 	plusb_init();
 #endif
-
-#if defined(CONFIG_INPUT_KEYBDEV) || defined(CONFIG_INPUT_MOUSEDEV) || \
-    defined(CONFIG_INPUT_JOYDEV)  || defined(CONFIG_INPUT_EVDEV)    || \
-    defined(CONFIG_INPUT_KBD)     || defined(CONFIG_INPUT_MOUSE)    || \
-    defined(CONFIG_INPUT_WACOM)   || defined(CONFIG_INPUT_WMFORCE)  || \
-    defined(CONFIG_INPUT_HID)
-	input_init_module();
-#endif
-#ifdef CONFIG_USB_ACM
-       acm_init_module();
-#endif
-#ifdef CONFIG_USB_DC2XX
-       usb_dc2xx_init_module();
-#endif
-#ifdef CONFIG_INPUT_EVDEV
-       evdev_init_module();
-#endif
-#ifdef CONFIG_USB_HID
-       hid_init_module();
-#endif
-#ifdef CONFIG_INPUT_JOYDEV
-       joydev_init_module();
-#endif
-#ifdef CONFIG_INPUT_KEYBDEV
-       keybdev_init_module();
-#endif
-#ifdef CONFIG_INPUT_MOUSEDEV
-       mousedev_init_module();
-#endif
-#ifdef CONFIG_USB_MICROTEK
-	microtek_drv_init_module();
-#endif
-#ifdef CONFIG_USB_PRINTER
-       usblp_init_module();
-#endif
-#ifdef CONFIG_VIDEO_OV511
-	usb_ov511_init_module();
-#endif
-#ifdef CONFIG_USB_RIO500
-       usb_rio_init_module();
-#endif
-#ifdef CONFIG_USB_SCANNER
-       usb_scanner_init_module();
-#endif
-#ifdef CONFIG_USB_SERIAL
-       usb_serial_init_module();
-#endif
-#ifdef CONFIG_USB_STORAGE
-       usb_stor_init_module();
-#endif
-#ifdef CONFIG_USB_KBD
-       usb_kbd_init_module();
-#endif
-#ifdef CONFIG_USB_MOUSE
-       usb_mouse_init_module();
-#endif
-#ifdef CONFIG_USB_WACOM
-       wacom_init_module();
-#endif
-#ifdef CONFIG_USB_WMFORCE
-       wmforce_init_module();
-#endif
 #ifdef CONFIG_USB_UHCI
 	uhci_init();
 #endif
diff -urN /mnt/raid/1/2.2/linux/include/linux/init.h linux/include/linux/init.h
--- /mnt/raid/1/2.2/linux/include/linux/init.h	Wed Jun  7 23:26:44 2000
+++ linux/include/linux/init.h	Sun Sep  3 14:01:53 2000
@@ -65,4 +65,67 @@
 #define __initlocaldata
 #endif
 
+
+/*
+ * Used for kernel command line parameter setup
+ */
+struct new_kernel_param {
+	const char *str;
+	int (*setup_func)(char *);
+};
+
+extern struct new_kernel_param __setup_start, __setup_end;
+
+#define __setup(str, fn)								\
+	static char __setup_str_##fn[] __initdata = str;				\
+	static struct new_kernel_param __setup_##fn __initsetup = { __setup_str_##fn, fn }
+
+#define __initsetup	__attribute__ ((unused,__section__ (".setup.init")))
+
+
+/*
+ * Used for initialization calls..
+ */
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+#define __init_call	__attribute__ ((unused,__section__ (".initcall.init")))
+#define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))
+
+extern initcall_t __initcall_start, __initcall_end;
+
+#define __initcall(fn)								\
+	static initcall_t __initcall_##fn __init_call = fn
+#define __exitcall(fn)								\
+	static exitcall_t __exitcall_##fn __exit_call = fn
+
+#ifdef MODULE
+/* Not sure what version aliases were introduced in, but certainly in 2.91.66.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 91)
+/* These macros create a dummy inline: gcc 2.9x does not count alias
+ as usage, hence the `unused function' warning when __init functions
+ are declared static. We use the dummy __*_module_inline functions
+ both to kill the warning and check the type of the init/cleanup
+ function. */
+typedef int (*__init_module_func_t)(void);
+typedef void (*__cleanup_module_func_t)(void);
+#define module_init(x) \
+	int init_module(void) __attribute__((alias(#x))); \
+	extern inline __init_module_func_t __init_module_inline(void) \
+	{ return x; }
+#define module_exit(x) \
+	void cleanup_module(void) __attribute__((alias(#x))); \
+	extern inline __cleanup_module_func_t __cleanup_module_inline(void) \
+	{ return x; }
+#else
+#define module_init(x)	int init_module(void) { return x(); }
+#define module_exit(x)	void cleanup_module(void) { x(); }
+#endif
+
+#else 
+#define module_init(x)	__initcall(x);
+#define module_exit(x)	__exitcall(x);
+#endif
+
+
 #endif
diff -urN /mnt/raid/1/2.2/linux/include/linux/joystick.h linux/include/linux/joystick.h
--- /mnt/raid/1/2.2/linux/include/linux/joystick.h	Fri Sep  1 22:10:53 2000
+++ linux/include/linux/joystick.h	Sun Sep  3 17:40:55 2000
@@ -138,14 +138,6 @@
 #include <asm/spinlock.h>
 typedef struct wait_queue *wait_queue_head_t;
 #define __exit
-#ifdef MODULE
-#define module_init(x)		int init_module(void) { return x(); }
-#define module_exit(x)		void cleanup_module(void) { x(); }
-#else
-#define module_init(x)		int x##_module(void) { return x(); }
-#define module_exit(x)		void x##_module(void) { x(); }
-#endif
-#define __setup(a,b)
 #define BASE_ADDRESS(x,i)	((x)->base_address[i])
 #define DECLARE_WAITQUEUE(x,y)	struct wait_queue x = { y, NULL }
 #define init_waitqueue_head(x)	do { *(x) = NULL; } while (0)
diff -urN /mnt/raid/1/2.2/linux/include/linux/kcomp.h linux/include/linux/kcomp.h
--- /mnt/raid/1/2.2/linux/include/linux/kcomp.h	Fri Sep  1 22:10:53 2000
+++ linux/include/linux/kcomp.h	Sun Sep  3 17:36:24 2000
@@ -52,19 +52,7 @@
 
 #define page_address(x)				(x | PAGE_OFFSET)
 
-#ifdef MODULE
-#define module_init(x)				int init_module(void) { return x(); }
-#define module_exit(x)				void cleanup_module(void) { x(); }
-#define THIS_MODULE				(&__this_module)
-#else
-#define module_init(x)				int x##_module(void) { return x(); }
-#define module_exit(x)				void x##_module(void) { x(); }
-#define THIS_MODULE				NULL
-#endif
-
 #define	TTY_DRIVER_NO_DEVFS			0
-
-#define __initcall(x)
 
 #define	net_device			device
 #define dev_kfree_skb_irq(a)		dev_kfree_skb(a)
diff -urN /mnt/raid/1/2.2/linux/include/linux/module.h linux/include/linux/module.h
--- /mnt/raid/1/2.2/linux/include/linux/module.h	Thu May  4 02:16:52 2000
+++ linux/include/linux/module.h	Sun Sep  3 17:40:27 2000
@@ -142,8 +142,11 @@
 #define __MODULE_STRING(x)	__MODULE_STRING_1(x)
 
 /* Find a symbol exported by the kernel or another module */
+#ifndef CONFIG_MODULES
+static inline unsigned long get_module_symbol(char *A, char *B) { return 0; };
+#else
 extern unsigned long get_module_symbol(char *, char *);
-
+#endif
 #if defined(MODULE) && !defined(__GENKSYMS__)
 
 /* Embedded module documentation macros.  */
diff -urN /mnt/raid/1/2.2/linux/init/main.c linux/init/main.c
--- /mnt/raid/1/2.2/linux/init/main.c	Fri Sep  1 22:10:53 2000
+++ linux/init/main.c	Sun Sep  3 12:48:13 2000
@@ -22,6 +22,7 @@
 #include <linux/smp_lock.h>
 #include <linux/blk.h>
 #include <linux/hdreg.h>
+#include <linux/init.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -403,8 +404,7 @@
 #endif
 
 #ifdef CONFIG_AGP
-extern int agp_initialize (void);
-extern void agp_setup(char *str, int *ints);
+extern int agp_init (void);
 #endif
 
 /*
@@ -1058,9 +1058,6 @@
 #ifdef CONFIG_BLK_CPQ_DA
 	{ "smart2=", cpqarray_setup },
 #endif
-#ifdef CONFIG_AGP
-	{ "agp_try_unsupported=", agp_setup},
-#endif
 	{ 0, 0 }
 };
 
@@ -1119,6 +1116,7 @@
 	{ 0, 0 }
 };
 
+
 #ifdef CONFIG_BLK_DEV_RAM
 static void __init ramdisk_start_setup(char *str, int *ints)
 {
@@ -1147,6 +1145,7 @@
 
 static int __init checksetup(char *line)
 {
+	struct new_kernel_param *p;
 	int i, ints[11];
 
 #ifdef CONFIG_BLK_DEV_IDE
@@ -1170,6 +1169,18 @@
 			return 1;
 		}
 	}
+
+	/* Now handle new-style __setup parameters */
+	p = &__setup_start;
+	do {
+		int n = strlen(p->str);
+		if (!strncmp(line,p->str,n)) {
+			if (p->setup_func(line+n))
+				return 1;
+		}
+		p++;
+	} while (p < &__setup_end);
+
 	return 0;
 }
 
@@ -1468,6 +1479,19 @@
 
 struct task_struct *child_reaper = &init_task;
 
+
+static void __init do_initcalls(void)
+{
+	initcall_t *call;
+
+	call = &__initcall_start;
+	do {
+		(*call)();
+		call++;
+	} while (call < &__initcall_end);
+}
+
+
 /*
  * Ok, the machine is now initialized. None of the devices
  * have been touched yet, but the CPU subsystem is up and
@@ -1533,7 +1557,7 @@
 	nubus_init();
 #endif
 #ifdef CONFIG_AGP
-	agp_initialize ();
+	agp_init ();
 #endif
 
 	/* Networking initialization needs a process context */ 
@@ -1568,6 +1592,10 @@
 
 	/* .. executable formats .. */
 	binfmt_setup();
+
+	/* the functions marked initcall  */
+	
+	do_initcalls();
 
 	/* .. filesystems .. */
 	filesystem_setup();
diff -urN /mnt/raid/1/2.2/linux/net/irda/compressors/Config.in linux/net/irda/compressors/Config.in
--- /mnt/raid/1/2.2/linux/net/irda/compressors/Config.in	Thu May  4 02:16:53 2000
+++ linux/net/irda/compressors/Config.in	Sun Sep  3 14:51:46 2000
@@ -4,7 +4,7 @@
 if [ "$CONFIG_IRDA_COMPRESSION" != "n" ]; then
    comment '    IrDA compressors'
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '    Deflate compression (EXPERIMENTAL)' CONFIG_IRDA_DEFLATE $CONFIG_IRDA
+      dep_tristate '    Deflate compression (EXPERIMENTAL)' CONFIG_IRDA_DEFLATE m
    fi
 #   tristate '    BZIP2 compression' CONFIG_IRDA_BZIP2
 #   tristate '    BSD compression' CONFIG_IRDA_BSD

