1 |
vapier 08/01/11 07:16:13 |
2 |
|
3 |
Added: cpint-2.5.3-build.patch |
4 |
cpint-2.5.3-prototypes.patch |
5 |
cpint-2.5.3-kernel.patch |
6 |
Log: |
7 |
Clean/fix up build. |
8 |
(Portage version: 2.1.4_rc14) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-apps/cpint/files/cpint-2.5.3-build.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-build.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-build.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: cpint-2.5.3-build.patch |
17 |
=================================================================== |
18 |
--- cpint-2.5.3/Makefile |
19 |
+++ cpint-2.5.3/Makefile |
20 |
@@ -5,59 +5,29 @@ |
21 |
prefix = |
22 |
bindir = /usr/sbin |
23 |
etcdir = /etc |
24 |
+krndir = /lib/modules/`uname -r`/misc |
25 |
|
26 |
-COMMAND = hcp mongen monstat actgen diag0 |
27 |
- |
28 |
-tools: $(COMMAND) |
29 |
+CFLAGS += -Wall |
30 |
+CPPFLAGS += -I$(KERNEL_DIR)/include |
31 |
|
32 |
-hcp : hcp.o |
33 |
- $(CC) -o $@ $^ |
34 |
+COMMAND = hcp mongen monstat actgen diag0 |
35 |
|
36 |
-hcptest : hcptest.o |
37 |
- $(CC) -o $@ $^ |
38 |
+all: $(COMMAND) cpint_mod.ko |
39 |
|
40 |
-mongen : mongen.o |
41 |
- $(CC) -o $@ $^ |
42 |
+cpint_mod.ko: |
43 |
+ $(MAKE) -C $(KERNEL_DIR) modules SUBDIRS=$(PWD) |
44 |
|
45 |
-actgen : actgen.o |
46 |
- $(CC) -o $@ $^ |
47 |
+tools: $(COMMAND) |
48 |
|
49 |
monstat : monstat.o sysinfo.o |
50 |
- $(CC) -o $@ $^ |
51 |
- |
52 |
-diag0 : diag0.o |
53 |
- $(CC) -o $@ $^ |
54 |
- |
55 |
-hcp.o : hcp.c |
56 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcp.c |
57 |
- |
58 |
-hcptest.o : hcptest.c |
59 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcptest.c |
60 |
- |
61 |
-mongen.o : mongen.c |
62 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c mongen.c |
63 |
- |
64 |
-monstat.o : monstat.c |
65 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c monstat.c |
66 |
- |
67 |
-sysinfo.o : sysinfo.c |
68 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c sysinfo.c |
69 |
- |
70 |
-actgen.o : actgen.c |
71 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c actgen.c |
72 |
- |
73 |
-diag0.o : diag0.c |
74 |
- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c diag0.c |
75 |
|
76 |
install: $(TARGET) |
77 |
+ install -d -m 755 ${prefix}${bindir} |
78 |
install -c -m 750 mongen ${prefix}${bindir} |
79 |
install -c -m 750 monstat ${prefix}${bindir} |
80 |
install -c -m 750 hcp ${prefix}${bindir} |
81 |
- cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/ |
82 |
- rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \ |
83 |
- /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222 |
84 |
- modprobe -qr cpint_mod |
85 |
- depmod -a |
86 |
+ install -d -m 755 ${prefix}${krndir} |
87 |
+ install -c -m 644 cpint_mod.ko ${prefix}${krndir} |
88 |
|
89 |
clean: |
90 |
rm -rf *.o *~ core mongen monstat actgen hcp diag0 *.ko *.cmd \ |
91 |
|
92 |
|
93 |
|
94 |
1.1 sys-apps/cpint/files/cpint-2.5.3-prototypes.patch |
95 |
|
96 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-prototypes.patch?rev=1.1&view=markup |
97 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-prototypes.patch?rev=1.1&content-type=text/plain |
98 |
|
99 |
Index: cpint-2.5.3-prototypes.patch |
100 |
=================================================================== |
101 |
--- cpint-2.5.3/actgen.c |
102 |
+++ cpint-2.5.3/actgen.c |
103 |
@@ -45,6 +45,7 @@ |
104 |
/************************************************************/ |
105 |
|
106 |
#include <stdio.h> |
107 |
+#include <stdlib.h> |
108 |
#include <unistd.h> |
109 |
#include <errno.h> |
110 |
#include <fcntl.h> |
111 |
--- cpint-2.5.3/diag0.c |
112 |
+++ cpint-2.5.3/diag0.c |
113 |
@@ -46,6 +46,8 @@ |
114 |
/************************************************************/ |
115 |
|
116 |
#include <stdio.h> |
117 |
+#include <stdlib.h> |
118 |
+#include <sys/ioctl.h> |
119 |
#include <unistd.h> |
120 |
#include <errno.h> |
121 |
#include <fcntl.h> |
122 |
--- cpint-2.5.3/hcp.c |
123 |
+++ cpint-2.5.3/hcp.c |
124 |
@@ -48,6 +48,8 @@ |
125 |
/************************************************************/ |
126 |
|
127 |
#include <stdio.h> |
128 |
+#include <stdlib.h> |
129 |
+#include <sys/ioctl.h> |
130 |
#include <unistd.h> |
131 |
#include <errno.h> |
132 |
#include <fcntl.h> |
133 |
--- cpint-2.5.3/mongen.c |
134 |
+++ cpint-2.5.3/mongen.c |
135 |
@@ -59,6 +59,8 @@ |
136 |
/************************************************************/ |
137 |
|
138 |
#include <stdio.h> |
139 |
+#include <stdlib.h> |
140 |
+#include <sys/ioctl.h> |
141 |
#include <unistd.h> |
142 |
#include <errno.h> |
143 |
#include <fcntl.h> |
144 |
|
145 |
|
146 |
|
147 |
1.1 sys-apps/cpint/files/cpint-2.5.3-kernel.patch |
148 |
|
149 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-kernel.patch?rev=1.1&view=markup |
150 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/cpint/files/cpint-2.5.3-kernel.patch?rev=1.1&content-type=text/plain |
151 |
|
152 |
Index: cpint-2.5.3-kernel.patch |
153 |
=================================================================== |
154 |
--- cpint-2.5.3/cpint.c |
155 |
+++ cpint-2.5.3/cpint.c |
156 |
@@ -131,7 +131,7 @@ |
157 |
|
158 |
CPInt_Dev *cpint_devices; |
159 |
|
160 |
-static struct class_simple *cpint_class; |
161 |
+static struct class *cpint_class; |
162 |
|
163 |
/*----------------------------------------------------------*/ |
164 |
/* The different file operations */ |
165 |
@@ -309,7 +309,7 @@ |
166 |
/*------------------------------------------------------*/ |
167 |
/* Register this device class */ |
168 |
/*------------------------------------------------------*/ |
169 |
- cpint_class = class_simple_create(THIS_MODULE, "cpint"); |
170 |
+ cpint_class = class_create(THIS_MODULE, "cpint"); |
171 |
if (IS_ERR(cpint_class)) { |
172 |
printk(KERN_ERR "Error creating cpint class.\n"); |
173 |
kfree(cpint_devices); |
174 |
@@ -325,7 +325,7 @@ |
175 |
|
176 |
fopIdx = fopMap[i_dev]; |
177 |
if (fopIdx > -1 && !(cpint_devs_map & (1 << fopIdx))) { |
178 |
- class_simple_device_add(cpint_class, |
179 |
+ class_device_create(cpint_class, NULL, |
180 |
MKDEV(cpint_major, i_dev), NULL, |
181 |
cpNames[fopIdx]); |
182 |
cpint_devs_map |= 1 << fopIdx; |
183 |
@@ -386,11 +386,11 @@ |
184 |
|
185 |
fopIdx = fopMap[i_dev]; |
186 |
if (fopIdx > -1 && (cpint_devs_map & (1 << fopIdx))) { |
187 |
- class_simple_device_remove(MKDEV(cpint_major, i_dev)); |
188 |
+ class_device_destroy(cpint_class, MKDEV(cpint_major, i_dev)); |
189 |
} |
190 |
} |
191 |
cpint_devs_map = 0; |
192 |
- class_simple_destroy(cpint_class); |
193 |
+ class_destroy(cpint_class); |
194 |
|
195 |
unregister_chrdev(cpint_major, "cpint"); |
196 |
for (i_dev = 0; i_dev < CPINT_NR_DEVS; i_dev++) { |
197 |
|
198 |
|
199 |
|
200 |
-- |
201 |
gentoo-commits@l.g.o mailing list |