- probe usbhid very first
- probe by PCI_CLASS_STORAGE_RAID too
This commit is contained in:
parent
b3d7bc862d
commit
b8e0eb7bac
73
probing.c
73
probing.c
@ -193,6 +193,9 @@ static void pci_probe(enum driver_type type)
|
|||||||
case IDE_ADAPTERS:
|
case IDE_ADAPTERS:
|
||||||
that_class = PCI_CLASS_STORAGE_IDE << 8;
|
that_class = PCI_CLASS_STORAGE_IDE << 8;
|
||||||
break;
|
break;
|
||||||
|
case RAID_ADAPTERS:
|
||||||
|
that_class = PCI_CLASS_STORAGE_RAID << 8;
|
||||||
|
break;
|
||||||
case NETWORK_DEVICES:
|
case NETWORK_DEVICES:
|
||||||
that_class = PCI_CLASS_NETWORK_ETHERNET << 8;
|
that_class = PCI_CLASS_NETWORK_ETHERNET << 8;
|
||||||
break;
|
break;
|
||||||
@ -248,16 +251,14 @@ static void pci_probe(enum driver_type type)
|
|||||||
/* vendor & device matched */
|
/* vendor & device matched */
|
||||||
log_message("(pcimap) module is \"%s\"", pcidb->module);
|
log_message("(pcimap) module is \"%s\"", pcidb->module);
|
||||||
#ifndef DISABLE_MEDIAS
|
#ifndef DISABLE_MEDIAS
|
||||||
if (type == IDE_ADAPTERS || type == SCSI_ADAPTERS) {
|
if (type == IDE_ADAPTERS || type == SCSI_ADAPTERS || type == RAID_ADAPTERS) {
|
||||||
int wait_msg = 0;
|
int wait_msg = 0;
|
||||||
enum insmod_return failed;
|
enum insmod_return failed;
|
||||||
if (IS_AUTOMATIC) {
|
if (IS_AUTOMATIC) {
|
||||||
wait_message("Loading driver for %s adapter: %s",
|
wait_message("Loading driver for storage adapter: %s", pcidb->module);
|
||||||
type == SCSI_ADAPTERS ? "SCSI" : "IDE", pcidb->module);
|
|
||||||
wait_msg = 1;
|
wait_msg = 1;
|
||||||
} else
|
} else
|
||||||
stg1_info_message("About to load driver for %s adapter: %s",
|
stg1_info_message("About to load driver for storage adapter: %s", pcidb->module);
|
||||||
type == SCSI_ADAPTERS ? "SCSI" : "IDE", pcidb->module);
|
|
||||||
failed = my_insmod(pcidb->module, type, NULL);
|
failed = my_insmod(pcidb->module, type, NULL);
|
||||||
if (wait_msg)
|
if (wait_msg)
|
||||||
remove_wait_message();
|
remove_wait_message();
|
||||||
@ -335,10 +336,18 @@ static void pci_probe(enum driver_type type)
|
|||||||
/* load all usb controller modules now, starting from possible ehci-hcd */
|
/* load all usb controller modules now, starting from possible ehci-hcd */
|
||||||
/* to prevent case when old-timed module sitting on newer host controller */
|
/* to prevent case when old-timed module sitting on newer host controller */
|
||||||
if (type == USB_CONTROLLERS) {
|
if (type == USB_CONTROLLERS) {
|
||||||
|
enum insmod_return failed;
|
||||||
for (n=HCD_NUM-1; n >= 0; n--) {
|
for (n=HCD_NUM-1; n >= 0; n--) {
|
||||||
if (need_usb_hcd[n]) {
|
if (need_usb_hcd[n]) {
|
||||||
stg1_info_message("About to load driver for usb controller: %s", usb_hcd[n]);
|
/* do it AUTOMATIC -- for usb kbd case */
|
||||||
my_insmod(usb_hcd[n], USB_CONTROLLERS, NULL);
|
/* and ever silent
|
||||||
|
wait_message("Loading driver for USB controller: %s", usb_hcd[n]);
|
||||||
|
*/
|
||||||
|
failed = my_insmod(usb_hcd[n], USB_CONTROLLERS, NULL);
|
||||||
|
/*
|
||||||
|
remove_wait_message();
|
||||||
|
*/
|
||||||
|
warning_insmod_failed(failed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -349,6 +358,7 @@ static void usb_probe(enum driver_type type)
|
|||||||
{
|
{
|
||||||
static int already_probed_usb_controllers = 0;
|
static int already_probed_usb_controllers = 0;
|
||||||
static int already_mounted_usbdev = 0;
|
static int already_mounted_usbdev = 0;
|
||||||
|
static int already_probed_hid = 0;
|
||||||
|
|
||||||
FILE * f;
|
FILE * f;
|
||||||
char buf[200];
|
char buf[200];
|
||||||
@ -357,15 +367,9 @@ static void usb_probe(enum driver_type type)
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
#ifdef ENABLE_USBNET
|
#ifdef ENABLE_USBNET
|
||||||
case NETWORK_DEVICES:
|
case NETWORK_DEVICES:
|
||||||
/*
|
|
||||||
usbdb = usbnet_usb_ids;
|
|
||||||
*/
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
case MEDIA_ADAPTERS:
|
case MEDIA_ADAPTERS:
|
||||||
/*
|
case HID_DEVICES:
|
||||||
usbdb = usbstorage_usb_ids;
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
@ -382,9 +386,13 @@ static void usb_probe(enum driver_type type)
|
|||||||
log_message("USB: couldn't mount /proc/bus/usb");
|
log_message("USB: couldn't mount /proc/bus/usb");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/* no need to show wait message -- we're doing this very first
|
||||||
wait_message("Waiting for USB stuff to show up.");
|
wait_message("Waiting for USB stuff to show up.");
|
||||||
|
*/
|
||||||
sleep(2); /* sucking background work */
|
sleep(2); /* sucking background work */
|
||||||
|
/*
|
||||||
remove_wait_message();
|
remove_wait_message();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dirty hacks */
|
/* dirty hacks */
|
||||||
@ -406,33 +414,16 @@ static void usb_probe(enum driver_type type)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == HID_DEVICES && !already_probed_hid) {
|
||||||
while (NULL != fgets(buf, sizeof(buf), f)) {
|
while (NULL != fgets(buf, sizeof(buf), f)) {
|
||||||
int vendor, device;
|
if (strstr(buf, "Keyboard") || strstr(buf, "Mouse")) {
|
||||||
struct usb_module_map * usbdb;
|
my_insmod("usbhid", ANY_DRIVER_TYPE, NULL);
|
||||||
|
already_probed_hid = 1;
|
||||||
if (strstr(buf, "Keyboard")) {
|
break;
|
||||||
my_insmod("usbkbd", ANY_DRIVER_TYPE, NULL);
|
}
|
||||||
my_insmod("keybdev", ANY_DRIVER_TYPE, NULL);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sscanf(buf, "P: Vendor=%x ProdID=%x", &vendor, &device) != 2)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (usbdb = usb_ids; usbdb; usbdb = usbdb->next) {
|
|
||||||
if (usbdb->vendor == vendor && usbdb->device == device) {
|
|
||||||
log_message("USB: device %04x %04x is \"%s\"", vendor, device, usbdb->module);
|
|
||||||
#ifdef ENABLE_USBNET
|
|
||||||
if (type == NETWORK_DEVICES) {
|
|
||||||
stg1_info_message("About to load driver for usb network device:\n \n%s", usbdb->module);
|
|
||||||
prepare_intf_descr(usbdb->module);
|
|
||||||
warning_insmod_failed(my_insmod(usbdb->module, NETWORK_DEVICES, NULL));
|
|
||||||
if (intf_descr_for_discover) /* for modules providing more than one net intf */
|
|
||||||
net_discovered_interface(NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,6 +440,8 @@ static void probe_that_type(enum driver_type type)
|
|||||||
update_splash();
|
update_splash();
|
||||||
pci_probe(SCSI_ADAPTERS);
|
pci_probe(SCSI_ADAPTERS);
|
||||||
update_splash();
|
update_splash();
|
||||||
|
pci_probe(RAID_ADAPTERS);
|
||||||
|
update_splash();
|
||||||
usb_probe(MEDIA_ADAPTERS);
|
usb_probe(MEDIA_ADAPTERS);
|
||||||
update_splash();
|
update_splash();
|
||||||
} else {
|
} else {
|
||||||
@ -762,6 +755,10 @@ void get_medias(enum media_type media, char *** names, char *** models)
|
|||||||
}
|
}
|
||||||
#endif /* DISABLE_MEDIAS */
|
#endif /* DISABLE_MEDIAS */
|
||||||
|
|
||||||
|
void probe_hiddev()
|
||||||
|
{
|
||||||
|
usb_probe(HID_DEVICES);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef DISABLE_NETWORK
|
#ifndef DISABLE_NETWORK
|
||||||
int net_device_available(char * device)
|
int net_device_available(char * device)
|
||||||
|
@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
enum media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA };
|
enum media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA };
|
||||||
|
|
||||||
enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, USB_CONTROLLERS, BRIDGE_OTHER, ANY_DRIVER_TYPE };
|
enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, RAID_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, HID_DEVICES, USB_CONTROLLERS, BRIDGE_OTHER, ANY_DRIVER_TYPE };
|
||||||
|
|
||||||
void get_medias(enum media_type media, char *** names, char *** models);
|
void get_medias(enum media_type media, char *** names, char *** models);
|
||||||
|
void probe_hiddev();
|
||||||
char ** get_net_devices(void);
|
char ** get_net_devices(void);
|
||||||
void net_discovered_interface(char * intf_name);
|
void net_discovered_interface(char * intf_name);
|
||||||
char * get_net_intf_description(char * intf_name);
|
char * get_net_intf_description(char * intf_name);
|
||||||
@ -47,6 +48,7 @@ void prepare_intf_descr(const char * intf_descr);
|
|||||||
#define PCI_BASE_CLASS_STORAGE 0x01
|
#define PCI_BASE_CLASS_STORAGE 0x01
|
||||||
#define PCI_CLASS_STORAGE_SCSI 0x0100
|
#define PCI_CLASS_STORAGE_SCSI 0x0100
|
||||||
#define PCI_CLASS_STORAGE_IDE 0x0101
|
#define PCI_CLASS_STORAGE_IDE 0x0101
|
||||||
|
#define PCI_CLASS_STORAGE_RAID 0x0104
|
||||||
#define PCI_CLASS_NETWORK_ETHERNET 0x0200
|
#define PCI_CLASS_NETWORK_ETHERNET 0x0200
|
||||||
#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
|
#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
|
||||||
#define PCI_CLASS_SERIAL_USB 0x0c03
|
#define PCI_CLASS_SERIAL_USB 0x0c03
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# -*- rpm-spec -*-
|
# -*- rpm-spec -*-
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
%def_without shell
|
||||||
|
|
||||||
Name: propagator
|
Name: propagator
|
||||||
Version: 20060124
|
Version: 20061123
|
||||||
Release: alt1
|
Release: alt1
|
||||||
|
|
||||||
Summary: 'Early userspace' set of binaries
|
Summary: 'Early userspace' set of binaries
|
||||||
@ -11,7 +13,7 @@ Group: System/Kernel and hardware
|
|||||||
|
|
||||||
Source0: %name-%version.tar.bz2
|
Source0: %name-%version.tar.bz2
|
||||||
|
|
||||||
BuildRequires: dietlibc diet-bzlib >= 20050707 diet-newt >= 20050707 diet-slang >= 20050707 mar
|
BuildRequires: gcc3.4 dietlibc diet-bzlib >= 20050707 diet-newt >= 20050707 diet-slang >= 20050707 mar
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%name is a set of binaries useful in 'early userspace' environment,
|
%name is a set of binaries useful in 'early userspace' environment,
|
||||||
@ -21,7 +23,8 @@ including init and various helpers for hw probing and bootstrapping.
|
|||||||
%setup -qc
|
%setup -qc
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%__make
|
%set_gcc_version 3.4
|
||||||
|
make %{?_with_shell:WITH_SHELL=t}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install DESTDIR=%buildroot LIBDIR=%_libdir install
|
%make_install DESTDIR=%buildroot LIBDIR=%_libdir install
|
||||||
@ -31,6 +34,11 @@ including init and various helpers for hw probing and bootstrapping.
|
|||||||
%_libdir/%name
|
%_libdir/%name
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 23 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20061123-alt1
|
||||||
|
- added conditional shell spawning
|
||||||
|
- fixed probing of some RAID adaptors
|
||||||
|
- probe usbhid early
|
||||||
|
|
||||||
* Tue Jan 24 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20060124-alt1
|
* Tue Jan 24 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20060124-alt1
|
||||||
- added tweaks for nForce nics
|
- added tweaks for nForce nics
|
||||||
|
|
||||||
|
1
stage1.c
1
stage1.c
@ -415,6 +415,7 @@ int main(int argc, char **argv, char **env)
|
|||||||
"your own risk. Alternatively, you may reboot your system now.");
|
"your own risk. Alternatively, you may reboot your system now.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
probe_hiddev();
|
||||||
ret = method_select_and_prepare();
|
ret = method_select_and_prepare();
|
||||||
|
|
||||||
finish_frontend();
|
finish_frontend();
|
||||||
|
Loading…
Reference in New Issue
Block a user