sys-kernel/mips-sources: Update LTS kernels, add 4.20.x
authorJoshua Kinard <kumba@gentoo.org>
Sun, 13 Oct 2019 04:05:17 +0000 (00:05 -0400)
committerJoshua Kinard <kumba@gentoo.org>
Sun, 13 Oct 2019 04:05:17 +0000 (00:05 -0400)
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Package-Manager: Portage-2.3.76, Repoman-2.3.17

sys-kernel/mips-sources/Manifest
sys-kernel/mips-sources/mips-sources-4.14.149.ebuild [moved from sys-kernel/mips-sources/mips-sources-4.14.148.ebuild with 100% similarity]
sys-kernel/mips-sources/mips-sources-4.19.79.ebuild [moved from sys-kernel/mips-sources/mips-sources-4.19.78.ebuild with 99% similarity]
sys-kernel/mips-sources/mips-sources-4.20.17.ebuild [new file with mode: 0644]

index cd4545198b274da7ccb6fc89dfe118109e1ed5a7..cf627af4f645b1d768afd52a49e050799b16da25 100644 (file)
@@ -1,19 +1,22 @@
 DIST linux-4.14.tar.xz 100770500 BLAKE2B 85dc4aa953fe65e273a24473d8de98e4f204f97c43be9fc87cf5be01f796f94cfde5c8f9c84619751f1cac51f83ce0b4681fb19c5f2965a72d4a94fe5577846a SHA512 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8
 DIST linux-4.18.tar.xz 101781564 BLAKE2B 138bdc49dc8871e5566b5e23a9e5ed0e68fff480a7a04fc659a9efe2d4bcc778ac01368a32bc5d1dbde870102ce7294b9d315f81c4e6e762ee781135e83033f2 SHA512 950eb85ac743b291afe9f21cd174d823e25f11883ee62cecfbfff8fe8c5672aae707654b1b8f29a133b1f2e3529e63b9f7fba4c45d6dacccc8000b3a9a9ae038
 DIST linux-4.19.tar.xz 103117552 BLAKE2B 1dbf16cf410867412d17568fe42bc1e90c034183b654d270b650621ff7664a321950943d0639205bc1ee7ef6210be170c1f2c785a042ed8a4ec5e3a486d890e0 SHA512 ab67cc746b375a8b135e8b23e35e1d6787930d19b3c26b2679787d62951cbdbc3bb66f8ededeb9b890e5008b2459397f9018f1a6772fdef67780b06a4cb9f6f4
+DIST linux-4.20.tar.xz 104257836 BLAKE2B fb52cad2897da319299486fa8c3b9415cd0aee0842dbf353a5b269720dcb902db407bb55dd95a77b212dcb4a488c15363d561f3649d6bd16885561f2466d90b1 SHA512 e282399beea5da539701aed2bc131abd5bc74a970dcd344163e9d295106dfd700180e672ed546ae5e55bc6b9ac95efd5ca1de2039015c1b7a6fc9c01ea6583d4
 DIST linux-4.4.tar.xz 87295988 BLAKE2B f260f1858994f5d481fd078c86e51bddbc958f7c5d1586f60dced772e1b1107ecf3aae0558c3e6f39c36f7d3aa1e6cd1e5c64ec9d6f2218f47b98413da6466fb SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e
 DIST linux-4.9.tar.xz 93192404 BLAKE2B 83ae310b17d47f1f18d6d28537c31e10f3e60458c5954c4611158ca99e71cc0da2e051272eabf27d5887df4a7cb4a5dd66ff993077c11d2221e92d300a0b48d7 SHA512 bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a
 DIST mips-sources-4.14.0-patches-v2.tar.xz 287560 BLAKE2B 9fb6b07dcb0336be95c86346e13f68877e891a2c97084ce798e3c39cf57a71832ae4ae5b74a0f60ab6f26ed8f08a35fc3704b34361a8426136055d6fb700dac9 SHA512 e163ed8cdef9a027b55794b168fb4dac77dc871c209463ac8344ef932757d48ce39f44af4ba7312ee27ce04b175a3ea2f6eaa8a7929d6beebcbaa3de4a764cd6
 DIST mips-sources-4.18.0-patches-v2.tar.xz 288096 BLAKE2B 13a9e3a5e4d59357b8747c7143cdd935e39038fcd098d114755f2e4a2ebc52607e9913df9d898824be2135daee7e467587eab219e9dfaabdd7fc266eb3927a5b SHA512 b6a14393fc3cb9cd689d070b5df806773ce8531a4f8214fe24671eba9fbc5075fee70f7a3ea0bbc6c7fdb06a3283c4679386bef4af8206bbc4ad80d83fdd2c27
 DIST mips-sources-4.19.0-patches-v2.tar.xz 289940 BLAKE2B ffca5540cbd663ed3eab3f748dec7727ca6f1abe11ce107fe1780b8191175b77d8c59f70d5e9254f01c43d507f805f081f15bd150f66da1d11e2a91715dcb038 SHA512 c67ac8c6f041a96348a5a6023919fc5586b70b6c3aa52777945d5f1a831e6bd24d867c0318034cf304a3c8f4c6ff0d2af3611b3ad2bc476f3bf3762d39a215f8
+DIST mips-sources-4.20.0-patches-v1.tar.xz 288804 BLAKE2B ce24f1ada58343c9814ae21c4374661c7b07c78b83face7d05082a5c6fe155eb9fa249515ea8292d3a50129baec22f391a364d8c49935ad6bbe779e13f8da747 SHA512 aed1a08766aba3ae27d73dbb392f7ed71dc6ede9141a9d2fad24b738964e6f17fd77b5d9e3022210d6af71652a59f02bb01eaa5a14634490c6720ef5bcf2422b
 DIST mips-sources-4.4.0-patches-v2.tar.xz 156396 BLAKE2B 7b6a50e3768d7d67b525457a8a1b7ed024b3c8762e37734d250478bb0fc4d9d4c76598a45afcd239a5dc1dcf6052c24c69111aeccec11951093396212910c5a9 SHA512 4186ee382037ec32126976ba453f78fc80c627a4ebdd79d8462f12559eb06dce25f926f3c205c7c4e5032cb501942ee10c8cb3a17339352cec3cf565c669dd52
 DIST mips-sources-4.9.0-patches-v2.tar.xz 233540 BLAKE2B afd8c346ee7944edcd4efe7f2baba9a735fd1a883465baffc87681792d5fa8dab1d416ba4b8e52afad439fc8f3b26c00e7b747ed93ea323b30d44121563adbab SHA512 4690ce5e4fbee8610c9a996cfe9d861c101fc2d92af6605e3a0e114c3ae8171db2683e71cb3629f6b65076e6b2c29d2093c12e5afe0cdafb5ebe2517ef0103c1
 DIST mipsgit-4.14.0-20180128.diff.xz 1008 BLAKE2B 2a317ff97aab096883680c6b653e993aee31994e6caec52c52dfbbb61f1dc1f25d03ebd3182fa122923a67aeee0aa598b36e603692333e4c9ccdc741fd456d96 SHA512 378deb1bc1d10a6b4912e5e4a0d6fcab28952e2e59c35fc879601841cf8160081b318a2598ef74db225e95f0f26483f6b9a56a348811b1ee7b8934391dd271ae
 DIST mipsgit-4.18.0-20181112.diff.xz 996 BLAKE2B 4f233173c587bf717229b469a0f25c172a72987bfbd0fc38723ec6483293ae966867274ef1799039fa7c0e2425678df525361e608c6f659edd3c6701406a8603 SHA512 b5abf06bc6d9bb80bd51670885b9639fdd2a489dadbc45b99f221025a2f4bf2e0ec70691c5ee840b1d73d655fad152244b8aa4988eec519389caebff8c93d0d9
 DIST mipsgit-4.4.0-20160123.diff.xz 1908 BLAKE2B a8be92376d1360246359e8d3674fa30727363297d0f3c1f1fa41ad031235fcd59cfca3fa8645d2fd8ab34fcb79b49f622a28eaddd80da76cf23afc05970d7bae SHA512 0086c470064dd4e5c2fefd8161b70200475659fe925e68d374ff139b506147c39163f366be689bbb92a9aaf72e8c58cdaaaff5def6718c5e87ff7e047551a1f8
 DIST mipsgit-4.9.0-20161216.diff.xz 1120 BLAKE2B 1207d943aa39d157cf1ed87918082fe53c26e5342f8249cce1c21b47d38d9a33ec3fb024cb6358cb659e8630e58840d67570be731fb05e9124d86387793e045b SHA512 d1d8d95661d349826e2978d2259df9e30dbd6779a6506fe769dd8e60699e8461920b290a2064a432b8c3bd95888854f4dbcc2ba40929c58f0dd165fcb7894e15
-DIST patch-4.14.148.xz 2914196 BLAKE2B ffda7a0f8f7b41ba75a4cb27053dca6dc36c63ecfa1f49db4855d08a0606741b42f120a875a1daa35276fac2a41e03ae067d81d900393c4fcad1aeaccf69213e SHA512 14c64befeb8989e3afe484487d7b3d81c95d6fa3b8796301614347909abe67844de0a0561a2de1a1fc121b58ece8630d5d0d0b3f4a38e46ece6752d756a41a09
+DIST patch-4.14.149.xz 2925528 BLAKE2B 8429344709030a1b2d5840a727acb86b5a27c91e06962291de54032c9735547c6fe048839c8283211234e26502f9e05acf8114df818fa5f9ebb486057da620b9 SHA512 3935b8508de4b8e27e4cd3486cff402d4ef878b9d5871fed5d0aba260f18d0c25521cac6ded27ec785f69243f7fe2dc474a6a085202ace49b98168566e2256fa
 DIST patch-4.18.20.xz 652212 BLAKE2B 7351cd9ee275fe7687e0260262763faa54fdbec9ec2c6cbc2d8169b900227ab82851ed43f3d1052a6e59b547380a19488dec4e8e64ba2985c0a460dad96124ec SHA512 c44403f5fb71a0dcbc8c39037cfc982d73edc2f411ec9cef0eb0220d422ef369b57e849e9047bea1ca734fa4706483e72c0e91a4be0c31e4df45223b388091d4
-DIST patch-4.19.78.xz 1893264 BLAKE2B b47f22ebe38209087e1aa082531837ba59528ea15bfa397fb791903b78e0fa7bd154b531d8df69a28b30246106773dbec0dd3d547d4c437e675e424540723427 SHA512 8a91021529188175f45edbb4a079f02bfbc16ced15b94ad551ea46e1b517ef3722d053e3f23a17914033605cafc6dff2d19241c4a37af8056dd69f5510a88e1f
+DIST patch-4.19.79.xz 1919600 BLAKE2B 1875b5a9dddfc8927d91bb8c6b179e7f0e992298c72fdf98df025529a4fae00a21025a6db2b367f0cc7a319832300c797760e76c06e57296ea8fcaa175bfd283 SHA512 a1f75d4afef6313e1838bf0ae808e1598501b077581bd45054a52b4caaf63d36fea8dce575d4800a192433ad371d8084b385c93fd4e64d864f706af352f12cb1
+DIST patch-4.20.17.xz 507008 BLAKE2B c8d8141b1e7e2fb81a94b37fb6860e8d6e672f709d5ff97e1d85fe621ba8e54eb3a989372c69e8c521d59ce832a6683326d96229942ee9d749883295088bd10b SHA512 b4cc082504baa13145c201b4bd18ff7ebd4a77358d17d38adc54da1d19d36f125cf9fc6d82296dd1537e91e6b0bc4bcd44b14680b0bf7b45b8963b7f899d390b
 DIST patch-4.4.196.xz 2731404 BLAKE2B 956b3936ad652f0b0cbd5073f8eef4ebedf99d3f30de433e7e7dd2608413d80707fba1c64af5530cca424b41f73c36789b248e4fedd130dc5f0d982b2c10b4d0 SHA512 ab75f8a831f2340958439a8ef0edbdc886b520197993cf213fb6cf7403cb22795206bd040ad4b03a591231b02f4a5f4836dc5436f056fc7457d54e869fc9d113
 DIST patch-4.9.196.xz 3000048 BLAKE2B 3fb9f0e28caddc503673a6446ca20d19705d1941405d61a04d7136949896b89c03ba047815df8cb85ce913e9ef6343ccb4050719942e9c44fc1d363d3eaff318 SHA512 58fe22808bde31532d57ea9447fcad326ca3e9b06d4f0243d8671a431b97c3d2e56315fb10c1f9305803ef71df11e7689441e9daa9a3c0f90fdfb200e7e1d50e
similarity index 99%
rename from sys-kernel/mips-sources/mips-sources-4.19.78.ebuild
rename to sys-kernel/mips-sources/mips-sources-4.19.79.ebuild
index 48845501865360b4efee9b17edbc3273e795920a..9091645617a873a8b848bd34e0ef464fead5fd0b 100644 (file)
@@ -318,6 +318,7 @@ src_unpack() {
        for x in {ip27,ip28,ip30}; do
                use ${x} && v="${v}.${x}" && break
        done
+
        local old="${WORKDIR}/linux-${fkv/_/-}"
        local new="${WORKDIR}/linux-${v}"
        if [ "${old}" != "${new}" ]; then
diff --git a/sys-kernel/mips-sources/mips-sources-4.20.17.ebuild b/sys-kernel/mips-sources/mips-sources-4.20.17.ebuild
new file mode 100644 (file)
index 0000000..b03ad9c
--- /dev/null
@@ -0,0 +1,344 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# EAPI Version
+EAPI="6"
+
+#//------------------------------------------------------------------------------
+
+# Version Data
+GENPATCHREV="1"                                # Tarball revision for patches
+
+# Directories
+S="${WORKDIR}/linux-${OKV}"
+MIPS_PATCHES="${WORKDIR}/mips-patches"
+
+# Kernel-2 Vars
+K_SECURITY_UNSUPPORTED="yes"
+K_NOUSENAME="yes"
+K_NOSETEXTRAVERSION="yes"
+K_NOUSEPR="yes"
+K_BASE_VER="4.19"
+K_FROM_GIT="yes"
+ETYPE="sources"
+
+# Inherit Eclasses
+inherit kernel-2 eutils eapi7-ver
+detect_version
+
+# Version Data
+F_KV="${PVR}"
+BASE_KV="$(ver_cut 1-2).0"
+[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}"
+
+# Portage Vars
+HOMEPAGE="https://www.kernel.org/ https://www.linux-mips.org/ https://www.gentoo.org/"
+KEYWORDS="-* ~mips"
+IUSE="experimental ip27 ip28 ip30"
+RDEPEND=""
+DEPEND="${RDEPEND}
+       >=sys-devel/gcc-6.5.0
+       >=sys-devel/patch-2.7.6"
+
+# Specify any patches or patch familes to NOT apply here.
+# Use only the 4-digit number followed by a '*'.
+P_EXCLUDE=""
+
+# Machine Support Control Variables
+DO_IP22="test"                         # If "yes", enable IP22 support         (SGI Indy, Indigo2 R4x00)
+DO_IP27="yes"                          #                  IP27 support         (SGI Origin)
+DO_IP28="test"                         #                  IP28 support         (SGI Indigo2 Impact R10000)
+DO_IP30="yes"                          #                  IP30 support         (SGI Octane)
+DO_IP32="yes"                          #                  IP32 support         (SGI O2, R5000/RM5200 Only)
+
+# Machine Stable Version Variables
+SV_IP22=""                             # If set && DO_IP22 == "no", indicates last "good" IP22 version
+SV_IP27=""                             #           DO_IP27 == "no",                       IP27
+SV_IP28=""                             #           DO_IP28 == "no",                       IP28
+SV_IP30=""                             #           DO_IP30 == "no",                       IP30
+SV_IP32=""                             #           DO_IP32 == "no",                       IP32
+
+DESCRIPTION="Kernel.org sources for MIPS-based machines"
+SRC_URI="${KERNEL_URI}
+        mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz"
+
+#//------------------------------------------------------------------------------
+
+err_disabled_mach() {
+       # Get args
+       local m_name="${1}"
+       local m_abbr="${2}"
+       local m_use="${3}"
+       local is_test="${4}"
+
+       # Get stable version, if exists
+       local stable_ver="SV_${m_abbr}"
+       stable_ver="${!stable_ver}"
+
+       # See if this machine needs a USE passed or skip dying
+       local has_use
+       [ ! -z "${m_use}" -a "${m_use}" != "skip" ] && has_use="USE=\"${m_use}\" "
+
+       # Print error && (maybe) die
+       echo -e ""
+       if [ "${is_test}" != "test" ]; then
+               eerror "${m_name} Support has been disabled in this ebuild"
+               eerror "revision.  If you wish to merge ${m_name} sources, then"
+               eerror "run ${has_use}emerge =mips-sources-${stable_ver}"
+               [ "${m_use}" != "skip" ] && die "${m_name} Support disabled."
+       else
+               ewarn "${m_name} Support has been marked as needing testing in this"
+               ewarn "ebuild revision.  This usually means that any patches to support"
+               ewarn "${m_name} have been forward ported and maybe even compile-tested,"
+               ewarn "but not yet booted on real hardware, possibly due to a lack of access"
+               ewarn "to such hardware.  If you happen to boot this kernel and have no"
+               ewarn "problems at all, then please inform the maintainer.  Otherwise, if"
+               ewarn "experience a bug, an oops/panic, or some other oddity, then please"
+               ewarn "file a bug at bugs.gentoo.org, and assign it to the mips team."
+       fi
+
+       return 0
+}
+
+err_only_one_mach_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"
+}
+
+pkg_postinst() {
+       # Symlink /usr/src/linux as appropriate
+       local my_ksrc="${S##*/}"
+       for x in {ip27,ip28,ip30}; do
+               use ${x} && my_ksrc="${my_ksrc}.${x}"
+       done
+
+       if [ ! -e "${ROOT}usr/src/linux" ]; then
+               rm -f "${ROOT}usr/src/linux"
+               ln -sf "${my_ksrc}" "${ROOT}/usr/src/linux"
+       fi
+}
+
+pkg_setup() {
+       local arch_is_selected="no"
+       local m_ip m_enable m_name
+
+       # Exclusive machine patchsets
+       # These are not allowed to be mixed together, thus only one of them may be applied
+       # to a tree per merge.
+       for x in                                                                        \
+               "ip27 SGI Origin 200/2000"                                              \
+               "ip28 SGI Indigo2 Impact R10000"                                        \
+               "ip30 SGI Octane"
+       do
+               set -- ${x}             # Set positional params
+               m_ip="${1}"             # Grab the first param (HW IP for SGI)
+               shift                   # Shift the positions
+               m_name="${*}"           # Get the rest (Name)
+
+               if use ${m_ip}; then
+                       # Fetch the value indiciating if the machine is enabled or not
+                       m_enable="DO_${m_ip/ip/IP}"
+                       m_enable="${!m_enable}"
+
+                       # Make sure only one of these exclusive machine patches is selected
+                       [ "${arch_is_selected}" = "no" ]                                \
+                               && arch_is_selected="yes"                               \
+                               || err_only_one_mach_allowed
+
+                       # Is the machine support disabled or marked as needing testing?
+                       [ "${m_enable}" = "test" ]                                      \
+                               && err_disabled_mach "${m_name}" "${m_ip/ip/IP}" "${m_ip}" "test"
+                       [ "${m_enable}" = "no" ]                                        \
+                               && err_disabled_mach "${m_name}" "${m_ip/ip/IP}" "${m_ip}"
+
+                       # Show relevant information about the machine
+                       show_${m_ip}_info
+               fi
+       done
+
+       # All other systems that don't have a USE flag go here
+       # These systems have base-line support included in linux-mips git, so
+       # instead of failing, if disabled, we simply warn the user
+       if [ "${arch_is_selected}" = "no" ]; then
+               [ "${DO_IP22}" = "no" ]                                                 \
+                       && err_disabled_mach "SGI Indy/Indigo2 R4x00" "IP22" "skip"     \
+                       || show_ip22_info
+               [ "${DO_IP32}" = "no" ]                                                 \
+                       && err_disabled_mach "SGI O2" "IP32" "skip"                     \
+                       || show_ip32_info
+
+       fi
+}
+
+show_ip22_info() {
+       echo -e ""
+       einfo "IP22 systems with an R5000 processor should work with this release."
+       einfo "The R4x00 series of processors tend to be rather flaky, especially the"
+       einfo "R4600.  If you have to run an R4x00 processor, then try to use an R4400."
+       einfo ""
+       einfo "Some Notes:"
+       einfo "\t- Supported graphics card right now is Newport (XL)."
+       einfo "\t- A driver for Extreme (XZ) does not exist at present."
+       echo -e ""
+}
+
+show_ip27_info() {
+       echo -e ""
+       ewarn "IP27 Origin 2k/Onyx2 systems may be prone to sudden hard lockups."
+       ewarn "The exact trigger is unknown at this time."
+       echo -e ""
+}
+
+show_ip28_info() {
+       echo -e ""
+       einfo "Support for the Indigo2 Impact R10000 is now in the mainline kernel.  However,"
+       einfo "due to the R10000 Speculative Execution issue that exists with this machine,"
+       einfo "nothing is guaranteed to work correctly.  Consider enabling ${HILITE}CONFIG_KALLSYMS${NORMAL}"
+       einfo "in your kernel so that if the machine Oopes, you'll be able to provide valuable"
+       einfo "feedback that can be used to trace down the crash."
+       echo -e ""
+}
+
+show_ip30_info() {
+       echo -e ""
+       eerror "Things that DON'T work:"
+       eerror "\t- Do not use CONFIG_SLUB, otherwise, you'll get errors when booting"
+       eerror "\t\040\040regarding duplicate /sys/kernel/slab/* entries in sysfs."
+       eerror "\t- Impact (MGRAS) Xorg driver no longer functions due to severe bitrot."
+       eerror "\t- Octane is limited to a maximum of 2GB of memory right now due to a"
+       eerror "\t\040\040hardware quirk in the BRIDGE PCI chip that limits BRIDGE DMA"
+       eerror "\t\040\040addresses to 31-bits when converted into physical addresses."
+       eerror "\t\040\040Patches that attempt to fix the issue are highly welcome."
+       echo -e ""
+       ewarn "Things that might work, but have problems, or are unknown:"
+       ewarn "\t- CONFIG_TRANSPARENT_HUGEPAGE should work now, but there may still be"
+       ewarn "\t\040\040intermittent issues.  Additionally, CONFIG_HUGETLBFS must also be"
+       ewarn "\t\040\040selected for hugepages to work.  If use of this feature continues"
+       ewarn "\t\040\040to trigger random Instruction Bus Errors (IBEs), then it is best to"
+       ewarn "\t\040\040disable the functionality and perform a cold reset of the machine"
+       ewarn "\t\040\040after powering it down for at least 30 seconds."
+       ewarn "\t- Serial support on the Octane uses a very basic UART driver that drives"
+       ewarn "\t\040\040the 16550A chip on the IOC3 directly.  It does not use interrupts,"
+       ewarn "\t\040\040only a polling routine on a timer, which makes it slow and CPU-"
+       ewarn "\t\040\040intensive.  The baud rate is limited to no more than 38.4kbps on"
+       ewarn "\t\040\040this driver.  Patches for getting the Altix IOC3 serial driver to"
+       ewarn "\t\040\040work (which uses DMA and supports faster baud rates) are welcome."
+       ewarn "\t- UHCI Cards are known to have issues, but should still function."
+       ewarn "\t\040\040This issue primarily manifests itself when using pl2303 USB->Serial"
+       ewarn "\t\040\040adapters."
+       ewarn "\t- MENET boards appear to have the four ethernet ports detected, however"
+       ewarn "\t\040\040the six serial ports don't appear to get picked up by the IOC3"
+       ewarn "\t\040\040UART driver.  The NIC part number is also not read correctly"
+       ewarn "\t\040\040from the four Number-In-a-Cans.  Additional testing would be"
+       ewarn "\t\040\040appreciated and patches welcome."
+       ewarn "\t- Other XIO-based devices, like various Impact addons, remain untested"
+       ewarn "\t\040\040and are not guaranteed to work.  This applies to various digital"
+       ewarn "\t\040\040video conversion boards as well."
+       echo -e ""
+       einfo "Things that DO work:"
+       einfo "\t- SMP works again, celebrate!"
+       einfo "\t- Impact (MGRAS) console only."
+       einfo "\t- VPro (Odyssey) console only (no X driver exists yet)."
+       einfo "\t- PCI Card Cages should work for many devices, except certain types like"
+       einfo "\t\040\040PCI-to-PCI bridges (USB hubs, USB flash card readers for example)."
+       einfo "\t- SCSI, RTC, basic PCI, IOC3 Ethernet, keyboard, and mouse.  Please"
+       einfo "\t\040\040report any problems with these devices."
+       echo -e ""
+}
+
+show_ip32_info() {
+       echo -e ""
+       einfo "IP32 systems function well, however there are some notes:"
+       einfo "\t- A sound driver now exists for IP32.  Celebrate!"
+       einfo "\t- Framebuffer console is limited to 4MB.  Anything greater"
+       einfo "\t\040\040specified when building the kernel will likely oops"
+       einfo "\t\040\040or panic the kernel."
+       einfo "\t- X support is limited to the generic fbdev driver.  No X"
+       einfo "\t\040\040gbefb driver exists for O2 yet.  Feel free to submit"
+       einfo "\t\040\040patches!"
+       echo -e ""
+
+       einfo "To Build 64bit kernels for SGI O2 (IP32) or SGI Indy/Indigo2 R4x00 (IP22)"
+       einfo "systems, you need to use the ${GOOD}vmlinux.32${NORMAL} make target."
+       einfo "Once done, boot the ${GOOD}vmlinux.32${NORMAL} file (NOT vmlinux)."
+}
+
+src_unpack() {
+       # Unpack the kernel sources, update to the latest rev (if needed),
+       # and apply the latest patch from linux-mips git.
+       kernel-2_src_unpack
+
+       # Unpack the mips-sources patchset to ${WORKDIR}/mips-patches-${BASE_KV}.
+       echo -e ""
+       cd "${WORKDIR}"
+       unpack "${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz"
+
+       # Create a new folder called 'patch-symlinks' and create symlinks to
+       # all mips-patches in there.  If we want to exclude a patch, we'll
+       # just delete the symlink instead of the actual patch.
+       local psym="patch-symlinks"
+       mkdir "${psym}"
+       cd "${psym}"
+       for x in ../mips-patches-${BASE_KV}/*.patch; do
+               ln -s "${x}" "${x##../mips-patches-*/}"
+       done
+
+       # With symlinks created, setup the variables referencing external
+       # machine patches and if a machine USE flag is enabled, then unset
+       # its corresponding variable.
+       # See 0000_README for the patch numbers and their meanings.
+       local p_generic="51*"
+       local p_ip27="52*" p_ip28="53*" p_ip30="54*"
+       local p_xp="80*"
+       use ip27 && unset p_generic p_ip27
+       use ip28 && unset p_ip28
+       use ip30 && unset p_generic p_ip30
+       use experimental && unset p_xp
+
+       # Remove symlinks for any patches that we don't want applied.  We
+       # do this by looping through all the above variables, and deleting
+       # matching symlinks that point to the corresponding patches.
+       # The remaining symlinks will be applied to the kernel source.
+       #
+       # $P_EXCLUDE is a new var that can be set in an ebuild to exclude
+       # specific patches by wildcarding the patch number.
+       local patchlist="${p_generic} ${p_ip27} ${p_ip28} ${p_ip30} ${p_xp} ${P_EXCLUDE}"
+       for x in $patchlist;
+               do rm -f "./${x}"
+       done
+
+       # Rename the source tree to match the linux-mips git checkout date and
+       # machine type.
+       local fkv="${F_KV%-*}"
+       local v="${fkv}"
+       for x in {ip27,ip28,ip30}; do
+               use ${x} && v="${v}.${x}" && break
+       done
+
+       local old="${WORKDIR}/linux-${fkv/_/-}"
+       local new="${WORKDIR}/linux-${v}"
+       if [ "${old}" != "${new}" ]; then
+               mv "${old}" "${new}" || die
+       fi
+       S="${new}"
+
+       # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE
+       EXTRAVERSION="${EXTRAVERSION}-gentoo-mips"
+       unpack_set_extraversion
+}
+
+src_prepare() {
+       local psym="patch-symlinks"
+
+       # Now go into the kernel source and patch it.
+       cd "${S}"
+       epatch -p1 "${WORKDIR}/${psym}"/*.patch
+
+       eapply_user
+}
+
+#//------------------------------------------------------------------------------