summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xmake_boot_img6
-rw-r--r--mdk-stage1/.cvsignore2
-rw-r--r--mdk-stage1/Makefile23
-rw-r--r--mdk-stage1/probing.c29
-rwxr-xr-xmdk-stage1/usb-resource/update-usb-ids.pl10
-rw-r--r--perl-install/modules.pm3
-rwxr-xr-xupdate_kernel11
8 files changed, 41 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index a1768b5dc..078322853 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
-RELEASE_BOOT_IMG = cdrom.img hd.img network.img usbnet.img
+RELEASE_BOOT_IMG = cdrom.img hd.img network.img usb.img
ifeq (i386,$(ARCH))
RELEASE_BOOT_IMG += blank.img pcmcia.img other.img
endif
@@ -23,7 +23,7 @@ FRELEASE_BOOT_IMG = $(BOOT_IMG:%=images/%)
FBOOT_IMG = $(BOOT_IMG:%=images/%)
FBOOT_RDZ = $(FBOOT_IMG:%.img=%.rdz) images/all.rdz
-BINS = mdk-stage1/init mdk-stage1/stage1-full mdk-stage1/stage1-cdrom mdk-stage1/stage1-network mdk-stage/stage1-usbnet
+BINS = mdk-stage1/init mdk-stage1/stage1-full mdk-stage1/stage1-cdrom mdk-stage1/stage1-network mdk-stage1/stage1-usb
ifeq (ppc,$(ARCH))
BINS = mdk-stage1/init mdk-stage1/stage1-full
endif
diff --git a/make_boot_img b/make_boot_img
index bc87ffa0a..71ebf2277 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-@ARGV >= 2 or die "usage: $0 <image> all|other|cdrom|hd|network|usbnet|blank|pcmcia|live|tftp|tftprd\n";
+@ARGV >= 2 or die "usage: $0 <image> all|other|cdrom|hd|network|usb|blank|pcmcia|live|tftp|tftprd\n";
use Config;
use MDK::Common;
@@ -34,7 +34,7 @@ $install = $ {{
tftprd => "stage1-full",
pcmcia => "stage1-full",
network => "stage1-network",
- usbnet => "stage1-usbnet",
+ usb => "stage1-usb",
cdrom => "stage1-cdrom",
hd => "stage1-disk",
live64 => "stage1-full",
@@ -108,7 +108,7 @@ sub initrd {
install_stripped("$instdir/init", "$mnt/sbin");
install_stripped("$instdir/$install", "$mnt/sbin/stage1");
- if ($type eq "network" || $type eq "usbnet" || $type eq "all" || $type eq "other" || $type eq "blank") {
+ if ($type eq "network" || $type eq "usb" || $type eq "all" || $type eq "other" || $type eq "blank") {
install_stripped("$instdir/ppp/pppd-bin", "$mnt/sbin/pppd");
install_stripped("$instdir/rp-pppoe/pppoe-bin", "$mnt/sbin/pppoe");
_ "$sudo mknod $mnt/dev/ppp c 108 0";
diff --git a/mdk-stage1/.cvsignore b/mdk-stage1/.cvsignore
index af2397e4b..a96a43de4 100644
--- a/mdk-stage1/.cvsignore
+++ b/mdk-stage1/.cvsignore
@@ -8,5 +8,5 @@ debug.log
*.rdz*
mkinitrd_helper.tar.bz2
hack_*
-stage1-usbnet
+stage1-usb
rescue-gui
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile
index a58fabaa7..cedaef119 100644
--- a/mdk-stage1/Makefile
+++ b/mdk-stage1/Makefile
@@ -23,7 +23,7 @@
#
# ix86
# init with minilibc
- # stage1 with dietlibc except some targets
+ # stage1 with dietlibc
#
# ppc
# init with dietlibc
@@ -122,8 +122,7 @@ STAGE1OBJS-NETWORK = $(subst .c,-NETWORK.o,$(STAGE1SRC) $(NETWORKSRC))
NETWORK_DEFS = -DDISABLE_CDROM -DDISABLE_DISK
-STAGE1OBJS-USBNET = $(subst .c,-USBNET.o,$(STAGE1SRC) $(NETWORKSRC))
-
+STAGE1OBJS-USB = $(subst .c,-USB.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC))
STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC))
@@ -144,7 +143,7 @@ endif
BINS = init stage1-full
ifeq (i386, $(ARCH))
-BINS += stage1-cdrom stage1-disk stage1-network stage1-usbnet
+BINS += stage1-cdrom stage1-disk stage1-network stage1-usb
endif
ifneq (ia64, $(ARCH))
@@ -164,8 +163,8 @@ PCMCIA_DEFS = -DENABLE_PCMCIA
endif
-USBNET_DEFS_GEN = -DENABLE_USB -DENABLE_USBNET
-USBNET_DEFS = $(USBNET_DEFS_GEN) -DDISABLE_PCINET
+USB_DEFS_GEN = -DENABLE_USB
+USB_DEFS = -DENABLE_USB -DDISABLE_PCIADAPTERS
all: dirs $(BINS)
@@ -190,7 +189,7 @@ stage1-network: $(STAGE1OBJS-NETWORK) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $^
$(STRIPCMD) $@
-stage1-usbnet: $(STAGE1OBJS-USBNET) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
+stage1-usb: $(STAGE1OBJS-USB) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
$(CC) $(LDFLAGS_STAGE1) -o $@ $^
$(STRIPCMD) $@
@@ -211,11 +210,11 @@ $(STAGE1OBJS-DISK): %-DISK.o: %.c
$(STAGE1OBJS-NETWORK): %-NETWORK.o: %.c
$(COMPILE) $(INCLUDES) $(NETWORK_DEFS) -c $< -o $@
-$(STAGE1OBJS-USBNET): %-USBNET.o: %.c
- $(COMPILE) $(INCLUDES) $(NETWORK_DEFS) $(USBNET_DEFS) -c $< -o $@
+$(STAGE1OBJS-USB): %-USB.o: %.c
+ $(COMPILE) $(INCLUDES) $(USB_DEFS) -c $< -o $@
$(STAGE1OBJS-FULL): %-FULL.o: %.c
- $(COMPILE) $(INCLUDES) $(USBNET_DEFS_GEN) $(PCMCIA_DEFS) -c $< -o $@
+ $(COMPILE) $(INCLUDES) $(USB_DEFS_GEN) $(PCMCIA_DEFS) -c $< -o $@
.c.o:
$(COMPILE) $(INCLUDES) -c $<
@@ -225,7 +224,7 @@ clean:
@for n in $(DIRS); do \
(cd $$n; make clean) \
done
- rm -f *.o .depend *.rdz *.img $(BINS)
+ rm -f *.o .depend *.rdz *.img rescue-gui $(BINS)
tar-mkinitrd_helper: clean
@@ -255,7 +254,7 @@ endif
*-NETWORK.o: %-NETWORK.o: %.o
-*-USBNET.o: %-USBNET.o: %.o
+*-USB.o: %-USB.o: %.o
*-FULL.o: %-FULL.o: %.o
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 3390636e2..7dca40336 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -136,6 +136,7 @@ static void probe_that_type(enum driver_type type)
struct pci_module_map * pcidb = NULL;
switch (type) {
+#ifndef DISABLE_PCIADAPTERS
#ifndef DISABLE_MEDIAS
case SCSI_ADAPTERS:
pcidb = medias_pci_ids;
@@ -143,7 +144,6 @@ static void probe_that_type(enum driver_type type)
break;
#endif
#ifndef DISABLE_NETWORK
-#ifndef DISABLE_PCINET
case NETWORK_DEVICES:
pcidb = network_pci_ids;
len = network_num_ids;
@@ -225,17 +225,6 @@ static void probe_that_type(enum driver_type type)
char buf[200];
struct usb_module_map * usbdb = NULL;
- switch (type) {
-#ifdef ENABLE_USBNET
- case NETWORK_DEVICES:
- usbdb = usbnet_usb_ids;
- len = usbnet_usb_num_ids;
- break;
-#endif
- default:
- goto end_usb_probe;
- }
-
if (!already_probed_usb_controllers) {
already_probed_usb_controllers = 1;
probe_that_type(USB_CONTROLLERS);
@@ -243,6 +232,7 @@ static void probe_that_type(enum driver_type type)
if (!already_mounted_usbdev) {
already_mounted_usbdev = 1;
+ my_insmod("usb-storage", SCSI_ADAPTERS, NULL);
if (mount("/proc/bus/usb", "/proc/bus/usb", "usbdevfs", 0, NULL)) {
log_message("USB: couldn't mount /proc/bus/usb");
goto end_usb_probe;
@@ -257,11 +247,20 @@ static void probe_that_type(enum driver_type type)
goto end_usb_probe;
}
+ switch (type) {
+ case NETWORK_DEVICES:
+ usbdb = usb_usb_ids;
+ len = usb_usb_num_ids;
+ break;
+ default:
+ goto end_usb_probe;
+ }
+
while (1) {
int i, vendor, id;
if (!fgets(buf, sizeof(buf), f)) break;
-
+
if (strstr(buf, "Keyboard")) {
my_insmod("usbkbd", ANY_DRIVER_TYPE, NULL);
my_insmod("keybdev", ANY_DRIVER_TYPE, NULL);
@@ -273,7 +272,6 @@ static void probe_that_type(enum driver_type type)
for (i = 0; i < len; i++) {
if (usbdb[i].vendor == vendor && usbdb[i].id == id) {
log_message("USB: device %04x %04x is \"%s\" (%s)", vendor, id, usbdb[i].name, usbdb[i].module);
-#ifdef ENABLE_USBNET
if (type == NETWORK_DEVICES) {
stg1_info_message("About to load driver for usb network device:\n \n%s", usbdb[i].name);
prepare_intf_descr(usbdb[i].name);
@@ -281,7 +279,6 @@ static void probe_that_type(enum driver_type type)
if (intf_descr_for_discover) /* for modules providing more than one net intf */
net_discovered_interface(NULL);
}
-#endif
}
}
@@ -630,7 +627,7 @@ char ** get_net_devices(void)
"tr0",
"plip0", "plip1", "plip2",
"fddi0",
-#ifdef ENABLE_USBNET
+#ifdef ENABLE_USB
"usb0", "usb1", "usb2", "usb3",
#endif
NULL
diff --git a/mdk-stage1/usb-resource/update-usb-ids.pl b/mdk-stage1/usb-resource/update-usb-ids.pl
index 2e66db638..03ddb1355 100755
--- a/mdk-stage1/usb-resource/update-usb-ids.pl
+++ b/mdk-stage1/usb-resource/update-usb-ids.pl
@@ -25,8 +25,7 @@ struct usb_module_map {
};
';
-print "#ifdef ENABLE_USB
-struct pci_module_map usb_pci_ids[] = {
+print "struct pci_module_map usb_pci_ids[] = {
";
@@ -42,11 +41,10 @@ while (my ($k, $v) = each %$drivers) {
print "};
int usb_num_ids=sizeof(usb_pci_ids)/sizeof(struct pci_module_map);
-#endif
";
-my @t = ('usbnet');
+my @t = ('usb');
foreach $type (@t) {
@@ -56,8 +54,7 @@ foreach $type (@t) {
push @$modulez, (`../mar/mar -l $_`);
}
- print "#ifdef ENABLE_".uc($type)."
-struct usb_module_map ${type}_usb_ids[] = {
+ print "struct usb_module_map ${type}_usb_ids[] = {
";
foreach my $usbentry (@usbtable) {
grep(/^\t$usbentry->{'module'}\.o\s/, @$modulez) or next;
@@ -67,7 +64,6 @@ struct usb_module_map ${type}_usb_ids[] = {
print "};
int ${type}_usb_num_ids=sizeof(${type}_usb_ids)/sizeof(struct usb_module_map);
-#endif
";
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index a3f9e19e5..3351680ab 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -127,6 +127,9 @@ if_(arch() !~ /alpha/ && arch() !~ /sparc/,
"catc" => "CATC EL1210A NetMate USB Ethernet driver",
"CDCEther" => "CDCEther",
}],
+[ 'usbstorage', {
+ "usb-storage" => "usb-storage",
+}],
[ 'isdn', {
"hisax" => "hisax",
"hysdn" => "hysdn",
diff --git a/update_kernel b/update_kernel
index 8a22ca68c..5bcf9b942 100755
--- a/update_kernel
+++ b/update_kernel
@@ -39,7 +39,7 @@ function create_modules() {
create_marfile cdrom_modules.mar $CDROM_MODULES $GENERIC_MODULES
create_marfile hd_modules.mar $HD_MODULES $GENERIC_MODULES
create_marfile pcmcia_modules.mar $PCMCIA_MODULES $PCMCIA_COREMODULES $GENERIC_MODULES
- create_marfile usbnet_modules.mar $USBNET_MODULES $GENERIC_MODULES
+ create_marfile usb_modules.mar $USB_MODULES $GENERIC_MODULES
create_marfile other_modules.mar $BIG_MODULES $GENERIC_MODULES
create_marfile all_modules.mar $ALL_MODULES $PCMCIA_COREMODULES $GENERIC_MODULES
rm -f $ALL_MODULES $PCMCIA_COREMODULES $NOT_USEFULL_IN_STAGE1 # leave in the directory non-install1 used modules
@@ -63,15 +63,14 @@ f "disk" ; DISK_DRIVERS=$v
f "net" ; NETWORK_DRIVERS=$v
f "scsi cdrom" ; CD_DRIVERS=$v
f "pcmcia net_raw cdrom_raw scsi_raw disk_raw" ; PCMCIA_DRIVERS=$v
-f "usb" ; USB_DRIVERS=$v
-f "usbnet net_raw" ; USBNET_DRIVERS=$v
+f "usb usbnet net_raw usbstorage scsi_raw cdrom_raw disk_raw" ; USB_DRIVERS=$v
f "big net_raw cdrom_raw scsi_raw disk_raw" ; BIG_DRIVERS=$v
-f "pcmcia net usb usbnet cdrom scsi disk keepbig" ; ALL_DRIVERS=$v
+f "pcmcia net usb usbnet usbstorage cdrom scsi disk keepbig" ; ALL_DRIVERS=$v
[ $ARCH == "i386" ] && DOSMODULES="vfat.o fat.o"
echo "done."
NETWORK_MODULES=" $NETWORK_DRIVERS"
-USBNET_MODULES=" $USB_DRIVERS $USBNET_DRIVERS usbkbd.o keybdev.o input.o"
+USB_MODULES=" $USB_DRIVERS usbkbd.o keybdev.o input.o"
CDROM_MODULES=" $CD_DRIVERS"
HD_MODULES=" $DOSMODULES $SCSI_DRIVERS $DISK_DRIVERS loop.o isofs.o reiserfs.o"
[ "$ARCH" == "ppc" ] && HD_MODULES="$HD_MODULES hfs.o"
@@ -79,7 +78,7 @@ PCMCIA_MODULES=" $DOSMODULES $PCMCIA_DRIVERS"
BIG_MODULES=" $BIG_DRIVERS"
ALL_MODULES=" $DOSMODULES $ALL_DRIVERS loop.o isofs.o reiserfs.o"
[ "$ARCH" == "ppc" ] && ALL_MODULES="$ALL_MODULES hfs.o"
-NOT_USEFULL_IN_STAGE1="nls_*.o parport_probe.o raid*.o serial.o smbfs.o usb-*.o"
+NOT_USEFULL_IN_STAGE1="nls_*.o parport_probe.o raid*.o serial.o smbfs.o"
GENERIC_MODULES="isa-pnp.o floppy.o"