tech-kern archive

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

how to properly enable modules for pci devices?



I want to enable the build of ubsec(4) as a module in sys/modules/Makefile
for all arches that have PCI bus and a reference to ubsec in some kernel
config file.

Reading sys/modules/Makefile I found little guidance.  I get the
impression that this hasn't been tried before.

I've come up with the following changes and ran release builds for:
  alpha evbarm i386 hppa arc evbmips evbppc sparc sparc64 amd64

Of those evbppc failed because PPC_PCI_MACHDEP_IMPL isn't defined when
the module is compiled.  How is that supposed to work?

The other release builds were all successful.

I'd like to get this into -7 in some form or other.  Comments?

--chris

Index: sys/modules/Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/Makefile,v
retrieving revision 1.136
diff -u -r1.136 Makefile
--- sys/modules/Makefile        18 May 2014 11:46:23 -0000      1.136
+++ sys/modules/Makefile        20 Jul 2014 14:43:15 -0000
@@ -105,7 +105,6 @@
 SUBDIR+=       tprof
 .if (defined(NOTYET))
 SUBDIR+=       hifn            # Builds on architectures with PCI bus
-SUBDIR+=       ubsec           # Builds on architectures with PCI bus
 SUBDIR+=       unionfs
 .endif
 .if ${MKBINUTILS} != "no"
@@ -143,6 +142,19 @@
 SUBDIR+=       vmt
 .endif
 
+.if ${MACHINE_ARCH} == "alpha" || \
+    (!empty(MACHINE_ARCH:Mearm*) || !empty(MACHINE_ARCH:Marm*)) \\
+    ${MACHINE_ARCH} == "i386" || \
+    ${MACHINE_ARCH} == "ia64" || \
+    ${MACHINE_ARCH} == "hppa" || \
+    !empty(${MACHINE_ARCH:Mmips*} \
+    ${MACHINE_ARCH} == "powerpc" || \
+    ${MACHINE_ARCH} == "sparc" || \
+    ${MACHINE_ARCH} == "sparc64" || \
+    ${MACHINE_ARCH} == "x86_64"
+SUBDIR+=       ubsec           # Builds on architectures with PCI bus
+.endif
+
 .if ${MKSLJIT} != "no"
 # No modules for arm, mips and powerpc yet.
 .if ${MACHINE_ARCH} == "i386" || \
Index: distrib/sets/lists/modules/ad.arm
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/ad.arm,v
retrieving revision 1.2
diff -u -r1.2 ad.arm
--- distrib/sets/lists/modules/ad.arm   11 Aug 2013 22:29:03 -0000      1.2
+++ distrib/sets/lists/modules/ad.arm   20 Jul 2014 14:43:15 -0000
@@ -2,3 +2,5 @@
 
 ./@MODULEDIR@/exec_elf32                       base-kernel-modules     kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod       base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/ad.mips
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/ad.mips,v
retrieving revision 1.1
diff -u -r1.1 ad.mips
--- distrib/sets/lists/modules/ad.mips  30 Apr 2013 23:41:24 -0000      1.1
+++ distrib/sets/lists/modules/ad.mips  20 Jul 2014 14:43:15 -0000
@@ -1,3 +1,5 @@
 # $NetBSD: ad.mips,v 1.1 2013/04/30 23:41:24 matt Exp $
 ./@MODULEDIR@/exec_elf32                       base-kernel-modules     kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod       base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/ad.powerpc
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/ad.powerpc,v
retrieving revision 1.1
diff -u -r1.1 ad.powerpc
--- distrib/sets/lists/modules/ad.powerpc       7 Sep 2009 02:27:29 -0000       
1.1
+++ distrib/sets/lists/modules/ad.powerpc       20 Jul 2014 14:43:15 -0000
@@ -1,3 +1,5 @@
 # $NetBSD: ad.powerpc,v 1.1 2009/09/07 02:27:29 jnemeth Exp $
 ./@MODULEDIR@/exec_elf32                       base-kernel-modules     kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod       base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.alpha
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.alpha,v
retrieving revision 1.1
diff -u -r1.1 md.alpha
--- distrib/sets/lists/modules/md.alpha 7 Sep 2009 02:27:29 -0000       1.1
+++ distrib/sets/lists/modules/md.alpha 20 Jul 2014 14:43:15 -0000
@@ -1,3 +1,5 @@
 # $NetBSD: md.alpha,v 1.1 2009/09/07 02:27:29 jnemeth Exp $
 ./@MODULEDIR@/exec_elf64                       base-kernel-modules     kmod
 ./@MODULEDIR@/exec_elf64/exec_elf64.kmod       base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.amd64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.amd64,v
retrieving revision 1.38
diff -u -r1.38 md.amd64
--- distrib/sets/lists/modules/md.amd64 17 Nov 2013 18:58:28 -0000      1.38
+++ distrib/sets/lists/modules/md.amd64 20 Jul 2014 14:43:15 -0000
@@ -119,6 +119,8 @@
 ./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod         base-kernel-modules     kmod
 ./@MODULEDIR@/tvpll                            base-kernel-modules     kmod
 ./@MODULEDIR@/tvpll/tvpll.kmod                 base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
 ./@MODULEDIR@/vmt                              base-kernel-modules     kmod
 ./@MODULEDIR@/vmt/vmt.kmod                     base-kernel-modules     kmod
 ./@MODULEDIR@/wbsio                            base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.evbppc.powerpc
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.evbppc.powerpc,v
retrieving revision 1.3
diff -u -r1.3 md.evbppc.powerpc
--- distrib/sets/lists/modules/md.evbppc.powerpc        18 May 2014 18:28:48 
-0000      1.3
+++ distrib/sets/lists/modules/md.evbppc.powerpc        20 Jul 2014 14:43:15 
-0000
@@ -216,6 +216,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tprof/tprof.kmod                       
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/uatp                           
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/uatp/uatp.kmod                 
base-kernel-modules     kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/ubsec                          
base-kernel-modules     kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/ubsec/ubsec.kmod               
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udf                            
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udf/udf.kmod                   
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/umap                           
base-kernel-modules     kmod,compatmodules
@@ -451,6 +453,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/tprof/tprof.kmod             
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/uatp                         
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/uatp/uatp.kmod               
base-kernel-modules     kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/ubsec                                
base-kernel-modules     kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/ubsec/ubsec.kmod             
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udf                          
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udf/udf.kmod                 
base-kernel-modules     kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/umap                         
base-kernel-modules     kmod,compatmodules
Index: distrib/sets/lists/modules/md.hppa
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.hppa,v
retrieving revision 1.1
diff -u -r1.1 md.hppa
--- distrib/sets/lists/modules/md.hppa  24 Feb 2014 07:23:39 -0000      1.1
+++ distrib/sets/lists/modules/md.hppa  20 Jul 2014 14:43:16 -0000
@@ -1,3 +1,5 @@
 # $NetBSD: md.hppa,v 1.1 2014/02/24 07:23:39 skrll Exp $
 ./@MODULEDIR@/exec_elf32                       base-kernel-modules     kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod       base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.i386
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.i386,v
retrieving revision 1.43
diff -u -r1.43 md.i386
--- distrib/sets/lists/modules/md.i386  17 Nov 2013 18:58:28 -0000      1.43
+++ distrib/sets/lists/modules/md.i386  20 Jul 2014 14:43:16 -0000
@@ -141,6 +141,8 @@
 ./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod         base-kernel-modules     kmod
 ./@MODULEDIR@/tvpll                            base-kernel-modules     kmod
 ./@MODULEDIR@/tvpll/tvpll.kmod                 base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
 ./@MODULEDIR@/viac7temp                                base-kernel-modules     
kmod
 ./@MODULEDIR@/viac7temp/viac7temp.kmod         base-kernel-modules     kmod
 ./@MODULEDIR@/viadrm                           base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.ia64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.ia64,v
retrieving revision 1.1
diff -u -r1.1 md.ia64
--- distrib/sets/lists/modules/md.ia64  31 May 2010 20:32:28 -0000      1.1
+++ distrib/sets/lists/modules/md.ia64  20 Jul 2014 14:43:16 -0000
@@ -1,3 +1,5 @@
 # $NetBSD: md.ia64,v 1.1 2010/05/31 20:32:28 pgoyette Exp $
 ./@MODULEDIR@/acpiverbose                      base-kernel-modules     kmod
 ./@MODULEDIR@/acpiverbose/acpiverbose.kmod     base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.sparc
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.sparc,v
retrieving revision 1.3
diff -u -r1.3 md.sparc
--- distrib/sets/lists/modules/md.sparc 17 Nov 2013 18:58:28 -0000      1.3
+++ distrib/sets/lists/modules/md.sparc 20 Jul 2014 14:43:16 -0000
@@ -5,3 +5,5 @@
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod       base-kernel-modules     kmod
 ./@MODULEDIR@/sljit                            base-kernel-modules     
kmod,sljit
 ./@MODULEDIR@/sljit/sljit.kmod                 base-kernel-modules     
kmod,sljit
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod
Index: distrib/sets/lists/modules/md.sparc64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/modules/md.sparc64,v
retrieving revision 1.2
diff -u -r1.2 md.sparc64
--- distrib/sets/lists/modules/md.sparc64       11 Aug 2011 12:03:58 -0000      
1.2
+++ distrib/sets/lists/modules/md.sparc64       20 Jul 2014 14:43:16 -0000
@@ -5,3 +5,5 @@
 ./@MODULEDIR@/exec_elf64/exec_elf64.kmod       base-kernel-modules     kmod
 ./@MODULEDIR@/pwdog                            base-kernel-modules     kmod
 ./@MODULEDIR@/pwdog/pwdog.kmod                 base-kernel-modules     kmod
+./@MODULEDIR@/ubsec                            base-kernel-modules     kmod
+./@MODULEDIR@/ubsec/ubsec.kmod                 base-kernel-modules     kmod


Home | Main Index | Thread Index | Old Index