diff -ruN kudzu-0.99.99.orig/adb.c kudzu-0.99.99/adb.c --- kudzu-0.99.99.orig/adb.c 2003-02-11 15:47:38.000000000 +0100 +++ kudzu-0.99.99/adb.c 2003-08-17 22:36:36.000000000 +0200 @@ -109,11 +109,9 @@ } rc = read(fd, rep, 5); - /* read error */ - if (rc != 5) { - continue; - } - if ((rep[1] == 0x74) && (rep[2] == 0x70) && + + /* if rc != 5: read error -- no trackpad */ + if ((rc == 5) && (rep[1] == 0x74) && (rep[2] == 0x70) && (rep[3] == 0x61) && (rep[4] == 0x64)) { mousedev->desc = strdup("Apple Trackpad"); mousedev->driver = strdup("appletpad"); diff -ruN kudzu-0.99.99.orig/ddc.c kudzu-0.99.99/ddc.c --- kudzu-0.99.99.orig/ddc.c 2003-02-11 16:33:03.000000000 +0100 +++ kudzu-0.99.99/ddc.c 2003-08-17 22:36:36.000000000 +0200 @@ -92,9 +92,9 @@ return ret; } -#ifdef __i386__ +#if defined(__i386__) || defined(__powerpc__) -#include "ddcprobe/vbe.h" +#include "ddcprobe/common.h" struct monitor { char *model; @@ -285,6 +285,9 @@ vbe_info = vbe_get_vbe_info(); if (vbe_info) { newdev = ddcNewDevice(NULL); +#ifdef __powerpc__ + newdev->mem = vbe_info->memory_size; +#else newdev->mem = vbe_info->memory_size * 64; if (vbe_info->product_name.string && vbe_info->vendor_name.string && strcmp(vbe_info->vendor_name.string,"Vendor Name")) { @@ -298,6 +301,7 @@ vbe_info->product_name.string); } } +#endif /* __powerpc__ */ if (!newdev->desc && vbe_info->oem_name.string) { newdev->desc = strdup(vbe_info->oem_name.string); } diff -ruN kudzu-0.99.99.orig/ddcprobe/of.c kudzu-0.99.99/ddcprobe/of.c --- kudzu-0.99.99.orig/ddcprobe/of.c 2003-02-11 15:47:38.000000000 +0100 +++ kudzu-0.99.99/ddcprobe/of.c 2003-08-17 22:36:36.000000000 +0200 @@ -40,8 +40,7 @@ if (!rc) { - // Note: if OFfb, vram info is unreliable! - if (strcmp(fix.id, "OFfb")) + if (fix.id) { ret = malloc(sizeof(struct vbe_info)); mem = strdup(fix.id); @@ -52,7 +51,17 @@ ret->product_name.string = NULL; ret->vendor_name.string = NULL; ret->product_revision.string = NULL; - ret->memory_size = fix.smem_len/1024; + + /* Note: OFfb vram info is unreliable so we set a reasonable + * default. OFfb is used mostly on GeForce2/4 hardware most + * of the time, which has as reasonable amount of vram + */ + if (!strncmp(fix.id, "OFfb", 4) && (strstr(fix.id, "NVDA") != NULL)) + { + ret->memory_size = 16384; + } else { + ret->memory_size = (fix.smem_len/1024); + } } } diff -ruN kudzu-0.99.99.orig/hwconf.c kudzu-0.99.99/hwconf.c --- kudzu-0.99.99.orig/hwconf.c 2003-02-20 04:30:18.000000000 +0100 +++ kudzu-0.99.99/hwconf.c 2003-08-17 22:36:36.000000000 +0200 @@ -65,7 +65,7 @@ snprintf(roottext, 80, _("Hardware Discovery Utility %s " - " (C) 2003 Red Hat, Inc."), VERSION); + " (C) 2003 2002 The Free Software Foundation., Red Hat, Inc."), VERSION); newtDrawRootText(0, 0, roottext); } @@ -1433,7 +1433,7 @@ do { if (x>0) { snprintf(message,2048, - _("Welcome to Kudzu, the Red Hat Linux hardware " + _("Welcome to Kudzu, the Linux hardware " "detection and configuration tool.\n\n" "On the following screens you will be able to " "configure any new or removed hardware for your " @@ -1442,7 +1442,7 @@ " Normal bootup will continue in %d seconds."), x ); } else { snprintf(message,2048, - _("Welcome to Kudzu, the Red Hat Linux hardware " + _("Welcome to Kudzu, the Linux hardware " "detection and configuration tool.\n\n" "On the following screens you will be able to " "configure any new or removed hardware for your " @@ -1459,7 +1459,7 @@ } while (x!=0); if (x==0 && y<=0) { winStatus(60,11,_("Welcome to Kudzu"), - _("Welcome to Kudzu, the Red Hat Linux hardware " + _("Welcome to Kudzu, the Linux hardware " "detection and configuration tool.\n\n\n\n" " Timeout exceeded.")); sleep(1); diff -ruN kudzu-0.99.99.orig/kudzu.sysconfig kudzu-0.99.99/kudzu.sysconfig --- kudzu-0.99.99.orig/kudzu.sysconfig 2001-09-25 19:53:57.000000000 +0200 +++ kudzu-0.99.99/kudzu.sysconfig 2003-08-17 22:36:36.000000000 +0200 @@ -3,4 +3,4 @@ # - serial port probing # - DDC monitor probing # - PS/2 probing -SAFE=no +SAFE=yes diff -ruN kudzu-0.99.99.orig/macio.c kudzu-0.99.99/macio.c --- kudzu-0.99.99.orig/macio.c 2003-02-11 15:47:38.000000000 +0100 +++ kudzu-0.99.99/macio.c 2003-08-17 22:36:36.000000000 +0200 @@ -73,7 +73,7 @@ list->result->path = NULL; list->result->next = list->result; - minifind("/proc/device-tree/aliases", "wireless", list); + minifind("/proc/device-tree", "radio", list); // Supported for (n = list->result->next; n != list->result; n = n->next) @@ -104,7 +104,7 @@ list->result->path = NULL; list->result->next = list->result; - minifind("/proc/device-tree/aliases", "sound", list); + minifind("/proc/device-tree", "sound", list); // Supported for (n = list->result->next; n != list->result; n = n->next) diff -ruN kudzu-0.99.99.orig/Makefile kudzu-0.99.99/Makefile --- kudzu-0.99.99.orig/Makefile 2003-02-13 21:48:04.000000000 +0100 +++ kudzu-0.99.99/Makefile 2003-08-17 22:36:36.000000000 +0200 @@ -46,7 +46,7 @@ LOADEROBJ += sbus.o endif ifeq (ppc,$(ARCH)) -LOADEROBJ += macio.o adb.o +LOADEROBJ += minifind.o macio.o adb.o endif DIET = diet diff -ruN kudzu-0.99.99.orig/pci.c kudzu-0.99.99/pci.c --- kudzu-0.99.99.orig/pci.c 2003-01-03 04:02:21.000000000 +0100 +++ kudzu-0.99.99/pci.c 2003-08-17 22:36:36.000000000 +0200 @@ -772,6 +772,15 @@ } dev = pciGetDeviceInfo(p->vendor_id,p->device_id, subvend, subdev, bustype); devtype = config[PCI_CLASS_DEVICE+1] << 8 | config[PCI_CLASS_DEVICE]; + + /* hardcoded fix for Apple UniNorth GMAC card and FireWire + * which doesn't return any pci header info if + * the interface isn't already up */ + if (p->vendor_id==0x106b && (p->device_id==0x21 || p->device_id==0x24 || p->device_id==0x32 || p->device_id==0x1645)) + devtype = PCI_CLASS_NETWORK_ETHERNET; + if (p->vendor_id==0x106b && (p->device_id==0x18 || p->device_id==0x30 || p->device_id==0x31)) + devtype = PCI_CLASS_SERIAL_FIREWIRE; + if (devtype == PCI_CLASS_SERIAL_USB) { /* Test to see if it's UHCI or OHCI */ free (dev->driver); diff -ruN kudzu-0.99.99.orig/po/kudzu.pot kudzu-0.99.99/po/kudzu.pot --- kudzu-0.99.99.orig/po/kudzu.pot 2003-01-31 23:47:42.000000000 +0100 +++ kudzu-0.99.99/po/kudzu.pot 2003-08-17 22:36:36.000000000 +0200 @@ -1,12 +1,13 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-01-31 17:59-0500\n" +"POT-Creation-Date: 2003-03-15 15:57-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,7 +24,8 @@ #: ../hwconf.c:67 #, c-format msgid "" -"Hardware Discovery Utility %s (C) 2003 Red Hat, Inc." +"Hardware Discovery Utility %s (C) 2003 2002 The Free " +"Software Foundation., Red Hat, Inc." msgstr "" #: ../hwconf.c:177 @@ -50,11 +52,11 @@ msgid "Update /etc/inittab" msgstr "" -#: ../hwconf.c:353 ../hwconf.c:489 ../hwconf.c:865 +#: ../hwconf.c:353 ../hwconf.c:489 ../hwconf.c:870 msgid "Yes" msgstr "" -#: ../hwconf.c:353 ../hwconf.c:489 ../hwconf.c:865 +#: ../hwconf.c:353 ../hwconf.c:489 ../hwconf.c:870 msgid "No" msgstr "" @@ -81,74 +83,74 @@ "able to log in on console. Would you like to update it?" msgstr "" -#: ../hwconf.c:809 +#: ../hwconf.c:814 #, c-format msgid "Configuring %s" msgstr "" -#: ../hwconf.c:810 +#: ../hwconf.c:815 msgid "Configuring" msgstr "" -#: ../hwconf.c:823 ../hwconf.c:856 ../hwconf.c:902 ../hwconf.c:922 -#: ../hwconf.c:948 ../hwconf.c:974 ../hwconf.c:1013 +#: ../hwconf.c:828 ../hwconf.c:861 ../hwconf.c:907 ../hwconf.c:927 +#: ../hwconf.c:953 ../hwconf.c:979 ../hwconf.c:1019 #, c-format msgid "aliased %s as %s" msgstr "" -#: ../hwconf.c:865 +#: ../hwconf.c:870 msgid "Existing Configuration Detected" msgstr "" -#: ../hwconf.c:866 +#: ../hwconf.c:871 msgid "Migrate existing network configuration?" msgstr "" -#: ../hwconf.c:874 +#: ../hwconf.c:879 #, c-format msgid "ran netconfig for %s%d" msgstr "" -#: ../hwconf.c:1037 +#: ../hwconf.c:1043 #, c-format msgid "ran mouseconfig for %s" msgstr "" -#: ../hwconf.c:1050 +#: ../hwconf.c:1056 #, c-format msgid "ran kbdconfig for %s" msgstr "" -#: ../hwconf.c:1079 +#: ../hwconf.c:1085 #, c-format msgid "ran printconf for %s" msgstr "" -#: ../hwconf.c:1090 +#: ../hwconf.c:1096 msgid "turned on bcm5820 service" msgstr "" -#: ../hwconf.c:1101 +#: ../hwconf.c:1107 msgid "turned on aep1000 service" msgstr "" -#: ../hwconf.c:1125 +#: ../hwconf.c:1131 #, c-format msgid "Unconfiguring %s" msgstr "" -#: ../hwconf.c:1126 +#: ../hwconf.c:1132 msgid "Removing Configuration" msgstr "" -#: ../hwconf.c:1418 ../hwconf.c:1421 ../hwconf.c:1455 +#: ../hwconf.c:1424 ../hwconf.c:1427 ../hwconf.c:1461 msgid "Welcome to Kudzu" msgstr "" -#: ../hwconf.c:1430 +#: ../hwconf.c:1436 #, c-format msgid "" -"Welcome to Kudzu, the Red Hat Linux hardware detection and configuration " +"Welcome to Kudzu, the Linux hardware detection and configuration " "tool.\n" "\n" "On the following screens you will be able to configure any new or removed " @@ -159,9 +161,9 @@ " Normal bootup will continue in %d seconds." msgstr "" -#: ../hwconf.c:1439 +#: ../hwconf.c:1445 msgid "" -"Welcome to Kudzu, the Red Hat Linux hardware detection and configuration " +"Welcome to Kudzu, the Linux hardware detection and configuration " "tool.\n" "\n" "On the following screens you will be able to configure any new or removed " @@ -170,9 +172,9 @@ " Press any key to continue." msgstr "" -#: ../hwconf.c:1456 +#: ../hwconf.c:1462 msgid "" -"Welcome to Kudzu, the Red Hat Linux hardware detection and configuration " +"Welcome to Kudzu, the Linux hardware detection and configuration " "tool.\n" "\n" "\n" @@ -180,109 +182,109 @@ " Timeout exceeded." msgstr "" -#: ../hwconf.c:1518 +#: ../hwconf.c:1524 msgid "" " Configure / Unconfigure All | Ignore / Keep All | Cancel " msgstr "" -#: ../hwconf.c:1574 +#: ../hwconf.c:1580 msgid "network card" msgstr "" -#: ../hwconf.c:1576 +#: ../hwconf.c:1582 msgid "SCSI controller" msgstr "" -#: ../hwconf.c:1578 +#: ../hwconf.c:1584 msgid "video adapter" msgstr "" -#: ../hwconf.c:1580 +#: ../hwconf.c:1586 msgid "sound card" msgstr "" -#: ../hwconf.c:1582 +#: ../hwconf.c:1588 msgid "mouse" msgstr "" -#: ../hwconf.c:1584 +#: ../hwconf.c:1590 msgid "modem" msgstr "" -#: ../hwconf.c:1586 +#: ../hwconf.c:1592 msgid "CD-ROM drive" msgstr "" -#: ../hwconf.c:1588 +#: ../hwconf.c:1594 msgid "tape drive" msgstr "" -#: ../hwconf.c:1590 +#: ../hwconf.c:1596 msgid "floppy drive" msgstr "" -#: ../hwconf.c:1592 +#: ../hwconf.c:1598 msgid "scanner" msgstr "" -#: ../hwconf.c:1594 +#: ../hwconf.c:1600 msgid "hard disk" msgstr "" -#: ../hwconf.c:1596 +#: ../hwconf.c:1602 msgid "RAID controller" msgstr "" -#: ../hwconf.c:1598 +#: ../hwconf.c:1604 msgid "printer" msgstr "" -#: ../hwconf.c:1600 +#: ../hwconf.c:1606 msgid "video capture card" msgstr "" -#: ../hwconf.c:1602 +#: ../hwconf.c:1608 msgid "keyboard" msgstr "" -#: ../hwconf.c:1604 +#: ../hwconf.c:1610 msgid "monitor" msgstr "" -#: ../hwconf.c:1606 +#: ../hwconf.c:1612 msgid "USB controller" msgstr "" -#: ../hwconf.c:1608 +#: ../hwconf.c:1614 msgid "IEEE1394 controller" msgstr "" -#: ../hwconf.c:1610 +#: ../hwconf.c:1616 msgid "PCMCIA/Cardbus controller" msgstr "" -#: ../hwconf.c:1614 +#: ../hwconf.c:1620 #, c-format msgid "%s device" msgstr "" -#: ../hwconf.c:1722 +#: ../hwconf.c:1728 msgid "Hardware Removed" msgstr "" -#: ../hwconf.c:1722 +#: ../hwconf.c:1728 msgid "Remove Configuration" msgstr "" -#: ../hwconf.c:1723 +#: ../hwconf.c:1729 msgid "Keep Configuration" msgstr "" -#: ../hwconf.c:1723 ../hwconf.c:1767 +#: ../hwconf.c:1729 ../hwconf.c:1773 msgid "Do Nothing" msgstr "" -#: ../hwconf.c:1724 +#: ../hwconf.c:1730 #, c-format msgid "" "The following %s has been removed from your system:\n" @@ -297,19 +299,19 @@ "found missing on subsequent reboots, you will be prompted again." msgstr "" -#: ../hwconf.c:1766 +#: ../hwconf.c:1772 msgid "Hardware Added" msgstr "" -#: ../hwconf.c:1766 +#: ../hwconf.c:1772 msgid "Configure" msgstr "" -#: ../hwconf.c:1767 +#: ../hwconf.c:1773 msgid "Ignore" msgstr "" -#: ../hwconf.c:1768 +#: ../hwconf.c:1774 #, c-format msgid "" "The following %s has been added to your system:\n" @@ -324,47 +326,47 @@ "as new if it is detected on subsequent reboots." msgstr "" -#: ../hwconf.c:1850 +#: ../hwconf.c:1856 msgid "do configuration that doesn't require user input" msgstr "" -#: ../hwconf.c:1854 +#: ../hwconf.c:1860 msgid "do only 'safe' probes that won't disturb hardware" msgstr "" -#: ../hwconf.c:1858 +#: ../hwconf.c:1864 msgid "set timeout in seconds" msgstr "" -#: ../hwconf.c:1861 +#: ../hwconf.c:1867 msgid "probe only, print information to stdout" msgstr "" -#: ../hwconf.c:1865 +#: ../hwconf.c:1871 msgid "probe only the specified 'bus'" msgstr "" -#: ../hwconf.c:1869 +#: ../hwconf.c:1875 msgid "probe only for the specified 'class'" msgstr "" -#: ../hwconf.c:1873 +#: ../hwconf.c:1879 msgid "read probed hardware from a file" msgstr "" -#: ../hwconf.c:1874 +#: ../hwconf.c:1880 msgid "file to read hardware info from" msgstr "" -#: ../hwconf.c:1877 +#: ../hwconf.c:1883 msgid "search for modules for a particular kernel version" msgstr "" -#: ../hwconf.c:1878 +#: ../hwconf.c:1884 msgid "kernel version" msgstr "" -#: ../hwconf.c:1899 +#: ../hwconf.c:1905 msgid "" "\n" "ERROR - You must be root to run kudzu.\n" diff -ruN kudzu-0.99.99.orig/serial.c kudzu-0.99.99/serial.c --- kudzu-0.99.99.orig/serial.c 2003-02-11 18:18:31.000000000 +0100 +++ kudzu-0.99.99/serial.c 2003-08-17 22:36:36.000000000 +0200 @@ -172,6 +172,7 @@ DEBUG("opening serial port %s...", port); fd = open( port, O_RDWR | O_NONBLOCK); + usleep(1000000); if (fd < 0) { DEBUG("failed.\n"); return -1; @@ -874,6 +875,7 @@ struct device *serialProbe(enum deviceClass probeClass, int probeFlags, struct device *devlist) { + FILE *f; int fd; int temp; int pnp_strlen; @@ -889,6 +891,10 @@ int stdin_line=-1; struct serial_struct si; +#ifdef __powerpc__ + char cpubuf[256], *rc; +#endif + DEBUG("Probing for serial ports\n"); if (probeFlags & PROBE_SAFE) return devlist; @@ -925,7 +931,19 @@ } close(fd); } - + + +#ifdef __powerpc__ + f = fopen("/proc/cpuinfo", "r"); + if (f != NULL) { + while ((rc = fgets(cpubuf, 255, f)) != NULL) + { + if (strncasecmp(cpubuf, "pmac-generation", 15) == 0) + console = -1; + } + } + fclose(f); +#endif if ( (probeClass == CLASS_UNSPEC) || @@ -964,6 +982,8 @@ if ((fd=open_serial_port(port)) < 0) { continue; } + usleep(1000000); + /* save the current state of the port */ temp = tcgetattr(fd, &origattr); if (temp < 0) {