/[gentoo-x86]/sys-infiniband/ofed/ofed-3.5.ebuild
Gentoo

Contents of /sys-infiniband/ofed/ofed-3.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Oct 13 06:48:21 2012 UTC (2 years, 1 month ago) by alexxy
Branch: MAIN
Changes since 1.1: +4 -2 lines
[sys-infiniband] Update OFED

(Portage version: 2.2.0_alpha137/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-infiniband/ofed/ofed-3.5.ebuild,v 1.1 2012/10/12 13:19:32 alexxy Exp $
4
5 EAPI="4"
6
7 OFED_VER="3.5"
8 OFED_RC="1"
9 OFED_RC_VER="2"
10 OFED_SUFFIX="OFED.3.5.rc2"
11
12 IUSE_OFED_DRIVERS="
13 ofed_drivers_cxgb3
14 ofed_drivers_cxgb4
15 ofed_drivers_ehca
16 ofed_drivers_ipath
17 ofed_drivers_mlx4
18 ofed_drivers_mthca
19 ofed_drivers_nes
20 ofed_drivers_psm"
21
22 inherit openib toolchain-funcs
23
24 DESCRIPTION="OpenIB system files"
25 SCRIPTDIR="${S}/ofed_scripts"
26 KEYWORDS="~amd64 ~x86 ~amd64-linux"
27 IUSE="compat-dapl dapl +diags ibacm mstflint +opensm perftest rds sdp srp ${IUSE_OFED_DRIVERS}"
28
29 RDEPEND="!sys-infiniband/openib
30 !sys-infiniband/openib-files
31 sys-infiniband/libibcm:${SLOT}
32 sys-infiniband/libibmad:${SLOT}
33 sys-infiniband/libibumad:${SLOT}
34 sys-infiniband/librdmacm:${SLOT}
35 compat-dapl? ( sys-infiniband/compat-dapl:${SLOT} )
36 dapl? ( sys-infiniband/dapl:${SLOT} )
37 diags? ( sys-infiniband/infiniband-diags:${SLOT} )
38 ibacm? ( sys-infiniband/ibacm:${SLOT} )
39 mstflint? ( sys-infiniband/mstflint:${SLOT} )
40 opensm? ( sys-infiniband/opensm:${SLOT} )
41 perftest? ( sys-infiniband/perftest:${SLOT} )
42 srp? ( sys-infiniband/srptools:${SLOT} )
43 ofed_drivers_cxgb3? ( sys-infiniband/libcxgb3:${SLOT} )
44 ofed_drivers_cxgb4? ( sys-infiniband/libcxgb4:${SLOT} )
45 ofed_drivers_ehca? ( sys-infiniband/libehca:${SLOT} )
46 ofed_drivers_ipath? ( sys-infiniband/libipathverbs:${SLOT} )
47 ofed_drivers_mlx4? ( sys-infiniband/libmlx4:${SLOT} )
48 ofed_drivers_mthca? ( sys-infiniband/libmthca:${SLOT} )
49 ofed_drivers_nes? ( sys-infiniband/libnes:${SLOT} )
50 ofed_drivers_psm? ( sys-infiniband/infinipath-psm:${SLOT} )
51 "
52 DEPEND="${RDEPEND}
53 virtual/pkgconfig
54 "
55
56 src_configure() { :; }
57 src_compile() { :; }
58
59 src_install() {
60 local udevdir=/lib/udev
61 has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
62 insinto "${udevdir}"/rules.d
63 newins "${SCRIPTDIR}/90-ib.rules" 40-ib.rules
64 insinto /etc/modprobe.d
65 newins "${FILESDIR}/openib.modprobe" openib.conf
66 newenvd "${FILESDIR}/openib.env" 02openib
67 insinto /etc/infiniband
68
69 doinitd "${FILESDIR}/openib"
70
71 # build openib.conf based on ofed_scripts/ofa_kernel.spec
72 build_ipoib=1
73 build_sdp=1
74 cp "${SCRIPTDIR}/openib.conf" "${T}"
75 IB_CONF_DIR=${T}
76 echo >> ${IB_CONF_DIR}/openib.conf
77 echo "# Load UCM module" >> ${IB_CONF_DIR}/openib.conf
78 echo "UCM_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
79 echo >> ${IB_CONF_DIR}/openib.conf
80 echo "# Load RDMA_CM module" >> ${IB_CONF_DIR}/openib.conf
81 echo "RDMA_CM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
82 echo >> ${IB_CONF_DIR}/openib.conf
83 echo "# Load RDMA_UCM module" >> ${IB_CONF_DIR}/openib.conf
84 echo "RDMA_UCM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
85 echo >> ${IB_CONF_DIR}/openib.conf
86 echo "# Increase ib_mad thread priority" >> ${IB_CONF_DIR}/openib.conf
87 echo "RENICE_IB_MAD=no" >> ${IB_CONF_DIR}/openib.conf
88
89 echo >> ${IB_CONF_DIR}/openib.conf
90 echo "# Load MTHCA" >> ${IB_CONF_DIR}/openib.conf
91 echo "MTHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
92 if use ofed_drivers_ipath; then
93 echo >> ${IB_CONF_DIR}/openib.conf
94 echo "# Load IPATH" >> ${IB_CONF_DIR}/openib.conf
95 echo "IPATH_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
96 fi
97 if use ofed_drivers_ehca; then
98 echo >> ${IB_CONF_DIR}/openib.conf
99 echo "# Load eHCA" >> ${IB_CONF_DIR}/openib.conf
100 echo "EHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
101 fi
102 if use ofed_drivers_mlx4; then
103 echo >> ${IB_CONF_DIR}/openib.conf
104 echo "# Load MLX4 modules" >> ${IB_CONF_DIR}/openib.conf
105 echo "MLX4_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
106 fi
107 if (( build_ipoib )); then
108 echo >> ${IB_CONF_DIR}/openib.conf
109 echo "# Load IPoIB" >> ${IB_CONF_DIR}/openib.conf
110 echo "#IPOIB_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
111 echo >> ${IB_CONF_DIR}/openib.conf
112 echo "# Enable IPoIB Connected Mode" >> ${IB_CONF_DIR}/openib.conf
113 echo "#SET_IPOIB_CM=yes" >> ${IB_CONF_DIR}/openib.conf
114 # from ofa_user.spec:
115 echo >> ${IB_CONF_DIR}/openib.conf
116 echo "# Enable IPoIB High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
117 echo "#IPOIBHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
118 echo "# PRIMARY_IPOIB_DEV=ib0" >> ${IB_CONF_DIR}/openib.conf
119 echo "# SECONDARY_IPOIB_DEV=ib1" >> ${IB_CONF_DIR}/openib.conf
120 fi
121 if (( build_sdp )); then
122 echo >> ${IB_CONF_DIR}/openib.conf
123 echo "# Load SDP module" >> ${IB_CONF_DIR}/openib.conf
124 echo "#SDP_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
125 fi
126 if use srp; then
127 echo >> ${IB_CONF_DIR}/openib.conf
128 echo "# Load SRP module" >> ${IB_CONF_DIR}/openib.conf
129 echo "#SRP_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
130 # from ofa_user.spec:
131 echo >> ${IB_CONF_DIR}/openib.conf
132 echo "# Enable SRP High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
133 echo "#SRPHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
134
135 fi
136 if use iser; then
137 echo >> ${IB_CONF_DIR}/openib.conf
138 echo "# Load ISER module" >> ${IB_CONF_DIR}/openib.conf
139 echo "#ISER_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
140 fi
141 if use rds; then
142 echo >> ${IB_CONF_DIR}/openib.conf
143 echo "# Load RDS module" >> ${IB_CONF_DIR}/openib.conf
144 echo "#RDS_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
145 fi
146 if use vnic; then
147 echo >> ${IB_CONF_DIR}/openib.conf
148 echo "# Load VNIC module" >> ${IB_CONF_DIR}/openib.conf
149 echo "#VNIC_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
150 fi
151
152 doins "${T}/openib.conf"
153 }
154
155 pkg_postinst() {
156 einfo "Configuration file installed in /etc/infiniband/openib.conf"
157 einfo "To automatically initialize infiniband on boot, add openib to your"
158 einfo "start-up scripts, like so:"
159 einfo "\`rc-update add openib default\`"
160
161 }

  ViewVC Help
Powered by ViewVC 1.1.20