diff options
Diffstat (limited to 'meta/recipes-bsp/pciutils/pciutils')
-rw-r--r-- | meta/recipes-bsp/pciutils/pciutils/configure.patch | 104 | ||||
-rw-r--r-- | meta/recipes-bsp/pciutils/pciutils/guess-fix.patch | 37 | ||||
-rw-r--r-- | meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch | 92 | ||||
-rw-r--r-- | meta/recipes-bsp/pciutils/pciutils/makefile.patch | 26 |
4 files changed, 259 insertions, 0 deletions
diff --git a/meta/recipes-bsp/pciutils/pciutils/configure.patch b/meta/recipes-bsp/pciutils/pciutils/configure.patch new file mode 100644 index 0000000000..66c9f91630 --- /dev/null +++ b/meta/recipes-bsp/pciutils/pciutils/configure.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | # | ||
4 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
5 | # | ||
6 | --- | ||
7 | |||
8 | 7/30/2010 - rebased to 3.1.5 by Qing He <qing.he@intel.com> | ||
9 | 1/22/2012 - rebased to 3.1.9 by Shane Wang <shane.wang@intel.com> | ||
10 | |||
11 | diff -r af2b10cc3c14 Makefile | ||
12 | --- a/Makefile Sun Jan 22 18:36:34 2012 +0800 | ||
13 | +++ b/Makefile Sun Jan 22 18:38:54 2012 +0800 | ||
14 | @@ -37,7 +37,6 @@ | ||
15 | # Commands | ||
16 | INSTALL=install | ||
17 | DIRINSTALL=install -d | ||
18 | -STRIP=-s | ||
19 | CC=$(CROSS_COMPILE)gcc | ||
20 | AR=$(CROSS_COMPILE)ar | ||
21 | RANLIB=$(CROSS_COMPILE)ranlib | ||
22 | @@ -86,7 +85,7 @@ | ||
23 | example.o: example.c $(PCIINC) | ||
24 | |||
25 | %: %.o | ||
26 | - $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ | ||
27 | + $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) -o $@ | ||
28 | |||
29 | %.8 %.7: %.man | ||
30 | 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)#" | ||
31 | @@ -101,7 +100,7 @@ | ||
32 | install: all | ||
33 | # -c is ignored on Linux, but required on FreeBSD | ||
34 | $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 | ||
35 | - $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR) | ||
36 | + $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR) | ||
37 | $(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR) | ||
38 | $(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR) | ||
39 | $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8 | ||
40 | diff -r af2b10cc3c14 lib/configure | ||
41 | --- a/lib/configure Sun Jan 22 18:36:34 2012 +0800 | ||
42 | +++ b/lib/configure Sun Jan 22 18:38:54 2012 +0800 | ||
43 | @@ -14,6 +14,10 @@ | ||
44 | fi | ||
45 | } | ||
46 | |||
47 | +VERSION=$1 | ||
48 | +IDSDIR=$2 | ||
49 | +DNS=yes | ||
50 | + | ||
51 | if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then | ||
52 | echo >&2 "Please run the configure script from the top-level Makefile" | ||
53 | exit 1 | ||
54 | @@ -21,8 +25,8 @@ | ||
55 | |||
56 | echo_n "Configuring libpci for your system..." | ||
57 | if [ -z "$HOST" ] ; then | ||
58 | - sys=`uname -s` | ||
59 | - rel=`uname -r` | ||
60 | + sys=${3:-`uname -s`} | ||
61 | + rel= | ||
62 | realsys="$sys" | ||
63 | if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ] | ||
64 | then | ||
65 | @@ -30,7 +34,7 @@ | ||
66 | proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1` | ||
67 | cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'` | ||
68 | else | ||
69 | - cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` | ||
70 | + cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`} | ||
71 | fi | ||
72 | if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] | ||
73 | then | ||
74 | @@ -40,7 +44,7 @@ | ||
75 | then | ||
76 | sys=cygwin | ||
77 | fi | ||
78 | - HOST=${3:-$cpu-$sys} | ||
79 | + HOST=$cpu-$sys | ||
80 | fi | ||
81 | [ -n "$RELEASE" ] && rel="${RELEASE}" | ||
82 | # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. | ||
83 | @@ -49,6 +53,21 @@ | ||
84 | sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
85 | echo " $host $rel $cpu $sys" | ||
86 | |||
87 | +if [ "$host" = "linux--gnueabi" ] | ||
88 | +then | ||
89 | + sys=linux | ||
90 | +fi | ||
91 | + | ||
92 | +if [ "$host" = "linux--uclibc" ] | ||
93 | +then | ||
94 | + sys=linux | ||
95 | +fi | ||
96 | + | ||
97 | +if [ "$host" = "linux--uclibceabi" ] | ||
98 | +then | ||
99 | + sys=linux | ||
100 | +fi | ||
101 | + | ||
102 | c=config.h | ||
103 | m=config.mk | ||
104 | echo >$c '#define PCI_CONFIG_H' | ||
diff --git a/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch b/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch new file mode 100644 index 0000000000..540b4a0d13 --- /dev/null +++ b/meta/recipes-bsp/pciutils/pciutils/guess-fix.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | the original guess algorithm is broken for many archs | ||
2 | for example, the following two would break: | ||
3 | arm-linux-gnueabi --> sys=gnueabi | ||
4 | x86_64-unknown-pc-linux-gnu --> sys = pc-linux-gnu | ||
5 | |||
6 | use a simpler scheme here and hope it works for all the cases | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | 7/30/2010 - created by Qing He <qing.he@intel.com> | ||
11 | |||
12 | diff --git a/lib/configure b/lib/configure | ||
13 | index 4318b05..84f6acb 100755 | ||
14 | --- a/lib/configure | ||
15 | +++ b/lib/configure | ||
16 | @@ -53,20 +53,7 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | ||
17 | sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
18 | echo " $host $rel $cpu $sys" | ||
19 | |||
20 | -if [ "$host" = "linux--gnueabi" ] | ||
21 | -then | ||
22 | - sys=linux | ||
23 | -fi | ||
24 | - | ||
25 | -if [ "$host" = "linux--uclibc" ] | ||
26 | -then | ||
27 | - sys=linux | ||
28 | -fi | ||
29 | - | ||
30 | -if [ "$host" = "linux--uclibceabi" ] | ||
31 | -then | ||
32 | - sys=linux | ||
33 | -fi | ||
34 | +{ echo "$host" | grep linux; } && sys=linux | ||
35 | |||
36 | c=config.h | ||
37 | m=config.mk | ||
diff --git a/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch b/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch new file mode 100644 index 0000000000..413ef0e1e5 --- /dev/null +++ b/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | Link directly to lib/libpci.so.3.1.5 will hard code this versioned | ||
2 | string into lspci and other utilities, which is not desirable and | ||
3 | won't work. In the other hand, linking to a symbolic link lib/libpci.so | ||
4 | doesn't have this issue. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | 7/30/2010 - created by Qing He <qing.he@intel.com> | ||
9 | |||
10 | diff --git a/Makefile b/Makefile | ||
11 | index 74c570a..31337e0 100644 | ||
12 | --- a/Makefile | ||
13 | +++ b/Makefile | ||
14 | @@ -56,9 +56,9 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h | ||
15 | |||
16 | export | ||
17 | |||
18 | -all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS) | ||
19 | +all: lib/$(PCILIB_DEV) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS) | ||
20 | |||
21 | -lib/$(PCILIB): $(PCIINC) force | ||
22 | +lib/$(PCILIB) lib/$(PCILIB_DEV): $(PCIINC) force | ||
23 | $(MAKE) -C lib all | ||
24 | |||
25 | force: | ||
26 | @@ -66,8 +66,8 @@ force: | ||
27 | lib/config.h lib/config.mk: | ||
28 | cd lib && ./configure | ||
29 | |||
30 | -lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB) | ||
31 | -setpci: setpci.o common.o lib/$(PCILIB) | ||
32 | +lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB_DEV) | ||
33 | +setpci: setpci.o common.o lib/$(PCILIB_DEV) | ||
34 | |||
35 | LSPCIINC=lspci.h pciutils.h $(PCIINC) | ||
36 | lspci.o: lspci.c $(LSPCIINC) | ||
37 | @@ -89,7 +89,7 @@ update-pciids: update-pciids.sh | ||
38 | chmod +x $@ | ||
39 | |||
40 | # The example of use of libpci | ||
41 | -example: example.o lib/$(PCILIB) | ||
42 | +example: example.o lib/$(PCILIB_DEV) | ||
43 | example.o: example.c $(PCIINC) | ||
44 | |||
45 | %: %.o | ||
46 | diff --git a/lib/Makefile b/lib/Makefile | ||
47 | index 1eb06a5..a8dab56 100644 | ||
48 | --- a/lib/Makefile | ||
49 | +++ b/lib/Makefile | ||
50 | @@ -42,7 +42,7 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI | ||
51 | OBJS += nbsd-libpci | ||
52 | endif | ||
53 | |||
54 | -all: $(PCILIB) $(PCILIBPC) | ||
55 | +all: $(PCILIB_DEV) $(PCILIBPC) | ||
56 | |||
57 | ifeq ($(SHARED),no) | ||
58 | $(PCILIB): $(addsuffix .o,$(OBJS)) | ||
59 | @@ -53,6 +53,9 @@ else | ||
60 | CFLAGS += -fPIC -fvisibility=hidden | ||
61 | $(PCILIB): $(addsuffix .o,$(OBJS)) | ||
62 | $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS) | ||
63 | + | ||
64 | +$(PCILIB_DEV): $(PCILIB) | ||
65 | + ln -s $< $@ | ||
66 | endif | ||
67 | |||
68 | $(PCILIBPC): libpci.pc.in | ||
69 | diff --git a/lib/configure b/lib/configure | ||
70 | index 27388bc..6c508cf 100755 | ||
71 | --- a/lib/configure | ||
72 | +++ b/lib/configure | ||
73 | @@ -216,16 +216,18 @@ fi | ||
74 | echo "Checking whether to build a shared library... $SHARED (set manually)" | ||
75 | if [ "$SHARED" = no ] ; then | ||
76 | echo >>$m 'PCILIB=$(LIBNAME).a' | ||
77 | + echo >>$m 'PCILIB_DEV=$(LIBNAME).a' | ||
78 | echo >>$m 'LDLIBS=$(WITH_LIBS)' | ||
79 | echo >>$m 'LIB_LDLIBS=' | ||
80 | else | ||
81 | echo >>$m 'PCILIB=$(LIBNAME).so.$(VERSION)' | ||
82 | + echo >>$m 'PCILIB_DEV=$(LIBNAME).so' | ||
83 | # We link the dependencies _to_ the library, so we do not need explicit deps in .pc | ||
84 | echo >>$m 'LDLIBS=' | ||
85 | echo >>$m 'LIB_LDLIBS=$(WITH_LIBS)' | ||
86 | echo >>$c '#define PCI_SHARED_LIB' | ||
87 | if [ "$SHARED" = yes ] ; then | ||
88 | - echo >>$m 'SONAME=-Wl,-soname,$(LIBNAME).so$(ABI_VERSION)' | ||
89 | + echo >>$m 'SONAME=-Wl,-soname -Wl,$(LIBNAME).so$(ABI_VERSION)' | ||
90 | fi | ||
91 | fi | ||
92 | echo >>$m 'PCILIBPC=$(LIBNAME).pc' | ||
diff --git a/meta/recipes-bsp/pciutils/pciutils/makefile.patch b/meta/recipes-bsp/pciutils/pciutils/makefile.patch new file mode 100644 index 0000000000..c3fbc6f9b1 --- /dev/null +++ b/meta/recipes-bsp/pciutils/pciutils/makefile.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Signed-off-by: Ionut Radu <ionutx.radu@intel.com> | ||
4 | |||
5 | Index: pciutils-3.2.0/Makefile | ||
6 | =================================================================== | ||
7 | --- pciutils-3.2.0.orig/Makefile | ||
8 | +++ pciutils-3.2.0/Makefile | ||
9 | @@ -35,7 +35,7 @@ SHAREDIR=$(PREFIX)/share | ||
10 | IDSDIR=$(SHAREDIR) | ||
11 | MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi) | ||
12 | INCDIR=$(PREFIX)/include | ||
13 | -LIBDIR=$(PREFIX)/lib | ||
14 | +LIBDIR=$(libdir) | ||
15 | PKGCFDIR=$(LIBDIR)/pkgconfig | ||
16 | |||
17 | # Commands | ||
18 | @@ -94,7 +94,7 @@ example: example.o lib/$(PCILIB_DEV) | ||
19 | example.o: example.c $(PCIINC) | ||
20 | |||
21 | %: %.o | ||
22 | - $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) -o $@ | ||
23 | + $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@ | ||
24 | |||
25 | %.8 %.7: %.man | ||
26 | 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)#" | ||