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