1 |
kumba 08/02/10 01:42:36 |
2 |
|
3 |
Modified: mips-sources-2.6.22.6.ebuild ChangeLog |
4 |
Added: mips-sources-2.6.23.14.ebuild |
5 |
Log: |
6 |
Make 2.6.22.6 stable, and import 2.6.23.14. |
7 |
(Portage version: 2.1.4.1) |
8 |
|
9 |
Revision Changes Path |
10 |
1.3 sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild?rev=1.3&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild?rev=1.3&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild?r1=1.2&r2=1.3 |
15 |
|
16 |
Index: mips-sources-2.6.22.6.ebuild |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild,v |
19 |
retrieving revision 1.2 |
20 |
retrieving revision 1.3 |
21 |
diff -u -r1.2 -r1.3 |
22 |
--- mips-sources-2.6.22.6.ebuild 3 Sep 2007 05:32:03 -0000 1.2 |
23 |
+++ mips-sources-2.6.22.6.ebuild 10 Feb 2008 01:42:35 -0000 1.3 |
24 |
@@ -1,6 +1,6 @@ |
25 |
-# Copyright 1999-2007 Gentoo Foundation |
26 |
+# Copyright 1999-2008 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild,v 1.2 2007/09/03 05:32:03 mr_bones_ Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.22.6.ebuild,v 1.3 2008/02/10 01:42:35 kumba Exp $ |
30 |
|
31 |
# INCLUDED: |
32 |
# 1) linux sources from kernel.org |
33 |
@@ -36,7 +36,7 @@ |
34 |
HOMEPAGE="http://www.linux-mips.org/ http://www.gentoo.org/" |
35 |
SLOT="${OKV}" |
36 |
PROVIDE="virtual/linux-sources virtual/alsa" |
37 |
-KEYWORDS="-* ~mips" |
38 |
+KEYWORDS="-* mips" |
39 |
IUSE="cobalt ip27 ip28 ip30 ip32r10k" |
40 |
DEPEND=">=sys-devel/gcc-4.1.1" |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.114 sys-kernel/mips-sources/ChangeLog |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/ChangeLog?rev=1.114&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/ChangeLog?rev=1.114&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/ChangeLog?r1=1.113&r2=1.114 |
50 |
|
51 |
Index: ChangeLog |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/ChangeLog,v |
54 |
retrieving revision 1.113 |
55 |
retrieving revision 1.114 |
56 |
diff -u -r1.113 -r1.114 |
57 |
--- ChangeLog 3 Sep 2007 02:12:39 -0000 1.113 |
58 |
+++ ChangeLog 10 Feb 2008 01:42:35 -0000 1.114 |
59 |
@@ -1,6 +1,12 @@ |
60 |
# ChangeLog for sys-kernel/mips-sources |
61 |
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/ChangeLog,v 1.113 2007/09/03 02:12:39 kumba Exp $ |
63 |
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
64 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/ChangeLog,v 1.114 2008/02/10 01:42:35 kumba Exp $ |
65 |
+ |
66 |
+*mips-sources-2.6.23.14 (10 Feb 2008) |
67 |
+ |
68 |
+ 10 Feb 2008; Joshua Kinard <kumba@g.o> |
69 |
+ mips-sources-2.6.22.6.ebuild, +mips-sources-2.6.23.14.ebuild: |
70 |
+ Make 2.6.22.6 stable, and import 2.6.23.14. |
71 |
|
72 |
*mips-sources-2.6.22.6 (03 Sep 2007) |
73 |
*mips-sources-2.6.20.18 (03 Sep 2007) |
74 |
|
75 |
|
76 |
|
77 |
1.1 sys-kernel/mips-sources/mips-sources-2.6.23.14.ebuild |
78 |
|
79 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.23.14.ebuild?rev=1.1&view=markup |
80 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.23.14.ebuild?rev=1.1&content-type=text/plain |
81 |
|
82 |
Index: mips-sources-2.6.23.14.ebuild |
83 |
=================================================================== |
84 |
# Copyright 1999-2008 Gentoo Foundation |
85 |
# Distributed under the terms of the GNU General Public License v2 |
86 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.23.14.ebuild,v 1.1 2008/02/10 01:42:35 kumba Exp $ |
87 |
|
88 |
|
89 |
# INCLUDED: |
90 |
# 1) linux sources from kernel.org |
91 |
# 2) linux-mips.org GIT snapshot diff from 08 Oct 2007 |
92 |
# 3) Generic Fixes |
93 |
# 4) Patch for IP30 Support (http://www.linux-mips.org/~skylark/) |
94 |
# 5) Patch for IP28 Support (http://home.alphastar.de/fuerst/download.html) |
95 |
# 6) Patches (hacks) for IP27 support (ftp://ftp.linux-mips.org/pub/linux/mips/people/ralf/ip27/) |
96 |
# 7) Patch for Remaining Cobalt Bits (http://www.colonel-panic.org/cobalt-mips/) |
97 |
# 8) Experimental patches (IP27 hacks, et al) |
98 |
|
99 |
|
100 |
#//------------------------------------------------------------------------------ |
101 |
|
102 |
|
103 |
|
104 |
# Version Data |
105 |
OKV=${PV/_/-} |
106 |
GITDATE="20080206" # Date of diff between kernel.org and lmo GIT |
107 |
GENPATCHVER="1.31" # Tarball version for generic patches |
108 |
EXTRAVERSION="-mipsgit-${GITDATE}" |
109 |
KV="${OKV}${EXTRAVERSION}" |
110 |
F_KV="${OKV}" # Fetch KV, used to know what mipsgit diff to grab. |
111 |
STABLEVER="${F_KV}" # Stable Version (2.6.x) |
112 |
PATCHVER="" |
113 |
|
114 |
# Directories |
115 |
S="${WORKDIR}/linux-${OKV}-${GITDATE}" |
116 |
MIPS_PATCHES="${WORKDIR}/mips-patches" |
117 |
|
118 |
# Inherit Eclasses |
119 |
ETYPE="sources" |
120 |
inherit kernel eutils versionator |
121 |
|
122 |
# Portage Vars |
123 |
HOMEPAGE="http://www.linux-mips.org/ http://www.gentoo.org/" |
124 |
SLOT="${OKV}" |
125 |
PROVIDE="virtual/linux-sources virtual/alsa" |
126 |
KEYWORDS="-* ~mips" |
127 |
IUSE="cobalt ip27 ip28 ip30 ip32r10k" |
128 |
DEPEND=">=sys-devel/gcc-4.1.1" |
129 |
|
130 |
|
131 |
# Version Control Variables |
132 |
USE_RC="no" # If set to "yes", then attempt to use an RC kernel |
133 |
USE_PNT="yes" # If set to "yes", then attempt to use a point-release (2.6.x.y) |
134 |
|
135 |
# Machine Support Control Variables |
136 |
DO_IP22="yes" # If "yes", enable IP22 support (SGI Indy, Indigo2 R4x00) |
137 |
DO_IP27="no" # IP27 support (SGI Origin) |
138 |
DO_IP28="no" # IP28 support (SGI Indigo2 Impact R10000) |
139 |
DO_IP30="yes" # IP30 support (SGI Octane) |
140 |
DO_IP32="yes" # IP32 support (SGI O2, R5000/RM5200 Only) |
141 |
DO_CBLT="test" # Cobalt Support (Cobalt Microsystems) |
142 |
|
143 |
# Machine Stable Version Variables |
144 |
SV_IP22="" # If set && DO_IP22 == "no", indicates last "good" IP22 version |
145 |
SV_IP27="2.6.22.6" # DO_IP27 == "no", IP27 |
146 |
SV_IP28="2.6.20.18" # DO_IP28 == "no", IP28 |
147 |
SV_IP30="" # DO_IP30 == "no", IP30 |
148 |
SV_IP32="" # DO_IP32 == "no", IP32 |
149 |
SV_CBLT="" # DO_CBLT == "no", Cobalt |
150 |
|
151 |
|
152 |
# If USE_RC == "yes", use a release candidate kernel (2.6.X-rcY) |
153 |
if [ "${USE_RC}" = "yes" ]; then |
154 |
KVXY="$(get_version_component_range 1-2)" # Kernel Major/Minor |
155 |
KVZ="$(get_version_component_range 3)" # Kernel Revision Pt. 1 |
156 |
KVRC="$(get_version_component_range 4)" # Kernel RC |
157 |
F_KV="$(get_version_component_range 1-3)-${KVRC}" |
158 |
STABLEVER="${KVXY}.$((${KVZ} - 1))" # Last stable version (Rev - 1) |
159 |
PATCHVER="mirror://kernel/linux/kernel/v2.6/testing/patch-${OKV}.bz2" |
160 |
EXTRAVERSION="-${KVRC}-mipsgit-${GITDATE}" |
161 |
KV="${OKV}-${EXTRAVERSION}" |
162 |
USE_PNT="no" |
163 |
fi |
164 |
|
165 |
# If USE_PNT == "yes", use a point release kernel (2.6.x.y) |
166 |
if [ "${USE_PNT}" = "yes" ]; then |
167 |
F_KV="$(get_version_component_range 1-3)" # Get Maj/Min/Rev (x.y.z) |
168 |
STABLEVER="${F_KV}" # Last Revision release |
169 |
PATCHVER="mirror://kernel/linux/kernel/v2.6/patch-${OKV}.bz2" # Patch for new point release |
170 |
EXTRAVERSION=".$(get_version_component_range 4)-mipsgit-${GITDATE}" |
171 |
KV="${OKV}${EXTRAVERSION}" |
172 |
USE_RC="no" |
173 |
fi |
174 |
|
175 |
|
176 |
DESCRIPTION="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" |
177 |
SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${STABLEVER}.tar.bz2 |
178 |
mirror://gentoo/mipsgit-${F_KV}-${GITDATE}.diff.bz2 |
179 |
mirror://gentoo/${PN}-generic_patches-${GENPATCHVER}.tar.bz2 |
180 |
${PATCHVER}" |
181 |
|
182 |
|
183 |
|
184 |
#//------------------------------------------------------------------------------ |
185 |
|
186 |
|
187 |
|
188 |
# Error/Warning messages |
189 |
err_only_one_mach_allowed() { |
190 |
echo -e "" |
191 |
eerror "A patchset for a specific machine-type has already been selected." |
192 |
eerror "No other patches for machines-types are permitted. You will need a" |
193 |
eerror "separate copy of the kernel sources for each different machine-type" |
194 |
eerror "you want to build a kernel for." |
195 |
die "Only one machine-type patchset allowed" |
196 |
} |
197 |
|
198 |
err_disabled_mach() { |
199 |
# Get args |
200 |
local mach_name="${1}" |
201 |
local mach_abbr="${2}" |
202 |
local mach_use="${3}" |
203 |
local need_test="${4}" |
204 |
|
205 |
# Get stable version, if exists |
206 |
local stable_ver="SV_${mach_abbr}" |
207 |
stable_ver="${!stable_ver}" |
208 |
|
209 |
# See if this machine needs a USE passed or skip dying |
210 |
local has_use |
211 |
[ ! -z "${mach_use}" -a "${mach_use}" != "skip" ] && has_use="USE=\"${mach_use}\" " |
212 |
|
213 |
# Print error && (maybe) die |
214 |
echo -e "" |
215 |
if [ "${need_test}" != "test" ]; then |
216 |
eerror "${mach_name} Support has been disabled in this ebuild" |
217 |
eerror "revision. If you wish to merge ${mach_name} sources, then" |
218 |
eerror "run ${has_use}emerge =mips-sources-${stable_ver}" |
219 |
[ "${mach_use}" != "skip" ] && die "${mach_name} Support disabled." |
220 |
else |
221 |
ewarn "${mach_name} Support has been marked as needing testing in this" |
222 |
ewarn "ebuild revision. This usually means that any patches to support" |
223 |
ewarn "${mach_name} have been forward ported and maybe even compile-tested," |
224 |
ewarn "but not yet booted on real hardware, possibly due to a lack of access" |
225 |
ewarn "to such hardware. If you happen to boot this kernel and have no" |
226 |
ewarn "problems at all, then please inform the maintainer. Otherwise, if" |
227 |
ewarn "experience a bug, an oops/panic, or some other oddity, then please" |
228 |
ewarn "file a bug at bugs.gentoo.org, and assign it to the mips team." |
229 |
fi |
230 |
|
231 |
return 0 |
232 |
} |
233 |
|
234 |
|
235 |
|
236 |
#//------------------------------------------------------------------------------ |
237 |
|
238 |
|
239 |
|
240 |
# Machine Information Messages |
241 |
# |
242 |
# If needing to whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use |
243 |
# \040 for a space instead of the standard space. These functions strip redundant |
244 |
# white space for some unknown reason |
245 |
|
246 |
show_ip22_info() { |
247 |
echo -e "" |
248 |
einfo "IP22 systems with an R5000 processor should work well with this release." |
249 |
einfo "The R4x00 series of processors tend to be rather flaky, especially the" |
250 |
einfo "R4600. If you have to run an R4x00 processor, then try to use an R4400." |
251 |
einfo "" |
252 |
einfo "Some Notes:" |
253 |
einfo "\t- Supported graphics card right now is Newport (XL)." |
254 |
einfo "\t- A driver for Extreme (XZ) supposedly exists, but its author" |
255 |
einfo "\t\040\040has steadfastly refused to release the code for various reasons." |
256 |
einfo "\t\040\040Any questions regarding its status should be directed to "onion" in" |
257 |
einfo "\t\040\040#mipslinux on the Freenode IRC network. Given he is the author, he" |
258 |
einfo "\t\040\040will know the most current status of the driver." |
259 |
echo -e "" |
260 |
} |
261 |
|
262 |
show_ip27_info() { |
263 |
echo -e "" |
264 |
ewarn "IP27 support can be considered a game of Russian Roulette. It'll work" |
265 |
ewarn "great for some but not for others. We don't get a chance to test this" |
266 |
ewarn "machine very often with each new kernel, so your mileage may vary." |
267 |
echo -e "" |
268 |
} |
269 |
|
270 |
show_ip28_info() { |
271 |
echo -e "" |
272 |
einfo "Support for the Indigo2 Impact R10000 is experimental, and will likely remain so." |
273 |
einfo "As such, If you do not have a clue in the world about what an IP28 is, what the" |
274 |
einfo "mips architecture is about, are new to Gentoo, or even Linux in particular, then" |
275 |
einfo "it is highly advised that you steer clear of messing with this machine. Due to" |
276 |
einfo "the experimental nature of this particular class of system, we have to provide" |
277 |
einfo "such warnings, as it is only for use by those who know what they are doing." |
278 |
echo -e "" |
279 |
ewarn "Remember, due to the R10000 Speculative Execution issue that exists with this" |
280 |
ewarn "machine class, _nothing_ is guaranteed to work smoothly. Your mileage may vary." |
281 |
echo -e "" |
282 |
} |
283 |
|
284 |
show_ip30_info() { |
285 |
echo -e "" |
286 |
einfo "Things to keep in mind when building a kernel for an SGI Octane:" |
287 |
einfo "\t- Impact (MGRAS) console and X driver work, please report any bugs." |
288 |
einfo "\t- VPro (Odyssey) console works, but no X driver exists yet." |
289 |
einfo "\t- PCI Card Cages should work for many devices, except certain types like" |
290 |
einfo "\t\040\040PCI-to-PCI bridges (USB hubs, USB flash card readers for example)." |
291 |
einfo "\t- Do not use OHCI-based USB cards in Octane. They're broke on this machine." |
292 |
einfo "\t\040\040Patches are welcome to fix the issue." |
293 |
einfo "\t- Equally, UHCI Cards are showing issues in this release, but should still" |
294 |
einfo "\t\040\040function somewhat. This issue manifests itself when using pl2303 USB->Serial" |
295 |
einfo "\t\040\040adapters." |
296 |
einfo "\t- Other XIO-based devices like MENET and various Impact addons remain" |
297 |
einfo "\t\040\040untested and are not guaranteed to work. This applies to various" |
298 |
einfo "\t\040\040digital video conversion boards as well." |
299 |
echo -e "" |
300 |
} |
301 |
|
302 |
show_ip32_info() { |
303 |
echo -e "" |
304 |
einfo "IP32 systems function well, however there are some notes:" |
305 |
einfo "\t- No driver exists yet for the sound card. There is active work on one," |
306 |
einfo "\t\040\040however. Interested parties are encouraged to browse the Linux/MIPS" |
307 |
einfo "\t\040\040mailing list archives during the first few months of 2007 for more" |
308 |
einfo "\t\040\040information on this driver's status." |
309 |
einfo "\t- Framebuffer console is limited to 4MB. Anything greater" |
310 |
einfo "\t\040\040specified when building the kernel will likely oops or panic" |
311 |
einfo "\t\040\040the kernel." |
312 |
einfo "\t- X support is limited to the generic fbdev driver. No X gbefb" |
313 |
einfo "\t\040\040driver exists for O2 yet. Patches are welcome, however :)" |
314 |
echo -e "" |
315 |
|
316 |
if use ip32r10k; then |
317 |
eerror "R10000/R12000 Support on IP32 is ${HILITE}HIGHLY EXPERIMENTAL!${NORMAL}" |
318 |
eerror "This is intended ONLY for people interested in fixing it up. And" |
319 |
eerror "by that, I mean people willing to SEND IN PATCHES! If you're not" |
320 |
eerror "interested in debugging this issue seriously or just want to run it" |
321 |
eerror "as a user, then DO NOT USE THIS. Really, we mean it." |
322 |
echo -e "" |
323 |
eerror "All that said, initial testing seems to indicate that this system will" |
324 |
eerror "stay online for a reasonable amount of time and will compile packages." |
325 |
eerror "However, the primary console (which is serial, gbefb seems dead for now)" |
326 |
eerror "will fill with CRIME CPU errors every so often. A majority of these" |
327 |
eerror "seem harmless, however a few non-fatal oopses have also been triggered." |
328 |
echo -e "" |
329 |
eerror "We're interesting in finding anyone with knowledge of the R10000" |
330 |
eerror "workaround for speculative execution listed in the R10000 Processor" |
331 |
eerror "manual, or those who are familiar with the IP32 chipset and the feature" |
332 |
eerror "called \"Juice\"." |
333 |
echo -e "" |
334 |
fi |
335 |
|
336 |
eerror "!!! BIG FAT WARNING" |
337 |
eerror "!!! To Build 64bit kernels for SGI O2 (IP32) or SGI Indy/Indigo2 R4x00 (IP22)" |
338 |
eerror "!!! systems, you _need_ to be using a >=gcc-4.1.1 compiler, have CONFIG_BUILD_ELF64" |
339 |
eerror "!!! disabled in your kernel config, and building with the ${HILITE}vmlinux.32${NORMAL} make target." |
340 |
eerror "!!! In prior times, an ugly hack was used to build an ELF64 binary that resembled" |
341 |
eerror "!!! an ELF32 binary in order to make the ARCS PROMs on these systems boot the" |
342 |
eerror "!!! kernel. This hack is no longer in use nor supported in 2.6.17 and beyond. In" |
343 |
eerror "!!! order to achieve the same effect, a new flag available in >=gcc-4.x is used," |
344 |
eerror "!!! and as such, makes >=gcc-4.1.1 the preferred compiler for 2.6.17 and beyond." |
345 |
eerror "" |
346 |
eerror "!!! Remember, build your IP22 and IP32 kernels with the following command:" |
347 |
eerror "!!! following make command: ${GOOD}make vmlinux.32${NORMAL}" |
348 |
eerror "!!! Once done, copy the ${GOOD}vmlinux.32${NORMAL} file and boot that. Do not use the" |
349 |
eerror "!!! ${BAD}vmlinux${NORMAL} file -- this will either not boot on IP22 or result in" |
350 |
eerror "!!! undocumented weirdness on IP32 systems." |
351 |
} |
352 |
|
353 |
show_cobalt_info() { |
354 |
echo -e "" |
355 |
einfo "Please keep in mind that the 2.6 kernel will NOT boot on Cobalt" |
356 |
einfo "systems that are still using the old Cobalt bootloader. In" |
357 |
einfo "order to boot a 2.6 kernel on Cobalt systems, you must be using" |
358 |
einfo "the CoLo bootloader, which does not have the kernel" |
359 |
einfo "size limitation that the older bootloader has. If you want" |
360 |
einfo "to use the newer bootloader, make sure you have sys-boot/colo" |
361 |
einfo "installed and setup." |
362 |
echo -e "" |
363 |
} |
364 |
|
365 |
|
366 |
|
367 |
#//------------------------------------------------------------------------------ |
368 |
|
369 |
|
370 |
|
371 |
# Check our USE flags for machine-specific flags and give appropriate warnings/errors. |
372 |
# Hope the user isn't crazy enough to try using combinations of these flags. |
373 |
# Only use one machine-specific flag at a time for each type of desired machine-support. |
374 |
# |
375 |
# Affected machines: ip27 ip28 ip30 |
376 |
# Not Affected: cobalt ip22 ip32 |
377 |
pkg_setup() { |
378 |
local arch_is_selected="no" |
379 |
local mach_ip |
380 |
local mach_enable |
381 |
local mach_name |
382 |
local x |
383 |
|
384 |
# See if we're on a cobalt system first (must use the cobalt-mips profile) |
385 |
if use cobalt; then |
386 |
arch_is_selected="yes" |
387 |
[ "${DO_CBLT}" = "test" ] \ |
388 |
&& err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt" "test" |
389 |
[ "${DO_CBLT}" = "no" ] \ |
390 |
&& err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt" |
391 |
show_cobalt_info |
392 |
fi |
393 |
|
394 |
# Exclusive machine patchsets |
395 |
# These are not allowed to be mixed together, thus only one of them may be applied |
396 |
# to a tree per merge. |
397 |
for x in \ |
398 |
"ip27 SGI Origin 200/2000" \ |
399 |
"ip28 SGI Indigo2 Impact R10000" \ |
400 |
"ip30 SGI Octane" |
401 |
do |
402 |
set -- ${x} # Set positional params |
403 |
mach_ip="${1}" # Grab the first param (HW IP for SGI) |
404 |
shift # Shift the positions |
405 |
mach_name="${*}" # Get the rest (Name) |
406 |
|
407 |
if use ${mach_ip}; then |
408 |
# Fetch the value indiciating if the machine is enabled or not |
409 |
mach_enable="DO_${mach_ip/ip/IP}" |
410 |
mach_enable="${!mach_enable}" |
411 |
|
412 |
# Make sure only one of these exclusive machine patches is selected |
413 |
[ "${arch_is_selected}" = "no" ] \ |
414 |
&& arch_is_selected="yes" \ |
415 |
|| err_only_one_mach_allowed |
416 |
|
417 |
# Is the machine support disabled or marked as needing testing? |
418 |
[ "${mach_enable}" = "test" ] \ |
419 |
&& err_disabled_mach "${mach_name}" "${mach_ip/ip/IP}" "${mach_ip}" "test" |
420 |
[ "${mach_enable}" = "no" ] \ |
421 |
&& err_disabled_mach "${mach_name}" "${mach_ip/ip/IP}" "${mach_ip}" |
422 |
|
423 |
# Show relevant information about the machine |
424 |
show_${mach_ip}_info |
425 |
fi |
426 |
done |
427 |
|
428 |
# All other systems that don't have a USE flag go here |
429 |
# These systems have base-line support included in linux-mips git, so |
430 |
# instead of failing, if disabled, we simply warn the user |
431 |
if [ "${arch_is_selected}" = "no" ]; then |
432 |
[ "${DO_IP22}" = "no" ] \ |
433 |
&& err_disabled_mach "SGI Indy/Indigo2 R4x00" "IP22" "skip" \ |
434 |
|| show_ip22_info |
435 |
[ "${DO_IP32}" = "no" ] \ |
436 |
&& err_disabled_mach "SGI O2" "IP32" "skip" \ |
437 |
|| show_ip32_info |
438 |
|
439 |
fi |
440 |
} |
441 |
|
442 |
|
443 |
|
444 |
#//------------------------------------------------------------------------------ |
445 |
|
446 |
|
447 |
|
448 |
# Generic Patches - Safe to use globally |
449 |
do_generic_patches() { |
450 |
echo -e "" |
451 |
ebegin ">>> Generic Patches" |
452 |
|
453 |
# IP22 Patches |
454 |
epatch ${MIPS_PATCHES}/misc-2.6.16-ip22-vino-64bit-ioctl-fixes.patch |
455 |
|
456 |
# IP32 Patches |
457 |
epatch ${MIPS_PATCHES}/misc-2.6.11-ip32-mace-is-always-eth0.patch |
458 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ip32-fix-breakage.patch |
459 |
|
460 |
# Cobalt Patches |
461 |
epatch ${MIPS_PATCHES}/misc-2.6.23-cobalt-bits.patch |
462 |
|
463 |
# Generic |
464 |
epatch ${MIPS_PATCHES}/misc-2.6.17-ths-mips-tweaks.patch |
465 |
epatch ${MIPS_PATCHES}/misc-2.6.23-seccomp-no-default.patch |
466 |
epatch ${MIPS_PATCHES}/misc-2.6.11-add-byteorder-to-proc.patch |
467 |
epatch ${MIPS_PATCHES}/misc-2.6.23-squashfs-3.2-r2.patch |
468 |
eend |
469 |
} |
470 |
|
471 |
|
472 |
# NOT safe for production systems |
473 |
# Use at own risk, do _not_ file bugs on effects of these patches |
474 |
do_sekrit_patches() { |
475 |
# /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ |
476 |
|
477 |
if use ip32r10k; then |
478 |
# Modified version of the IP28 cache barriers patch for the kernel |
479 |
# that removes all the IP28 specific pieces and leaves behind only |
480 |
# the generic segments. |
481 |
epatch ${MIPS_PATCHES}/misc-2.6.20-ip32-r10k-support.patch |
482 |
fi |
483 |
|
484 |
## # No Sekrit Patches! |
485 |
## sleep 0 |
486 |
|
487 |
# /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ |
488 |
} |
489 |
|
490 |
|
491 |
|
492 |
#//------------------------------------------------------------------------------ |
493 |
|
494 |
|
495 |
|
496 |
# Exclusive Machine Patchsets |
497 |
|
498 |
# SGI Origin (IP27) |
499 |
do_ip27_support() { |
500 |
echo -e "" |
501 |
einfo ">>> Patching kernel for SGI Origin 200/2000 (IP27) support ..." |
502 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ioc3-metadriver-r27.patch |
503 |
epatch ${MIPS_PATCHES}/misc-2.6.17-ip27-horrible-hacks_may-eat-kittens.patch |
504 |
epatch ${MIPS_PATCHES}/misc-2.6.17-ip27-rev-pci-tweak.patch |
505 |
epatch ${MIPS_PATCHES}/misc-2.6.19-ip27-hack-attack.patch |
506 |
epatch ${MIPS_PATCHES}/misc-2.6.22-ioc3-revert_commit_691cd0c.patch |
507 |
} |
508 |
|
509 |
# SGI Indigo2 Impact R10000 (IP28) |
510 |
do_ip28_support() { |
511 |
echo -e "" |
512 |
einfo ">>> Patching kernel for SGI Indigo2 Impact R10000 (IP28) support ..." |
513 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ip28-sgiseeq-backport-from-2624.patch |
514 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ip28-i2_impact-support.patch |
515 |
} |
516 |
|
517 |
|
518 |
# SGI Octane 'Speedracer' (IP30) |
519 |
do_ip30_support() { |
520 |
echo -e "" |
521 |
einfo ">>> Patching kernel for SGI Octane (IP30) support ..." |
522 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ioc3-metadriver-r27.patch |
523 |
epatch ${MIPS_PATCHES}/misc-2.6.23-ip30-octane-support-r28.patch |
524 |
epatch ${MIPS_PATCHES}/misc-2.6.22-ioc3-revert_commit_691cd0c.patch |
525 |
} |
526 |
|
527 |
|
528 |
|
529 |
#//------------------------------------------------------------------------------ |
530 |
|
531 |
|
532 |
|
533 |
# Renames source trees for the few machines that we have separate patches for |
534 |
rename_source_tree() { |
535 |
if [ ! -z "${1}" ]; then |
536 |
if use ${1}; then |
537 |
mv ${S} ${S}.${1} |
538 |
S="${S}.${1}" |
539 |
fi |
540 |
fi |
541 |
} |
542 |
|
543 |
|
544 |
|
545 |
#//------------------------------------------------------------------------------ |
546 |
|
547 |
|
548 |
|
549 |
src_unpack() { |
550 |
local x |
551 |
|
552 |
unpack ${A} |
553 |
mv ${WORKDIR}/linux-${STABLEVER} ${WORKDIR}/linux-${OKV}-${GITDATE} |
554 |
cd ${S} |
555 |
|
556 |
|
557 |
# If USE_RC == "yes", use a release candidate kernel (2.6.x-rcy) |
558 |
# OR |
559 |
# if USE_PNT == "yes", use a point-release kernel (2.6.x.y) |
560 |
if [ "${USE_RC}" = "yes" -o "${USE_PNT}" = "yes" ]; then |
561 |
echo -e "" |
562 |
einfo ">>> linux-${STABLEVER} --> linux-${OKV} ..." |
563 |
epatch ${WORKDIR}/patch-${OKV} |
564 |
fi |
565 |
|
566 |
|
567 |
# Update the vanilla sources with linux-mips GIT changes |
568 |
echo -e "" |
569 |
einfo ">>> linux-${OKV} --> linux-${OKV}-${GITDATE} patch ..." |
570 |
epatch ${WORKDIR}/mipsgit-${F_KV}-${GITDATE}.diff |
571 |
|
572 |
# Generic patches we always include |
573 |
do_generic_patches |
574 |
|
575 |
# Machine-specific patches |
576 |
for x in {ip27,ip28,ip30}; do |
577 |
use ${x} && do_${x}_support |
578 |
done |
579 |
|
580 |
# Patches for experimental use |
581 |
do_sekrit_patches |
582 |
|
583 |
|
584 |
# All done, resume normal portage work |
585 |
kernel_universal_unpack |
586 |
} |
587 |
|
588 |
|
589 |
src_install() { |
590 |
# Rename the source trees for exclusive machines |
591 |
local x |
592 |
for x in {ip27,ip28,ip30,cobalt}; do |
593 |
use ${x} && rename_source_tree ${x} |
594 |
done |
595 |
|
596 |
kernel_src_install |
597 |
} |
598 |
|
599 |
pkg_postinst() { |
600 |
# Symlink /usr/src/linux as appropriate |
601 |
local my_ksrc="${S##*/}" |
602 |
for x in {ip27,ip28,ip30,cobalt}; do |
603 |
use ${x} && my_ksrc="${my_ksrc}.${x}" |
604 |
done |
605 |
|
606 |
if [ ! -e ${ROOT}usr/src/linux ]; then |
607 |
rm -f ${ROOT}usr/src/linux |
608 |
ln -sf ${my_ksrc} ${ROOT}/usr/src/linux |
609 |
fi |
610 |
} |
611 |
|
612 |
|
613 |
#//------------------------------------------------------------------------------ |
614 |
|
615 |
|
616 |
|
617 |
-- |
618 |
gentoo-commits@l.g.o mailing list |