tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pciverbose module build error



I'm still working on getting the pciverbose module to work in the wider case. It turns out that about half of NetBSD's ${ARCH}/${MACHINE} combinations have a problem; the failure to build the module stems from the fact the these machines have no inherent pci support.

Unfortunately, the working vs non-working combinations don't really fall into easily-identifiable groupings. Therefore the changess needed to build only-when-appropriate are rather messy. The attached patch shows what's needed just to get the sys/modules/Makefile updated; there also needs to be corresponding changes to many of the ad.* and md.* set lists in src/distrib/sets/lists/modules/

I think this approach is "sub-optimal" and it's rather ugly; I expect it will also lead to errors in future maintenance. But I don't have a good alternative.




On Tue, 25 May 2010, Paul Goyette wrote:

On Wed, 26 May 2010, FUKAUMI Naoki wrote:

On 05/26/10 04:25, Paul Goyette wrote:
A brief check shows that neither hpcarm nor hpcsh architectures have pci
support. At the very least, I find no mention of pci in any config
files. So, I'm thinking that the right thing to do here is to treat the
module as md rather than mi.

Comments?

I think you are right.

I think pcictl is also MD. libpci should be MD too, but it is used by
Xorg libpciaccess which is always used by Xorg server/drivers.

I'm working on determining exactly which ${MACHINE_ARCH} and ${MACHINE} should be valid for pciverbose.kmod module.

libpci is OK, because it uses its own userland header file.

I should have most of this finished up in the next day - it is late tonight and I need some sleep! :)


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------
Index: Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/Makefile,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile
--- Makefile    24 May 2010 20:29:41 -0000      1.42
+++ Makefile    26 May 2010 22:31:50 -0000
@@ -36,7 +36,6 @@ SUBDIR+=      nilfs
 SUBDIR+=       ntfs
 SUBDIR+=       null
 SUBDIR+=       overlay
-SUBDIR+=       pciverbose
 SUBDIR+=       pf
 SUBDIR+=       ppp_bsdcomp
 SUBDIR+=       ppp_deflate
@@ -104,6 +103,65 @@ SUBDIR+=   viadrm
 SUBDIR+=       pad
 .endif
 
+# Module pciverbose works on a rather strange subset of architectures
+# and platforms.
+
+# First, those architectures for which it works on all machines
+
+SUBDIR+=       pciverbose
+.if ${MACHINE_ARCH} == "alpha"         || \
+    ${MACHINE_ARCH} == "armeb"         || \
+    ${MACHINE_ARCH} == "hppa"          || \
+    ${MACHINE_ARCH} == "i386"          || \
+    ${MACHINE_ARCH} == "sparc"         || \
+    ${MACHINE_ARCH} == "sparc64"       || \
+    ${MACHINE_ARCH} == "x86_64"
+SUBDIR+=       pciverbose
+.endif
+
+# Then the ones on which it works on most machines, but not all
+.if ${MACHINE_ARCH} == "powerpc64"     && \
+    ${MACHINE} != "evbppc64"
+SUBDIR+=       pciverbose
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc"       && \
+    ${MACHINE} != "amigappc"           && \
+    ${MACHINE} != "evbppc"             && \
+    ${MACHINE} != "rs6000"
+SUBDIR+=       pciverbose
+.endif
+
+.if ${MACHINE_ARCH} == "arm"           && \
+    ${MACHINE} != "acorn26"            && \
+    ${MACHINE} != "hpcarm"             && \
+    ${MACHINE} != "zaurus"
+SUBDIR+=       pciverbose
+.endif
+
+.if ${MACHINE_ARCH} == "mipsel"                && \
+    ${MACHINE} != "pmax"               && \
+    ${MACHINE} != "sbmips"
+SUBDIR+=       pciverbose
+.endif
+
+# Finally, all the remaining ones
+
+.if ${MACHINE} == "algor"              || \
+    ${MACHINE} == "algor64"            || \
+    ${MACHINE} == "arc"                        || \
+    ${MACHINE} == "atari"              || \
+    ${MACHINE} == "cobalt"             || \
+    ${MACHINE} == "cobalt64"           || \
+    ${MACHINE} == "dreamcast"          || \
+    ${MACHINE} == "evbmips"            || \
+    ${MACHINE} == "hpcmips"            || \
+    ${MACHINE} == "landisk"            || \
+    ${MACHINE} == "sgimips"            || \
+    ${MACHINE} == "sgimips64"
+SUBDIR+=       pciverbose
+.endif
+
 .include <bsd.own.mk>
 
 # we need our device mapper for LVM


Home | Main Index | Thread Index | Old Index