pciutils: Upgarde 2.2.4 -> 3.0.3

This commit is contained in:
Richard Purdie 2008-12-31 17:20:38 +00:00
parent 78456faa5e
commit f8daac5777
5 changed files with 129 additions and 105 deletions

View File

@ -1,21 +0,0 @@
Index: pciutils-2.2.4/lib/configure
===================================================================
--- pciutils-2.2.4.orig/lib/configure 2007-05-16 23:37:38.000000000 +0200
+++ pciutils-2.2.4/lib/configure 2007-05-17 16:35:24.000000000 +0200
@@ -39,6 +39,16 @@
sys=linux
fi
+if [ "$host" = "linux--uclibc" ]
+then
+ sys=linux
+fi
+
+if [ "$host" = "linux--uclibcgnueabi" ]
+then
+ sys=linux
+fi
+
c=config.h
m=config.mk
echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"

View File

@ -1,40 +0,0 @@
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
Index: pciutils-2.2.4/lib/configure
===================================================================
--- pciutils-2.2.4.orig/lib/configure 2006-09-09 13:06:10.000000000 +0200
+++ pciutils-2.2.4/lib/configure 2006-10-31 11:52:13.000000000 +0100
@@ -12,15 +12,15 @@
echo_n "Configuring libpci for your system..."
idsdir=${1:-/usr/share}
version=${2:-0.0}
-sys=`uname -s`
-rel=`uname -r`
+sys=${3:-`uname -s`}
+rel=${4:-`uname -r`}
if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
then
rel=`/usr/bin/oslevel`
proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
else
- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`
+ cpu=${5:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`}
fi
if [ "$sys" = "GNU/kFreeBSD" ]
then
@@ -34,6 +34,11 @@
echo " $host $rel"
zlib=$5
+if [ "$host" = "linux--gnueabi" ]
+then
+ sys=linux
+fi
+
c=config.h
m=config.mk
echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"

View File

@ -0,0 +1,100 @@
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
Index: pciutils-3.0.3/lib/configure
===================================================================
--- pciutils-3.0.3.orig/lib/configure 2008-12-31 00:47:07.000000000 +0000
+++ pciutils-3.0.3/lib/configure 2008-12-31 01:08:01.000000000 +0000
@@ -11,6 +11,10 @@
fi
}
+VERSION=$1
+IDSDIR=$2
+DNS=yes
+
if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
echo >&2 "Please run the configure script from the top-level Makefile"
exit 1
@@ -18,15 +22,15 @@
echo_n "Configuring libpci for your system..."
if [ -z "$HOST" ] ; then
- sys=`uname -s`
- rel=`uname -r`
+ sys=${3:-`uname -s`}
+ rel=${4:-`uname -r`}
if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
then
rel=`/usr/bin/oslevel`
proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
else
- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`
+ cpu=${5:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`}
fi
if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
then
@@ -36,7 +40,7 @@
then
sys=cygwin
fi
- HOST=${3:-$cpu-$sys}
+ HOST=$cpu-$sys
fi
[ -n "$RELEASE" ] && rel="${RELEASE}"
# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
@@ -45,6 +49,21 @@
sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo " $host $rel $cpu $sys"
+if [ "$host" = "linux--gnueabi" ]
+then
+ sys=linux
+fi
+
+if [ "$host" = "linux--uclibc" ]
+then
+ sys=linux
+fi
+
+if [ "$host" = "linux--uclibcgnueabi" ]
+then
+ sys=linux
+fi
+
c=config.h
m=config.mk
echo >$c '#define PCI_CONFIG_H'
Index: pciutils-3.0.3/Makefile
===================================================================
--- pciutils-3.0.3.orig/Makefile 2008-12-31 01:07:52.000000000 +0000
+++ pciutils-3.0.3/Makefile 2008-12-31 01:10:50.000000000 +0000
@@ -37,7 +37,6 @@
# Commands
INSTALL=install
DIRINSTALL=install -d
-STRIP=-s
CC=$(CROSS_COMPILE)gcc
AR=$(CROSS_COMPILE)ar
RANLIB=$(CROSS_COMPILE)ranlib
@@ -78,7 +77,7 @@
example.o: example.c $(PCIINC)
%: %.o
- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) -o $@
%.8 %.7: %.man
M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
@@ -93,7 +92,7 @@
install: all
# -c is ignored on Linux, but required on FreeBSD
$(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
- $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
$(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
$(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8

View File

@ -1,69 +1,57 @@
Index: pciutils-2.2.4/Makefile
Index: pciutils-3.0.3/Makefile
===================================================================
--- pciutils-2.2.4.orig/Makefile 2006-09-09 14:57:03.000000000 +0200
+++ pciutils-2.2.4/Makefile 2006-10-31 10:59:48.000000000 +0100
@@ -24,7 +24,7 @@
--- pciutils-3.0.3.orig/Makefile 2008-11-09 20:28:18.000000000 +0000
+++ pciutils-3.0.3/Makefile 2008-12-31 00:46:45.000000000 +0000
@@ -52,7 +52,7 @@
export
-all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 $(PCI_IDS)
+all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 $(PCI_IDS) pcimodules pcimodules.8
-all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
+all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS) pcimodules pcimodules.8
$(PCILIB): $(PCIINC) force
lib/$(PCILIB): $(PCIINC) force
$(MAKE) -C lib all
@@ -34,9 +34,11 @@
@@ -62,9 +62,11 @@
lib/config.h lib/config.mk:
cd lib && ./configure "$(IDSDIR)" "$(VERSION)" "$(HOST)" "$(RELEASE)" "$(ZLIB)"
cd lib && ./configure
+pcimodules: pcimodules.o common.o $(PCILIB)
lspci: lspci.o common.o $(PCILIB)
setpci: setpci.o common.o $(PCILIB)
+pcimodules: pcimodules.o common.o lib/$(PCILIB)
lspci: lspci.o common.o lib/$(PCILIB)
setpci: setpci.o common.o lib/$(PCILIB)
+pcimodules.o: pcimodules.c pciutils.h
lspci.o: lspci.c pciutils.h $(PCIINC)
setpci.o: setpci.c pciutils.h $(PCIINC)
common.o: common.c pciutils.h $(PCIINC)
@@ -58,15 +60,15 @@
@@ -93,10 +95,10 @@
install: all
# -c is ignored on Linux, but required on FreeBSD
$(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8
- $(INSTALL) -c -m 755 -s lspci setpci $(DESTDIR)$(SBINDIR)
$(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
- $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -c -m 755 lspci setpci pcimodules $(DESTDIR)$(SBINDIR)
$(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
$(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
- $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
+ $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 pcimodules.8 $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -c -m 644 pcilib.7 $(DESTDIR)$(MANDIR)/man7
ifeq ($(SHARED),yes)
$(DIRINSTALL) -m 755 $(DESTDIR)$(LIBDIR)
@@ -114,9 +116,9 @@
endif
uninstall: all
- rm -f $(DESTDIR)$(SBINDIR)/lspci $(DESTDIR)$(SBINDIR)/setpci $(DESTDIR)$(SBINDIR)/update-pciids
+ rm -f $(DESTDIR)$(SBINDIR)/lspci $(DESTDIR)$(SBINDIR)/setpci $(DESTDIR)$(SBINDIR)/update-pciids $(SBINDIR)/pcimodules
+ rm -f $(DESTDIR)$(SBINDIR)/lspci $(DESTDIR)$(SBINDIR)/setpci $(DESTDIR)$(SBINDIR)/pcimodules $(DESTDIR)$(SBINDIR)/update-pciids
rm -f $(DESTDIR)$(IDSDIR)/$(PCI_IDS)
- rm -f $(DESTDIR)$(MANDIR)/man8/lspci.8 $(DESTDIR)$(MANDIR)/man8/setpci.8 $(DESTDIR)$(MANDIR)/man8/update-pciids.8
+ rm -f $(DESTDIR)$(MANDIR)/man8/lspci.8 $(DESTDIR)$(MANDIR)/man8/setpci.8 $(DESTDIR)$(MANDIR)/man8/update-pciids.8 $(MANDIR)/man8/pcimodules.8
pci.ids.gz: pci.ids
gzip -9 <$< >$@
Index: pciutils-2.2.4/lspci.c
===================================================================
--- pciutils-2.2.4.orig/lspci.c 2006-09-09 14:32:29.000000000 +0200
+++ pciutils-2.2.4/lspci.c 2006-10-31 10:56:57.000000000 +0100
@@ -120,8 +120,10 @@
d->config = xmalloc(64);
d->present = xmalloc(64);
memset(d->present, 1, 64);
- if (!pci_read_block(p, 0, d->config, 64))
- die("Unable to read the standard configuration space header");
+ if (!pci_read_block(p, 0, d->config, 64)) {
+ fprintf(stderr, "Unable to read the standard configuration space header");
+ return NULL;
+ }
if ((d->config[PCI_HEADER_TYPE] & 0x7f) == PCI_HEADER_TYPE_CARDBUS)
{
/* For cardbus bridges, we need to fetch 64 bytes more to get the
Index: pciutils-2.2.4/pcimodules.c
+ rm -f $(DESTDIR)$(MANDIR)/man8/lspci.8 $(DESTDIR)$(MANDIR)/man8/setpci.8 $(DESTDIR)$(MANDIR)/man8/pcimodules.8 $(DESTDIR)$(MANDIR)/man8/update-pciids.8
rm -f $(DESTDIR)$(MANDIR)/man7/pcilib.7
ifeq ($(SHARED),yes)
rm -f $(DESTDIR)$(LIBDIR)/$(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so$(ABI_VERSION)
Index: pciutils-3.0.3/pcimodules.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pciutils-2.2.4/pcimodules.c 2006-10-31 10:51:09.000000000 +0100
+++ pciutils-3.0.3/pcimodules.c 2008-12-31 00:41:47.000000000 +0000
@@ -0,0 +1,185 @@
+/*
+ * pcimodules: Load all kernel modules for PCI device currently
@ -250,10 +238,10 @@ Index: pciutils-2.2.4/pcimodules.c
+ match_pci_modules();
+ return 0;
+}
Index: pciutils-2.2.4/pcimodules.man
Index: pciutils-3.0.3/pcimodules.man
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pciutils-2.2.4/pcimodules.man 2006-10-31 10:51:09.000000000 +0100
+++ pciutils-3.0.3/pcimodules.man 2008-12-31 00:41:47.000000000 +0000
@@ -0,0 +1,92 @@
+.TH pcimodules 8 "@TODAY@" "@VERSION@" "Linux PCI Utilities"
+.IX pcimodules

View File

@ -8,13 +8,10 @@ DEPENDS = "zlib"
SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \
file://configure.patch;patch=1 \
file://configure-uclibc.patch;patch=1 \
file://pcimodules-pciutils.diff;patch=1"
PARALLEL_MAKE = ""
PR = "r2"
do_configure () {
(cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH})
}