mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 01:38:25 +02:00
Kudzu, ReiserFS, uClibc, gettext und Arbeit am Installer
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@346 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
11
src/patches/kudzu-link-lintl.diff
Normal file
11
src/patches/kudzu-link-lintl.diff
Normal file
@@ -0,0 +1,11 @@
|
||||
--- tmp/kudzu-1.2.60/Makefile 2006-09-05 15:56:21.000000000 +0200
|
||||
+++ build/usr/src/kudzu-1.2.60/Makefile 2006-11-20 15:08:32.000000000 +0100
|
||||
@@ -63,7 +63,7 @@
|
||||
$(RANLIB) libkudzu.a
|
||||
|
||||
kudzu: libkudzu.a $(KUDOBJS) po
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $(KUDOBJS) -o kudzu -L. -lkudzu -L. -lpci -Wl,-Bstatic -lpopt -Wl,-Bdynamic
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(KUDOBJS) -o kudzu -L. -lkudzu -L. -lpci -L. -lintl -Wl,-Bstatic -lpopt -Wl,-Bdynamic
|
||||
|
||||
module_upgrade: libkudzu.a module_upgrade.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) module_upgrade.c -o module_upgrade -L. -lkudzu -lpci
|
||||
12
src/patches/kudzu-nodiet.patch
Normal file
12
src/patches/kudzu-nodiet.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -ruN kudzu-1.1.68.2.orig/Makefile kudzu-1.1.68.2/Makefile
|
||||
--- kudzu-1.1.68.2.orig/Makefile 2004-09-01 01:11:42.000000000 +0000
|
||||
+++ kudzu-1.1.68.2/Makefile 2005-04-29 22:43:00.000000000 +0000
|
||||
@@ -52,7 +52,7 @@
|
||||
LOADEROBJ += s390.o
|
||||
endif
|
||||
|
||||
-DIET = diet
|
||||
+DIET =
|
||||
ifeq (i386,$(ARCH))
|
||||
LOADEROBJS = $(patsubst %.o,%.do,$(LOADEROBJ))
|
||||
else
|
||||
12
src/patches/pciutils-2.1.10-scan.patch
Normal file
12
src/patches/pciutils-2.1.10-scan.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- pciutils-2.1.10/lib/access.c.foo Wed Feb 12 15:44:05 2003
|
||||
+++ pciutils-2.1.10/lib/access.c Wed Feb 12 15:44:33 2003
|
||||
@@ -180,7 +180,8 @@
|
||||
void
|
||||
pci_scan_bus(struct pci_access *a)
|
||||
{
|
||||
- a->methods->scan(a);
|
||||
+ if (a->methods)
|
||||
+ a->methods->scan(a);
|
||||
}
|
||||
|
||||
struct pci_dev *
|
||||
17
src/patches/pciutils-2.1.99-gcc4.patch
Normal file
17
src/patches/pciutils-2.1.99-gcc4.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
Patch by Robert Scheck <redhat@linuxnetz.de> for pciutils >= 2.1.99, which make pciutils
|
||||
rebuildable using gcc 4.
|
||||
|
||||
--- pciutils-2.1.99-test8/lib/i386-ports.c 2004-08-13 22:13:11.000000000 +0200
|
||||
+++ pciutils-2.1.99-test8/lib/i386-ports.c.gcc4 2005-03-14 09:30:06.000000000 +0100
|
||||
@@ -57,9 +57,9 @@
|
||||
for(d.dev = 0; d.dev < 32; d.dev++)
|
||||
{
|
||||
u16 class, vendor;
|
||||
- if (m->read(&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
|
||||
+ if ((m->read) (&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
|
||||
(class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)) ||
|
||||
- m->read(&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
|
||||
+ (m->read) (&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
|
||||
(vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))
|
||||
{
|
||||
a->debug("...outside the Asylum at 0/%02x/0", d.dev);
|
||||
11
src/patches/pciutils-2.2.1-idpath.patch
Normal file
11
src/patches/pciutils-2.2.1-idpath.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- pciutils-2.2.1/Makefile.idpath 2006-02-23 12:24:12.000000000 +0100
|
||||
+++ pciutils-2.2.1/Makefile 2006-02-23 12:24:18.000000000 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
PREFIX=/usr/local
|
||||
SBINDIR=$(PREFIX)/sbin
|
||||
SHAREDIR=$(PREFIX)/share
|
||||
-IDSDIR=$(SHAREDIR)
|
||||
+IDSDIR=$(SHAREDIR)/hwdata
|
||||
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
|
||||
INSTALL=install
|
||||
DIRINSTALL=install -d
|
||||
130
src/patches/pciutils-2.2.3-multilib.patch
Normal file
130
src/patches/pciutils-2.2.3-multilib.patch
Normal file
@@ -0,0 +1,130 @@
|
||||
--- pciutils-2.2.3/lib/configure.multilib 2006-05-05 14:25:07.000000000 +0200
|
||||
+++ pciutils-2.2.3/lib/configure 2006-05-23 15:50:16.000000000 +0200
|
||||
@@ -30,8 +30,37 @@
|
||||
echo " $host $rel"
|
||||
|
||||
c=config.h
|
||||
-echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
-echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
+cm=config.h.mk
|
||||
+cat >$c <<EOF
|
||||
+#if defined(__x86_64__)
|
||||
+#define PCI_ARCH_X86_64
|
||||
+#elif defined(__ia64__)
|
||||
+#define PCI_ARCH_IA64
|
||||
+#elif defined(__i386__)
|
||||
+#define PCI_ARCH_I386
|
||||
+#define PCI_HAVE_PM_INTEL_CONF
|
||||
+#elif defined(__ppc64__) || defined(__powerpc64__)
|
||||
+#define PCI_ARCH_PPC64
|
||||
+#elif defined(__ppc__) || defined(__powerpc__)
|
||||
+#define PCI_ARCH_PPC
|
||||
+#elif defined(__s390x__)
|
||||
+#define PCI_ARCH_S390X
|
||||
+#elif defined(__s390__)
|
||||
+#define PCI_ARCH_S390
|
||||
+#else
|
||||
+#error Unknown Arch
|
||||
+#endif
|
||||
+#define PCI_OS_LINUX
|
||||
+#define PCI_HAVE_PM_LINUX_SYSFS
|
||||
+#define PCI_HAVE_PM_LINUX_PROC
|
||||
+#define PCI_HAVE_LINUX_BYTEORDER_H
|
||||
+#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
|
||||
+#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
|
||||
+#define PCI_HAVE_64BIT_ADDRESS
|
||||
+EOF
|
||||
+
|
||||
+echo >$cm "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
+echo >>$cm "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
|
||||
echo_n "Looking for access methods..."
|
||||
|
||||
@@ -39,63 +68,22 @@
|
||||
linux*)
|
||||
case $rel in
|
||||
2.[1-9]*|[3-9]*) echo_n " sysfs proc"
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
- echo >>$c '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
- echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
- echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- esac
|
||||
- case $cpu in
|
||||
- i386) echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
+ echo >>$cm '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
+ echo >>$cm '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
+ echo >>$cm '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
ok=1
|
||||
;;
|
||||
esac
|
||||
- echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
- ;;
|
||||
- sunos)
|
||||
case $cpu in
|
||||
i386) echo_n " i386-ports"
|
||||
- echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
ok=1
|
||||
;;
|
||||
- *)
|
||||
- echo " The PCI library is does not support Solaris for this architecture: $cpu"
|
||||
- exit 1
|
||||
- ;;
|
||||
esac
|
||||
- ;;
|
||||
-
|
||||
- freebsd)
|
||||
- echo_n " fbsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- openbsd)
|
||||
- echo_n " obsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- aix)
|
||||
- echo_n " aix-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
|
||||
- ok=1
|
||||
- ;;
|
||||
- netbsd)
|
||||
- echo_n " nbsd-libpci"
|
||||
- echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
|
||||
- echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- gnu)
|
||||
- echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
- ok=1
|
||||
- ;;
|
||||
+ echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
+ ;;
|
||||
*)
|
||||
echo " Unfortunately, your OS is not supported by the PCI Library"
|
||||
exit 1
|
||||
@@ -103,10 +91,14 @@
|
||||
esac
|
||||
|
||||
echo >>$c '#define PCI_HAVE_PM_DUMP'
|
||||
+echo >>$cm '#define PCI_HAVE_PM_DUMP'
|
||||
echo " dump"
|
||||
if [ -z "$ok" ] ; then
|
||||
echo "WARNING: No real configuration access method is available."
|
||||
fi
|
||||
echo >>$c "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
|
||||
echo >>$c "#define PCILIB_VERSION \"$version\""
|
||||
-sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$c >config.mk
|
||||
+
|
||||
+echo >>$cm "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
|
||||
+echo >>$cm "#define PCILIB_VERSION \"$version\""
|
||||
+sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$cm >config.mk
|
||||
11
src/patches/pciutils-2.2.3-sata.patch
Normal file
11
src/patches/pciutils-2.2.3-sata.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- pciutils-2.2.3/lib/header.h.sata 2006-08-09 13:16:07.000000000 -0400
|
||||
+++ pciutils-2.2.3/lib/header.h 2006-08-09 13:17:45.000000000 -0400
|
||||
@@ -855,6 +855,8 @@
|
||||
#define PCI_CLASS_STORAGE_FLOPPY 0x0102
|
||||
#define PCI_CLASS_STORAGE_IPI 0x0103
|
||||
#define PCI_CLASS_STORAGE_RAID 0x0104
|
||||
+#define PCI_CLASS_STORAGE_ATA 0x0105
|
||||
+#define PCI_CLASS_STORAGE_SATA 0x0106
|
||||
#define PCI_CLASS_STORAGE_OTHER 0x0180
|
||||
|
||||
#define PCI_BASE_CLASS_NETWORK 0x02
|
||||
136
src/patches/pciutils-devicetype.patch
Normal file
136
src/patches/pciutils-devicetype.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
--- pciutils-2.2.1/lib/sysfs.c.devicetype 2005-09-21 07:51:00.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/sysfs.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -164,7 +164,6 @@
|
||||
sysfs_get_resources(d);
|
||||
d->irq = sysfs_get_value(d, "irq");
|
||||
d->known_fields = PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES;
|
||||
-#if 0
|
||||
/*
|
||||
* We prefer reading these from the config registers, it's faster.
|
||||
* However, it would be possible and maybe even useful to hack the kernel
|
||||
@@ -173,8 +172,8 @@
|
||||
*/
|
||||
d->vendor_id = sysfs_get_value(d, "vendor");
|
||||
d->device_id = sysfs_get_value(d, "device");
|
||||
- d->known_fields |= PCI_FILL_IDENT;
|
||||
-#endif
|
||||
+ d->device_class = sysfs_get_value(d, "class") >> 8;
|
||||
+ d->known_fields |= PCI_FILL_IDENT | PCI_FILL_CLASS;
|
||||
}
|
||||
pci_link_dev(a, d);
|
||||
}
|
||||
--- pciutils-2.2.1/lib/pci.h.devicetype 2005-09-10 08:10:54.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/pci.h 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -84,6 +84,7 @@
|
||||
/* These fields are set by pci_fill_info() */
|
||||
int known_fields; /* Set of info fields already known */
|
||||
u16 vendor_id, device_id; /* Identity of the device */
|
||||
+ u16 device_class; /* PCI device class */
|
||||
int irq; /* IRQ number */
|
||||
pciaddr_t base_addr[6]; /* Base addresses */
|
||||
pciaddr_t size[6]; /* Region sizes */
|
||||
@@ -118,6 +119,7 @@
|
||||
#define PCI_FILL_BASES 4
|
||||
#define PCI_FILL_ROM_BASE 8
|
||||
#define PCI_FILL_SIZES 16
|
||||
+#define PCI_FILL_CLASS 32
|
||||
#define PCI_FILL_RESCAN 0x10000
|
||||
|
||||
void pci_setup_cache(struct pci_dev *, u8 *cache, int len);
|
||||
--- pciutils-2.2.1/lib/generic.c.devicetype 2004-08-13 16:15:23.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/generic.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -46,7 +46,8 @@
|
||||
d->func = t->func;
|
||||
d->vendor_id = vd & 0xffff;
|
||||
d->device_id = vd >> 16U;
|
||||
- d->known_fields = PCI_FILL_IDENT;
|
||||
+ d->device_class = pci_read_byte(t,PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(t, PCI_CLASS_DEVICE);
|
||||
+ d->known_fields = PCI_FILL_IDENT | PCI_FILL_CLASS;
|
||||
d->hdrtype = ht;
|
||||
pci_link_dev(a, d);
|
||||
switch (ht)
|
||||
@@ -86,6 +87,8 @@
|
||||
d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
|
||||
d->device_id = pci_read_word(d, PCI_DEVICE_ID);
|
||||
}
|
||||
+ if (flags & PCI_FILL_CLASS)
|
||||
+ d->device_class = pci_read_byte(d, PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(d, PCI_CLASS_DEVICE);
|
||||
if (flags & PCI_FILL_IRQ)
|
||||
d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
|
||||
if (flags & PCI_FILL_BASES)
|
||||
--- pciutils-2.2.1/lib/example.c.devicetype 2000-03-09 03:38:33.000000000 -0500
|
||||
+++ pciutils-2.2.1/lib/example.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -21,7 +21,7 @@
|
||||
pci_scan_bus(pacc); /* We want to get the list of devices */
|
||||
for(dev=pacc->devices; dev; dev=dev->next) /* Iterate over all devices */
|
||||
{
|
||||
- pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */
|
||||
+ pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); /* Fill in header info we need */
|
||||
c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */
|
||||
printf("%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx\n",
|
||||
dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id,
|
||||
--- pciutils-2.2.1/lspci.c.devicetype 2005-11-26 06:48:29.000000000 -0500
|
||||
+++ pciutils-2.2.1/lspci.c 2005-12-13 17:04:39.000000000 -0500
|
||||
@@ -123,7 +123,7 @@
|
||||
d->config_cached += 64;
|
||||
}
|
||||
pci_setup_cache(p, d->config, d->config_cached);
|
||||
- pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
|
||||
+ pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
printf(" %s: %s",
|
||||
pci_lookup_name(pacc, classbuf, sizeof(classbuf),
|
||||
PCI_LOOKUP_CLASS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE)),
|
||||
+ p->device_class),
|
||||
pci_lookup_name(pacc, devbuf, sizeof(devbuf),
|
||||
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
|
||||
p->vendor_id, p->device_id));
|
||||
@@ -267,7 +267,7 @@
|
||||
c = get_conf_byte(d, PCI_CLASS_PROG);
|
||||
x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
|
||||
PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE), c);
|
||||
+ p->device_class, c);
|
||||
if (c || x)
|
||||
{
|
||||
printf(" (prog-if %02x", c);
|
||||
@@ -1585,7 +1585,7 @@
|
||||
struct pci_dev *p = d->dev;
|
||||
word status = get_conf_word(d, PCI_STATUS);
|
||||
word cmd = get_conf_word(d, PCI_COMMAND);
|
||||
- word class = get_conf_word(d, PCI_CLASS_DEVICE);
|
||||
+ word class = p->device_class;
|
||||
byte bist = get_conf_byte(d, PCI_BIST);
|
||||
byte htype = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
|
||||
byte latency = get_conf_byte(d, PCI_LATENCY_TIMER);
|
||||
@@ -1783,7 +1783,7 @@
|
||||
show_slot_name(d);
|
||||
putchar('\n');
|
||||
printf("Class:\t%s\n",
|
||||
- pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, get_conf_word(d, PCI_CLASS_DEVICE)));
|
||||
+ pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, p->device_class));
|
||||
printf("Vendor:\t%s\n",
|
||||
pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR, p->vendor_id, p->device_id));
|
||||
printf("Device:\t%s\n",
|
||||
@@ -1805,7 +1805,7 @@
|
||||
show_slot_name(d);
|
||||
printf(" \"%s\" \"%s\" \"%s\"",
|
||||
pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE)),
|
||||
+ p->device_class),
|
||||
pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR,
|
||||
p->vendor_id, p->device_id),
|
||||
pci_lookup_name(pacc, devbuf, sizeof(devbuf), PCI_LOOKUP_DEVICE,
|
||||
@@ -1929,7 +1929,7 @@
|
||||
last_br = &host_bridge.chain;
|
||||
for(d=first_dev; d; d=d->next)
|
||||
{
|
||||
- word class = get_conf_word(d, PCI_CLASS_DEVICE);
|
||||
+ word class = d->dev->device_class;
|
||||
byte ht = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
|
||||
if (class == PCI_CLASS_BRIDGE_PCI &&
|
||||
(ht == PCI_HEADER_TYPE_BRIDGE || ht == PCI_HEADER_TYPE_CARDBUS))
|
||||
57
src/patches/pciutils-havepread.patch
Normal file
57
src/patches/pciutils-havepread.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
--- pciutils-2.1.99-test8/lib/pread.h.pread 2004-08-13 16:15:46.000000000 -0400
|
||||
+++ pciutils-2.1.99-test8/lib/pread.h 2004-08-31 00:30:03.168157294 -0400
|
||||
@@ -12,54 +12,6 @@
|
||||
* don't define it.
|
||||
*/
|
||||
|
||||
-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
|
||||
-/* glibc 2.1 or newer -> pread/pwrite supported automatically */
|
||||
-
|
||||
-#elif defined(i386) && defined(__GLIBC__)
|
||||
-/* glibc 2.0 on i386 -> call syscalls directly */
|
||||
-#include <asm/unistd.h>
|
||||
-#include <syscall-list.h>
|
||||
-#ifndef SYS_pread
|
||||
-#define SYS_pread 180
|
||||
-#endif
|
||||
-static int pread(unsigned int fd, void *buf, size_t size, loff_t where)
|
||||
-{ return syscall(SYS_pread, fd, buf, size, where); }
|
||||
-#ifndef SYS_pwrite
|
||||
-#define SYS_pwrite 181
|
||||
-#endif
|
||||
-static int pwrite(unsigned int fd, void *buf, size_t size, loff_t where)
|
||||
-{ return syscall(SYS_pwrite, fd, buf, size, where); }
|
||||
-
|
||||
-#elif defined(i386)
|
||||
-/* old libc on i386 -> call syscalls directly the old way */
|
||||
-#include <asm/unistd.h>
|
||||
-static _syscall5(int, pread, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
|
||||
-static _syscall5(int, pwrite, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
|
||||
-static int do_read(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pread(fd, buf, size, where, 0); }
|
||||
-static int do_write(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pwrite(fd, buf, size, where, 0); }
|
||||
-#define PCI_HAVE_DO_READ
|
||||
-
|
||||
-#else
|
||||
-/* In all other cases we use lseek/read/write instead to be safe */
|
||||
-#define make_rw_glue(op) \
|
||||
- static int do_##op(struct pci_dev *d, int fd, void *buf, size_t size, int where) \
|
||||
- { \
|
||||
- struct pci_access *a = d->access; \
|
||||
- int r; \
|
||||
- if (a->fd_pos != where && lseek(fd, where, SEEK_SET) < 0) \
|
||||
- return -1; \
|
||||
- r = op(fd, buf, size); \
|
||||
- if (r < 0) \
|
||||
- a->fd_pos = -1; \
|
||||
- else \
|
||||
- a->fd_pos = where + r; \
|
||||
- return r; \
|
||||
- }
|
||||
-make_rw_glue(read)
|
||||
-make_rw_glue(write)
|
||||
-#define PCI_HAVE_DO_READ
|
||||
-#endif
|
||||
-
|
||||
#ifndef PCI_HAVE_DO_READ
|
||||
#define do_read(d,f,b,l,p) pread(f,b,l,p)
|
||||
#define do_write(d,f,b,l,p) pwrite(f,b,l,p)
|
||||
22
src/patches/pciutils-strip.patch
Normal file
22
src/patches/pciutils-strip.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- pciutils-2.1.99-test3/Makefile.strip 2004-02-25 01:46:14.315787866 -0500
|
||||
+++ pciutils-2.1.99-test3/Makefile 2004-02-25 01:47:45.478046260 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
|
||||
|
||||
$(PCILIB): $(PCIINC) force
|
||||
- $(MAKE) -C lib all
|
||||
+ CFLAGS="$(CFLAGS) -fPIC" $(MAKE) -C lib all
|
||||
|
||||
force:
|
||||
|
||||
--- pciutils-2.1.99-test8/Makefile.foo 2005-05-10 15:24:45.000000000 -0400
|
||||
+++ pciutils-2.1.99-test8/Makefile 2005-05-10 15:24:50.000000000 -0400
|
||||
@@ -65,7 +65,7 @@
|
||||
install: all
|
||||
# -c is ignored on Linux, but required on FreeBSD
|
||||
$(DIRINSTALL) -m 755 $(SBINDIR) $(IDSDIR) $(MANDIR)/man8
|
||||
- $(INSTALL) -c -m 755 -s lspci setpci $(SBINDIR)
|
||||
+ $(INSTALL) -c -m 755 lspci setpci $(SBINDIR)
|
||||
$(INSTALL) -c -m 755 update-pciids $(SBINDIR)
|
||||
$(INSTALL) -c -m 644 pci.ids $(IDSDIR)
|
||||
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(MANDIR)/man8
|
||||
Reference in New Issue
Block a user