diff options
author | Joshua Kinard <kumba@gentoo.org> | 2005-12-20 18:10:41 +0000 |
---|---|---|
committer | Joshua Kinard <kumba@gentoo.org> | 2005-12-20 18:10:41 +0000 |
commit | 80d4e0520da66717549f010184f54e33c791b9e0 (patch) | |
tree | 99bcc2cc91d9a47aff0971908aa5886471b6c580 /sys-kernel | |
parent | added use flags new to gaim-2.0.0_beta1 (diff) | |
download | historical-80d4e0520da66717549f010184f54e33c791b9e0.tar.gz historical-80d4e0520da66717549f010184f54e33c791b9e0.tar.bz2 historical-80d4e0520da66717549f010184f54e33c791b9e0.zip |
Import 2.6.13.5 and 2.6.14.4. Removing 2.6.12.5 as IP27 now works in both 2.6.13/2.6.14. 2.6.14.4 also brings in X support for the Impact card in IP28 (Indigo2 Impact) systems.
Package-Manager: portage-2.0.53
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/mips-sources/ChangeLog | 12 | ||||
-rw-r--r-- | sys-kernel/mips-sources/Manifest | 10 | ||||
-rw-r--r-- | sys-kernel/mips-sources/files/digest-mips-sources-2.6.12.5 | 5 | ||||
-rw-r--r-- | sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.5 (renamed from sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.4) | 2 | ||||
-rw-r--r-- | sys-kernel/mips-sources/files/digest-mips-sources-2.6.14.4 | 5 | ||||
-rw-r--r-- | sys-kernel/mips-sources/mips-sources-2.6.12.5.ebuild | 262 | ||||
-rw-r--r-- | sys-kernel/mips-sources/mips-sources-2.6.13.5.ebuild (renamed from sys-kernel/mips-sources/mips-sources-2.6.13.4.ebuild) | 45 | ||||
-rw-r--r-- | sys-kernel/mips-sources/mips-sources-2.6.14.4.ebuild | 401 |
8 files changed, 446 insertions, 296 deletions
diff --git a/sys-kernel/mips-sources/ChangeLog b/sys-kernel/mips-sources/ChangeLog index 893b52532c3f..6614441082a8 100644 --- a/sys-kernel/mips-sources/ChangeLog +++ b/sys-kernel/mips-sources/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-kernel/mips-sources # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/ChangeLog,v 1.79 2005/10/16 02:31:27 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/ChangeLog,v 1.80 2005/12/20 18:10:40 kumba Exp $ + +*mips-sources-2.6.14.4 (20 Dec 2005) +*mips-sources-2.6.13.5 (20 Dec 2005) + + 20 Dec 2005; Joshua Kinard <kumba@gentoo.org> + -mips-sources-2.6.12.5.ebuild, -mips-sources-2.6.13.4.ebuild, + +mips-sources-2.6.13.5.ebuild, +mips-sources-2.6.14.4.ebuild: + Import 2.6.13.5 and 2.6.14.4. Removing 2.6.12.5 as IP27 now works in both + 2.6.13/2.6.14. 2.6.14.4 also brings in X support for the Impact card in IP28 + (Indigo2 Impact) systems. *mips-sources-2.6.13.4 (16 Oct 2005) diff --git a/sys-kernel/mips-sources/Manifest b/sys-kernel/mips-sources/Manifest index f1e1509b578c..025616455ab1 100644 --- a/sys-kernel/mips-sources/Manifest +++ b/sys-kernel/mips-sources/Manifest @@ -1,8 +1,8 @@ -MD5 d47313210ac4ae372c8954603dfcf15b ChangeLog 34773 +MD5 02d20b5c7032d1ea6de6a08278f0bd54 ChangeLog 35208 MD5 0c97fdd0af4e709a2a3173aa53a0990b files/digest-mips-sources-2.4.31-r1 316 -MD5 02c693ab6545cc5292854005a9c228db files/digest-mips-sources-2.6.12.5 378 -MD5 1dee266050a38ef1bc578cd4b12b7d0c files/digest-mips-sources-2.6.13.4 378 +MD5 2a7fb0ee882ce28399352ba1e72c811c files/digest-mips-sources-2.6.13.5 378 +MD5 aa0c3de27c3fb73ee2cb7de772e7324d files/digest-mips-sources-2.6.14.4 378 MD5 ad25a2a0b6ade60c13ad8040f3c319c6 metadata.xml 378 MD5 33808696f457977c99d2691c774ca703 mips-sources-2.4.31-r1.ebuild 2035 -MD5 68e74963a88cc36383c8fb756d4d9fc5 mips-sources-2.6.12.5.ebuild 7625 -MD5 649f53756ebc22d3b023a2cc9e69d46d mips-sources-2.6.13.4.ebuild 12657 +MD5 f4d1f84286c18bbe12d7162b51d3039e mips-sources-2.6.13.5.ebuild 12708 +MD5 403ea0bb57654ef4a282bb47f385b5b9 mips-sources-2.6.14.4.ebuild 13736 diff --git a/sys-kernel/mips-sources/files/digest-mips-sources-2.6.12.5 b/sys-kernel/mips-sources/files/digest-mips-sources-2.6.12.5 deleted file mode 100644 index be0fb9b427de..000000000000 --- a/sys-kernel/mips-sources/files/digest-mips-sources-2.6.12.5 +++ /dev/null @@ -1,5 +0,0 @@ -MD5 c5d2a1b62e1dad502c871bba267337d5 linux-2.6.12.tar.bz2 37511570 -MD5 998480888a0049e3537af2cd2240d92b mips-sources-generic_patches-1.14.tar.bz2 118949 -MD5 e94ee79cc269b78401ffe9b79ad620ff mips-sources-security_patches-1.15.tar.bz2 95503 -MD5 810a4f1e68d7e9ee1a46372698f0978f mipscvs-2.6.12-20050711.diff.bz2 393859 -MD5 cff8abb6a5a992018cbcf382ff95c577 patch-2.6.12.5.bz2 14588 diff --git a/sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.4 b/sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.5 index 1e1ba4b3d1b9..455622f03cdc 100644 --- a/sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.4 +++ b/sys-kernel/mips-sources/files/digest-mips-sources-2.6.13.5 @@ -2,4 +2,4 @@ MD5 560f5fadf59f172973e67939868a4cae linux-2.6.13.tar.bz2 38372729 MD5 998480888a0049e3537af2cd2240d92b mips-sources-generic_patches-1.14.tar.bz2 118949 MD5 e94ee79cc269b78401ffe9b79ad620ff mips-sources-security_patches-1.15.tar.bz2 95503 MD5 4fc24a9f9d591009e4609ef3acc9ebf6 mipscvs-2.6.13-20050914.diff.bz2 537371 -MD5 37bd1949c1d0d5911510a9157e80a8ae patch-2.6.13.4.bz2 13589 +MD5 318cd641965082fe38ab0885ef2728cf patch-2.6.13.5.bz2 16626 diff --git a/sys-kernel/mips-sources/files/digest-mips-sources-2.6.14.4 b/sys-kernel/mips-sources/files/digest-mips-sources-2.6.14.4 new file mode 100644 index 000000000000..911b0d0f36a3 --- /dev/null +++ b/sys-kernel/mips-sources/files/digest-mips-sources-2.6.14.4 @@ -0,0 +1,5 @@ +MD5 66d02cbd723876c6d69846a067875a22 linux-2.6.14.tar.bz2 39172170 +MD5 32728f429527bb4a4446a4d3452fc606 mips-sources-generic_patches-1.15.tar.bz2 206582 +MD5 e94ee79cc269b78401ffe9b79ad620ff mips-sources-security_patches-1.15.tar.bz2 95503 +MD5 ee7d677f2c8e81267abc038dfcd0f9c9 mipsgit-2.6.14-20051030.diff.bz2 689749 +MD5 cdf7318dc04eb669938fd6bd6b91e634 patch-2.6.14.4.bz2 19705 diff --git a/sys-kernel/mips-sources/mips-sources-2.6.12.5.ebuild b/sys-kernel/mips-sources/mips-sources-2.6.12.5.ebuild deleted file mode 100644 index 16871a8ff5e7..000000000000 --- a/sys-kernel/mips-sources/mips-sources-2.6.12.5.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.12.5.ebuild,v 1.1 2005/10/16 02:31:27 kumba Exp $ - - -# INCLUDED: -# 1) linux sources from kernel.org -# 2) linux-mips.org CVS snapshot diff from 11 Jul 2005 -# 3) Generic Fixes -# 4) Security fixes -# 7) Experimental patches (IP27) - - -#//------------------------------------------------------------------------------ - - - -# Version Data -OKV=${PV/_/-} -CVSDATE="20050711" # Date of diff between kernel.org and lmo CVS -SECPATCHVER="1.15" # Tarball version for security patches -GENPATCHVER="1.14" # Tarball version for generic patches -EXTRAVERSION="-mipscvs-${CVSDATE}" -KV="${OKV}${EXTRAVERSION}" -F_KV="${OKV}" # Fetch KV, used to know what mipscvs diff to grab. -STABLEVER="${F_KV}" # Stable Version (2.6.x) -PATCHVER="" -USERC="no" # If set to "yes", then attempt to use an RC kernel -USEPNT="yes" # If set to "yes", then attempt to use a point-release (2.6.x.y) - -# Directories -S="${WORKDIR}/linux-${OKV}-${CVSDATE}" -MIPS_PATCHES="${WORKDIR}/mips-patches" -MIPS_SECURITY="${WORKDIR}/security" - -# Inherit Eclasses -ETYPE="sources" -inherit kernel eutils versionator - -# Portage Vars -HOMEPAGE="http://www.linux-mips.org/ http://www.gentoo.org/" -SLOT="${OKV}" -PROVIDE="virtual/linux-sources virtual/alsa" -KEYWORDS="-* ~mips" -IUSE="ip27" - - -# If USERC == "yes", use a release candidate kernel (2.6.X-rcY) -# Do not set this to "yes" if using a point-release kernel -if [ "${USERC}" = "yes" ]; then - KVXY="$(get_version_component_range 1-2)" # Kernel Major/Minor - KVZ="$(get_version_component_range 3)" # Kernel Revision Pt. 1 - KVRC="${get_version_component_range 4}" # Kernel RC - F_KV="$(get_version_component_range 1-3)" - STABLEVER="${KVXY}.$((${KVZ} - 1))" # Last stable version (Rev - 1) - PATCHVER="mirror://kernel/linux/kernel/v2.6/testing/patch-${OKV}.bz2" - EXTRAVERSION="-${KVRC}-mipscvs-${CVSDATE}" - KV="${OKV}-${EXTRAVERSION}" -fi - -# If USEPNT == "yes", use a point release kernel (2.6.x.y) -# Do not set this to "yes" if using a release candidate kernel -if [ "${USEPNT}" = "yes" ]; then - F_KV="$(get_version_component_range 1-3)" # Get Maj/Min/Rev (x.y.z) - STABLEVER="${F_KV}" # Last Revision release - PATCHVER="mirror://kernel/linux/kernel/v2.6/patch-${OKV}.bz2" # Patch for new point release - EXTRAVERSION=".$(get_version_component_range 4)-mipscvs-${CVSDATE}" - KV="${OKV}${EXTRAVERSION}" -fi - - -DESCRIPTION="Linux-Mips CVS sources for MIPS-based machines, dated ${CVSDATE}" -SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${STABLEVER}.tar.bz2 - mirror://gentoo/mipscvs-${F_KV}-${CVSDATE}.diff.bz2 - mirror://gentoo/${PN}-security_patches-${SECPATCHVER}.tar.bz2 - mirror://gentoo/${PN}-generic_patches-${GENPATCHVER}.tar.bz2 - ${PATCHVER}" - - - -#//------------------------------------------------------------------------------ - - - -# Error message -err_only_one_arch_allowed() { - echo -e "" - die "IP27 Support pre-selected" -} - - -# Check our USE flags for machine-specific flags and give appropriate warnings. -# Hope the user isn't crazy enough to try using combinations of these flags. -# Only use one machine-specific flag at a time for each type of desired machine-support. -# -# Affected machines: ip27 -# Not Affected: -pkg_setup() { - local arch_is_selected="no" - - # See if we're using IP27 (Origin) - if use ip27; then - echo -e "" - einfo "IP27 support can be considered a game of Russian Roulette. It'll work" - einfo "great for some but not for others. It also uses some rather horrible" - einfo "hacks to get going -- hopefully these will be repaired in the future." - echo -e "" - ewarn "Please keep all kittens and any other small, cute, and fluffy creatures" - ewarn "away from an IP27 Box running these sources. Failure to do so may cause" - ewarn "the IP27 to consume the hapless creature. Consider this your only" - ewarn "warning regarding the experimental nature of this particular machine." - echo -e "" - arch_is_selected="yes" - else - echo -e "" - eerror "Only support for the SGI Origin is enabled in this version." - eerror "Please pass USE=\"ip27\" or add this USE flag to /etc/make.conf." - err_only_one_arch_allowed - fi -} - - - -#//------------------------------------------------------------------------------ - - - -# Generic Patches - Safe to use globally -do_generic_patches() { - echo -e "" - ebegin ">>> Generic Patches" - # Generic - epatch ${MIPS_PATCHES}/misc-2.6.12-ths-mips-tweaks.patch - epatch ${MIPS_PATCHES}/misc-2.6.12-mips-iomap-functions.patch - epatch ${MIPS_PATCHES}/misc-2.6.12-seccomp-no-default.patch - epatch ${MIPS_PATCHES}/misc-2.6.11-add-byteorder-to-proc.patch - epatch ${MIPS_PATCHES}/misc-2.6.13-n32-fix-sigsuspend.patch - epatch ${MIPS_PATCHES}/misc-2.6.12-patch-2_6_13_4-backport.patch - eend -} - - -# NOT safe for production systems -# Use at own risk, do _not_ file bugs on effects of these patches -do_sekrit_patches() { - # /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ - - # No Sekrit Patches! - sleep 0 - - # /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ -} - - -do_security_patches() { - echo -e "" - ebegin ">>> Applying Security Fixes" - einfo ">>> None to apply! ..." - echo -e "" -## epatch ${MIPS_SECURITY}/ - eend -} - - - -#//------------------------------------------------------------------------------ - - - -# These patches are separate from generic patches for a good reason - namely because it is -# possible (but untested) that patches for one machine-type may conflict with patches from -# another machine type and therefore produce unwanted side-effects. We therefore enforce -# this by checking if an arch patch has already been applied, and if so, error out. - -# SGI Origin (IP27) -do_ip27_support() { - echo -e "" - einfo ">>> Patching kernel for SGI Origin (IP27) support ..." - epatch ${MIPS_PATCHES}/misc-2.6.12-ioc3-metadriver-r25.patch - epatch ${MIPS_PATCHES}/misc-2.6.12-ip27-iluxa-fixes.patch - epatch ${MIPS_PATCHES}/misc-2.6.13-ip27-horrible-hacks_may-eat-kittens.patch -} - - - -#//------------------------------------------------------------------------------ - - - -# Renames source trees for the few machines that we have separate patches for -rename_source_tree() { - if [ ! -z "${1}" ]; then - if use ${1}; then - mv ${S} ${S}.${1} - S="${S}.${1}" - fi - fi -} - - - -#//------------------------------------------------------------------------------ - - - -src_unpack() { - unpack ${A} - mv ${WORKDIR}/linux-${STABLEVER} ${WORKDIR}/linux-${OKV}-${CVSDATE} - cd ${S} - - - # If USERC == "yes", use a release candidate kernel (2.6.x-rcy) - # OR - # if USEPNT == "yes", use a point-release kernel (2.6.x.y) - if [ "${USERC}" = "yes" -o "${USEPNT}" = "yes" ]; then - echo -e "" - einfo ">>> linux-${STABLEVER} --> linux-${OKV} ..." - epatch ${WORKDIR}/patch-${OKV} - fi - - - # Update the vanilla sources with linux-mips CVS changes - echo -e "" - einfo ">>> linux-${OKV} --> linux-${OKV}-${CVSDATE} patch ..." - epatch ${WORKDIR}/mipscvs-${F_KV}-${CVSDATE}.diff - - # Generic patches we always include - do_generic_patches - - # Machine-specific patches - use ip27 && do_ip27_support - - # Patches for experimental use - do_sekrit_patches - - # Security Fixes - do_security_patches - - - # All done, resume normal portage work - kernel_universal_unpack -} - - -src_install() { - use ip27 && rename_source_tree ip27 - - kernel_src_install -} - -pkg_postinst() { - local my_ksrc="${S##*/}" - use ip27 && my_ksrc="${my_ksrc}.ip27" - - if [ ! -e ${ROOT}usr/src/linux ]; then - rm -f ${ROOT}usr/src/linux - ln -sf ${my_ksrc} ${ROOT}/usr/src/linux - fi -} - - -#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-2.6.13.4.ebuild b/sys-kernel/mips-sources/mips-sources-2.6.13.5.ebuild index 9a5bf20f99fc..9232e1d5195f 100644 --- a/sys-kernel/mips-sources/mips-sources-2.6.13.4.ebuild +++ b/sys-kernel/mips-sources/mips-sources-2.6.13.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.13.4.ebuild,v 1.1 2005/10/16 02:31:27 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.13.5.ebuild,v 1.1 2005/12/20 18:10:41 kumba Exp $ # INCLUDED: @@ -53,7 +53,7 @@ IUSE="cobalt ip27 ip28 ip30" if [ "${USERC}" = "yes" ]; then KVXY="$(get_version_component_range 1-2)" # Kernel Major/Minor KVZ="$(get_version_component_range 3)" # Kernel Revision Pt. 1 - KVRC="${get_version_component_range 4}" # Kernel RC + KVRC="$(get_version_component_range 4)" # Kernel RC F_KV="$(get_version_component_range 1-3)" STABLEVER="${KVXY}.$((${KVZ} - 1))" # Last stable version (Rev - 1) PATCHVER="mirror://kernel/linux/kernel/v2.6/testing/patch-${OKV}.bz2" @@ -107,26 +107,26 @@ pkg_setup() { # See if we're using IP27 (Origin) if use ip27; then - echo -e "" - eerror "SGI Origin (IP27) Support has been disabled in this ebuild" - eerror "revision. If you wish to merge IP27 sources, then" - eerror "run USE=\"ip27\" emerge =mips-sources-2.6.12.5" - die "IP27 Support disabled." -# if [ "${arch_is_selected}" = "no" ]; then -# echo -e "" -# einfo "IP27 support can be considered a game of Russian Roulette. It'll work" -# einfo "great for some but not for others. It also uses some rather horrible" -# einfo "hacks to get going -- hopefully these will be repaired in the future." -# echo -e "" -# ewarn "Please keep all kittens and any other small, cute, and fluffy creatures" -# ewarn "away from an IP27 Box running these sources. Failure to do so may cause" -# ewarn "the IP27 to consume the hapless creature. Consider this your only" -# ewarn "warning regarding the experimental nature of this particular machine." -# echo -e "" -# arch_is_selected="yes" -# else -# err_only_one_arch_allowed -# fi +# echo -e "" +# eerror "SGI Origin (IP27) Support has been disabled in this ebuild" +# eerror "revision. If you wish to merge IP27 sources, then" +# eerror "run USE=\"ip27\" emerge =mips-sources-2.6.12.5" +# die "IP27 Support disabled." + if [ "${arch_is_selected}" = "no" ]; then + echo -e "" + einfo "IP27 support can be considered a game of Russian Roulette. It'll work" + einfo "great for some but not for others. It also uses some rather horrible" + einfo "hacks to get going -- hopefully these will be repaired in the future." + echo -e "" + ewarn "Please keep all kittens and any other small, cute, and fluffy creatures" + ewarn "away from an IP27 Box running these sources. Failure to do so may cause" + ewarn "the IP27 to consume the hapless creature. Consider this your only" + ewarn "warning regarding the experimental nature of this particular machine." + echo -e "" + arch_is_selected="yes" + else + err_only_one_arch_allowed + fi fi @@ -274,6 +274,7 @@ do_ip27_support() { einfo ">>> Patching kernel for SGI Origin (IP27) support ..." epatch ${MIPS_PATCHES}/misc-2.6.13-ioc3-metadriver-r25.patch epatch ${MIPS_PATCHES}/misc-2.6.13-ip27-horrible-hacks_may-eat-kittens.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-ip27-rev-pci-tweak.patch } # SGI Indigo2 Impact R10000 (IP28) diff --git a/sys-kernel/mips-sources/mips-sources-2.6.14.4.ebuild b/sys-kernel/mips-sources/mips-sources-2.6.14.4.ebuild new file mode 100644 index 000000000000..629dccaad308 --- /dev/null +++ b/sys-kernel/mips-sources/mips-sources-2.6.14.4.ebuild @@ -0,0 +1,401 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/mips-sources-2.6.14.4.ebuild,v 1.1 2005/12/20 18:10:41 kumba Exp $ + + +# INCLUDED: +# 1) linux sources from kernel.org +# 2) linux-mips.org CVS snapshot diff from 14 Sep 2005 +# 3) Generic Fixes +# 4) Security fixes +# 5) Patch for IP30 Octane Support (http://www.linux-mips.org/~skylark/) +# 5) Patch for IP28 Octane Support (http://home.alphastar.de/fuerst/download.html) +# 6) Patch for Remaining Cobalt Bits (http://www.colonel-panic.org/cobalt-mips/) +# 7) Experimental patches (IP27 hacks, et al) + + +#//------------------------------------------------------------------------------ + + + +# Version Data +OKV=${PV/_/-} +CVSDATE="20051030" # Date of diff between kernel.org and lmo CVS +SECPATCHVER="1.15" # Tarball version for security patches +GENPATCHVER="1.15" # Tarball version for generic patches +EXTRAVERSION="-mipsgit-${CVSDATE}" +KV="${OKV}${EXTRAVERSION}" +F_KV="${OKV}" # Fetch KV, used to know what mipsgit diff to grab. +STABLEVER="${F_KV}" # Stable Version (2.6.x) +PATCHVER="" +USERC="no" # If set to "yes", then attempt to use an RC kernel +USEPNT="yes" # If set to "yes", then attempt to use a point-release (2.6.x.y) + +# Directories +S="${WORKDIR}/linux-${OKV}-${CVSDATE}" +MIPS_PATCHES="${WORKDIR}/mips-patches" +MIPS_SECURITY="${WORKDIR}/security" + +# Inherit Eclasses +ETYPE="sources" +inherit kernel eutils versionator + +# Portage Vars +HOMEPAGE="http://www.linux-mips.org/ http://www.gentoo.org/" +SLOT="${OKV}" +PROVIDE="virtual/linux-sources virtual/alsa" +KEYWORDS="-* mips" +IUSE="cobalt ip27 ip28 ip30" + + +# If USERC == "yes", use a release candidate kernel (2.6.X-rcY) +# Do not set this to "yes" if using a point-release kernel +if [ "${USERC}" = "yes" ]; then + KVXY="$(get_version_component_range 1-2)" # Kernel Major/Minor + KVZ="$(get_version_component_range 3)" # Kernel Revision Pt. 1 + KVRC="$(get_version_component_range 4)" # Kernel RC + F_KV="$(get_version_component_range 1-3)-${KVRC}" + STABLEVER="${KVXY}.$((${KVZ} - 1))" # Last stable version (Rev - 1) + PATCHVER="mirror://kernel/linux/kernel/v2.6/testing/patch-${OKV}.bz2" + EXTRAVERSION="-${KVRC}-mipsgit-${CVSDATE}" + KV="${OKV}-${EXTRAVERSION}" +fi + +# If USEPNT == "yes", use a point release kernel (2.6.x.y) +# Do not set this to "yes" if using a release candidate kernel +if [ "${USEPNT}" = "yes" ]; then + F_KV="$(get_version_component_range 1-3)" # Get Maj/Min/Rev (x.y.z) + STABLEVER="${F_KV}" # Last Revision release + PATCHVER="mirror://kernel/linux/kernel/v2.6/patch-${OKV}.bz2" # Patch for new point release + EXTRAVERSION=".$(get_version_component_range 4)-mipsgit-${CVSDATE}" + KV="${OKV}${EXTRAVERSION}" +fi + + +DESCRIPTION="Linux-Mips CVS sources for MIPS-based machines, dated ${CVSDATE}" +SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${STABLEVER}.tar.bz2 + mirror://gentoo/mipsgit-${F_KV}-${CVSDATE}.diff.bz2 + mirror://gentoo/${PN}-security_patches-${SECPATCHVER}.tar.bz2 + mirror://gentoo/${PN}-generic_patches-${GENPATCHVER}.tar.bz2 + ${PATCHVER}" + + + +#//------------------------------------------------------------------------------ + + + +# Error message +err_only_one_arch_allowed() { + echo -e "" + eerror "A patchset for a specific machine-type has already been selected." + eerror "No other patches for machines-types are permitted. You will need a" + eerror "separate copy of the kernel sources for each different machine-type" + eerror "you want to build a kernel for." + die "Only one machine-type patchset allowed" +} + + +# Check our USE flags for machine-specific flags and give appropriate warnings. +# Hope the user isn't crazy enough to try using combinations of these flags. +# Only use one machine-specific flag at a time for each type of desired machine-support. +# +# Affected machines: ip27 ip28 ip30 +# Not Affected: cobalt ip22 ip32 +pkg_setup() { + local arch_is_selected="no" + + # See if we're using IP27 (Origin) + if use ip27; then +# echo -e "" +# eerror "SGI Origin (IP27) Support has been disabled in this ebuild" +# eerror "revision. If you wish to merge IP27 sources, then" +# eerror "run USE=\"ip27\" emerge =mips-sources-2.x.y.z" +# die "IP27 Support disabled." + if [ "${arch_is_selected}" = "no" ]; then + echo -e "" + einfo "IP27 support can be considered a game of Russian Roulette. It'll work" + einfo "great for some but not for others. It also uses some rather horrible" + einfo "hacks to get going -- hopefully these will be repaired in the future." + echo -e "" + ewarn "Please keep all kittens and any other small, cute, and fluffy creatures" + ewarn "away from an IP27 Box running these sources. Failure to do so may cause" + ewarn "the IP27 to consume the hapless creature. Consider this your only" + ewarn "warning regarding the experimental nature of this particular machine." + echo -e "" + arch_is_selected="yes" + else + err_only_one_arch_allowed + fi + fi + + + # See if we're using IP28 (Indigo2 Impact R10000) + if use ip28; then + if [ "${arch_is_selected}" = "no" ]; then + echo -e "" + einfo "Support for the Indigo2 Impact R10000 is very experimental. If you do not" + einfo "have a clue in the world about what an IP28 is, what the mips architecture" + einfo "is about, or are new to Gentoo, then it is highly advised that you steer" + einfo "clear of messing with this machine. Due to the experimental nature of this" + einfo "particular class of system, we have to provide such warnings, as it is only" + einfo "for use by those who know what they are doing." + echo -e "" + einfo "Be advised that attempting to run Gentoo/Linux (or any Linux distro) on this" + einfo "system may cause the sudden, unexplained disappearence of any nearby furry" + einfo "creatures. So please keep any and all small pets away from this system at" + einfo "all times." + echo -e "" + ewarn "That said, support for this system REQUIRES that you use the ip28 cascade" + ewarn "profile (default-linux/mips/mips64/ip28/XXXX.Y), because a very special" + ewarn "patch is used on the system gcc, kernel-gcc (gcc-mips64) and the kernel" + ewarn "itself in order to support this machine. These patches will only be applied" + ewarn "if \"ip28\" is defined in USE, which the profile sets. If you wish to" + ewarn "cross-compile a kernel, you _must_ make sure that the \"ip28\" USE is" + ewarn "defined in your host system's /etc/make.conf file before using crossdev" + ewarn "to build a mips64 kernel compiler for this system." + echo -e "" + ewarn "As a final warning, _nothing_ is guaranteed to work smoothly." + echo -e "" + arch_is_selected="yes" + else + err_only_one_arch_allowed + fi + fi + + + # See if we're using IP30 (Octane) + if use ip30; then + if [ "${arch_is_selected}" = "no" ]; then + echo -e "" + einfo "Things to keep in mind when building a kernel for an SGI Octane:" + einfo "\t- The scsi driver to use is qla1280; qlogicisp is gone." + einfo "\t- Impact (MGRAS) console and X driver work, please report any bugs." + einfo "\t- VPro (Odyssey) console works, but no X driver exists yet." + einfo "\t- PCI Card Cages should work for many devices, except certain types like" + einfo "\t PCI-to-PCI bridges (USB hubs, USB flash card readers for example)." + einfo "\t- Other XIO-based devices like MENET and various Impact addons remain" + einfo "\t untested and are not guaranteed to work. This applies to various" + einfo "\t digital video conversion boards as well." + echo -e "" + arch_is_selected="yes" + else + err_only_one_arch_allowed + fi + fi + + + # See if we're on a cobalt system (must use the cobalt-mips profile) + if use cobalt; then + echo -e "" + einfo "Please keep in mind that the 2.6 kernel will NOT boot on Cobalt" + einfo "systems that are still using the old Cobalt bootloader. In" + einfo "order to boot a 2.6 kernel on Cobalt systems, you must be using" + einfo "the CoLo bootloader, which does not have the kernel" + einfo "size limitation that the older bootloader has. If you want" + einfo "to use the newer bootloader, make sure you have sys-boot/colo" + einfo "installed and setup." + echo -e "" + arch_is_selected="yes" + fi + + + # All other systems + if [ "${arch_is_selected}" = "no" ]; then + echo -e "" + einfo "IP22 systems should work well with this release, however, R4600" + einfo "setups may still experience bugs. Please report any encountered" + einfo "problems. Additionally, only the Newport (XL) graphics card" + einfo "functions. A driver for the Extreme (XZ) card is in the works," + einfo "but has not been released by its author yet for public consumption." + echo -e "" + einfo "IP32 systems function well, however there exists no sound card" + einfo "support yet for these systems." + echo -e "" + fi +} + + + +#//------------------------------------------------------------------------------ + + + +# Generic Patches - Safe to use globally +do_generic_patches() { + echo -e "" + ebegin ">>> Generic Patches" + # IP22 Patches + epatch ${MIPS_PATCHES}/misc-2.6.11-ip22-chk-consoleout-is-serial.patch + + # IP32 Patches (Safe for non-IP32 use) + epatch ${MIPS_PATCHES}/misc-2.6.12-ip32-onion2-gbefb-fixes.patch + epatch ${MIPS_PATCHES}/misc-2.6.10-ip32-tweak-makefile.patch + epatch ${MIPS_PATCHES}/misc-2.6.11-ip32-mace-is-always-eth0.patch + epatch ${MIPS_PATCHES}/misc-2.6.12-ip32-stupid-gbefb-typo.patch + + # Cobalt Patches (Safe for non-Cobalt use) + epatch ${MIPS_PATCHES}/misc-2.6.14-cobalt-bits.patch + + # Generic + epatch ${MIPS_PATCHES}/misc-2.6.14-ths-mips-tweaks.patch + epatch ${MIPS_PATCHES}/misc-2.6.13-add-ramdisk-back.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-mips-iomap-functions.patch + epatch ${MIPS_PATCHES}/misc-2.6.12-seccomp-no-default.patch + epatch ${MIPS_PATCHES}/misc-2.6.11-add-byteorder-to-proc.patch + epatch ${MIPS_PATCHES}/misc-2.6.13-n32-fix-sigsuspend.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-r14k-cpu-prid-r2.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-add-4k_cache_defines.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-r1xk_use_r4k_cache.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-rem-UL-constants.patch + + # Ugly Hacks + if ! use ip28 && ! use ip30; then + epatch ${MIPS_PATCHES}/misc-2.6.13-ugly-wrong-kphysaddr-hack.patch + fi + eend +} + + +# NOT safe for production systems +# Use at own risk, do _not_ file bugs on effects of these patches +do_sekrit_patches() { + # /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ + + # No Sekrit Patches! + sleep 0 + + # /* EXPERIMENTAL - DO NOT USE IN PRODUCTION KERNELS */ +} + + +do_security_patches() { + echo -e "" + ebegin ">>> Applying Security Fixes" + einfo ">>> None to apply! ..." + echo -e "" +## epatch ${MIPS_SECURITY}/ + eend +} + + + +#//------------------------------------------------------------------------------ + + + +# These patches are separate from generic patches for a good reason - namely because it is +# possible (but untested) that patches for one machine-type may conflict with patches from +# another machine type and therefore produce unwanted side-effects. We therefore enforce +# this by checking if an arch patch has already been applied, and if so, error out. + +# SGI Origin (IP27) +do_ip27_support() { + echo -e "" + einfo ">>> Patching kernel for SGI Origin (IP27) support ..." + epatch ${MIPS_PATCHES}/misc-2.6.14-ioc3-metadriver-r26.patch + epatch ${MIPS_PATCHES}/misc-2.6.13-ip27-horrible-hacks_may-eat-kittens.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-ip27-rev-pci-tweak.patch +} + +# SGI Indigo2 Impact R10000 (IP28) +do_ip28_support() { + echo -e "" + einfo ">>> Patching kernel for SGI Indigo2 Impact R10000 (IP28) support ..." + epatch ${MIPS_PATCHES}/misc-2.6.14-ip28-i2_impact-support.patch +} + + +# SGI Octane 'Speedracer' (IP30) +do_ip30_support() { + echo -e "" + einfo ">>> Patching kernel for SGI Octane (IP30) support ..." + epatch ${MIPS_PATCHES}/misc-2.6.14-ioc3-metadriver-r26.patch + epatch ${MIPS_PATCHES}/misc-2.6.14-ip30-octane-support-r27.patch +} + + + +#//------------------------------------------------------------------------------ + + + +# Renames source trees for the few machines that we have separate patches for +rename_source_tree() { + if [ ! -z "${1}" ]; then + if use ${1}; then + mv ${S} ${S}.${1} + S="${S}.${1}" + fi + fi +} + + + +#//------------------------------------------------------------------------------ + + + +src_unpack() { + unpack ${A} + mv ${WORKDIR}/linux-${STABLEVER} ${WORKDIR}/linux-${OKV}-${CVSDATE} + cd ${S} + + + # If USERC == "yes", use a release candidate kernel (2.6.x-rcy) + # OR + # if USEPNT == "yes", use a point-release kernel (2.6.x.y) + if [ "${USERC}" = "yes" -o "${USEPNT}" = "yes" ]; then + echo -e "" + einfo ">>> linux-${STABLEVER} --> linux-${OKV} ..." + epatch ${WORKDIR}/patch-${OKV} + fi + + + # Update the vanilla sources with linux-mips CVS changes + echo -e "" + einfo ">>> linux-${OKV} --> linux-${OKV}-${CVSDATE} patch ..." + epatch ${WORKDIR}/mipsgit-${F_KV}-${CVSDATE}.diff + + # Generic patches we always include + do_generic_patches + + # Machine-specific patches + use ip27 && do_ip27_support + use ip28 && do_ip28_support + use ip30 && do_ip30_support + + # Patches for experimental use + do_sekrit_patches + + # Security Fixes + do_security_patches + + + # All done, resume normal portage work + kernel_universal_unpack +} + + +src_install() { + use ip27 && rename_source_tree ip27 + use ip28 && rename_source_tree ip28 + use ip30 && rename_source_tree ip30 + + kernel_src_install +} + +pkg_postinst() { + local my_ksrc="${S##*/}" + use ip27 && my_ksrc="${my_ksrc}.ip27" + use ip28 && my_ksrc="${my_ksrc}.ip28" + use ip30 && my_ksrc="${my_ksrc}.ip30" + + if [ ! -e ${ROOT}usr/src/linux ]; then + rm -f ${ROOT}usr/src/linux + ln -sf ${my_ksrc} ${ROOT}/usr/src/linux + fi +} + + +#//------------------------------------------------------------------------------ |