From 12bb627384ddfd47382b9f1b6464481a58d01ebb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Aug 2018 20:19:23 +0100 Subject: gentoo resync : 29.08.2018 --- sys-kernel/mips-sources/Manifest | 23 +- .../mips-sources/mips-sources-4.13.16.ebuild | 344 -------------------- .../mips-sources/mips-sources-4.14.67.ebuild | 346 ++++++++++++++++++++ .../mips-sources/mips-sources-4.17.19.ebuild | 346 ++++++++++++++++++++ .../mips-sources/mips-sources-4.4.110.ebuild | 348 -------------------- .../mips-sources/mips-sources-4.4.152.ebuild | 350 +++++++++++++++++++++ .../mips-sources/mips-sources-4.9.124.ebuild | 346 ++++++++++++++++++++ sys-kernel/mips-sources/mips-sources-4.9.75.ebuild | 344 -------------------- 8 files changed, 1402 insertions(+), 1045 deletions(-) delete mode 100644 sys-kernel/mips-sources/mips-sources-4.13.16.ebuild create mode 100644 sys-kernel/mips-sources/mips-sources-4.14.67.ebuild create mode 100644 sys-kernel/mips-sources/mips-sources-4.17.19.ebuild delete mode 100644 sys-kernel/mips-sources/mips-sources-4.4.110.ebuild create mode 100644 sys-kernel/mips-sources/mips-sources-4.4.152.ebuild create mode 100644 sys-kernel/mips-sources/mips-sources-4.9.124.ebuild delete mode 100644 sys-kernel/mips-sources/mips-sources-4.9.75.ebuild (limited to 'sys-kernel/mips-sources') diff --git a/sys-kernel/mips-sources/Manifest b/sys-kernel/mips-sources/Manifest index 4e2ad64db256..9aada3db99b6 100644 --- a/sys-kernel/mips-sources/Manifest +++ b/sys-kernel/mips-sources/Manifest @@ -1,16 +1,21 @@ -DIST linux-4.13.tar.xz 100579888 BLAKE2B 2f8be07d403071b097b019c43fa332bc7d4805dee633a6fdffe5a99d5475015ca9e4881e7f4cbfd36f8c451bacf423436364ea3d9f25b8723a29a178dededb2b SHA512 a557c2f0303ae618910b7106ff63d9978afddf470f03cb72aa748213e099a0ecd5f3119aea6cbd7b61df30ca6ef3ec57044d524b7babbaabddf8b08b8bafa7d2 +DIST linux-4.14.tar.xz 100770500 BLAKE2B 85dc4aa953fe65e273a24473d8de98e4f204f97c43be9fc87cf5be01f796f94cfde5c8f9c84619751f1cac51f83ce0b4681fb19c5f2965a72d4a94fe5577846a SHA512 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 +DIST linux-4.17.tar.xz 102165892 BLAKE2B b9e1fe2c063d2761b4d54594b841f6591fd6f5b634a402c07e0fa5518a2b271293d97c5a7a8e3c30c9c4d78df16bf20a4f0befe998c9a9393bb3290d2df1dda3 SHA512 4d9de340a26155a89ea8773131c76220cc2057f2b5d031b467b60e8b14c1842518e2d60a863d8c695f0f7640f3f18d43826201984a238dade857b6cef79837db 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.13.0-patches-v1.tar.xz 170004 BLAKE2B ea5b8827c4bfb0d437dd27dfb2ab6451119527c1fd6bd8d05fe3384e22fcb6a58bf7003e04a9388f5f8a27dcb5e0a4dffa4bbbc2edec8a7c11b7760803ec3d17 SHA512 9c05223a5fe3853b4b9f07378c9c2f8f527ef41cba5111e52ca556b694811b47cfc2840db025fce233cb2909e3ab63bf8920583956552915e310532f173d9f14 +DIST mips-sources-4.14.0-patches-v1.tar.xz 287968 BLAKE2B c0bd76f91f823516fbb39fbba02f3bd12aba25b289170c8ae46866d60c24c7e92584addbc270b349872c5acadfe17da62179e15b72796ec62cadc66e0c3b7dd1 SHA512 a78375e8b7c5007f26a5ff517eeecf088636ad571c24eee986773b6039a7b4168b4c8821e6245b2c8c33c7647b75376a81d3ce8cc50d6a22d864d07f517ac640 +DIST mips-sources-4.17.0-patches-v1.tar.xz 288188 BLAKE2B 774b9c4b68d719a8f7dada28c926a4a52680081d770e896013a2e037e96d3ad15ae30ebdddedf105c0db27cd63488d915efb794922c5b3349baa2bd042544df4 SHA512 24c7a708b42beb39e039bdbebe6dbca3aad5a7c24134f2b05b0d3afe2dc8736c97520ed279075bec538322ff53517fa2ec6a0f0828369e28e8efd0996dd0b678 DIST mips-sources-4.4.0-patches-v2.tar.xz 156396 BLAKE2B 7b6a50e3768d7d67b525457a8a1b7ed024b3c8762e37734d250478bb0fc4d9d4c76598a45afcd239a5dc1dcf6052c24c69111aeccec11951093396212910c5a9 SHA512 4186ee382037ec32126976ba453f78fc80c627a4ebdd79d8462f12559eb06dce25f926f3c205c7c4e5032cb501942ee10c8cb3a17339352cec3cf565c669dd52 DIST mips-sources-4.9.0-patches-v1.tar.xz 233620 BLAKE2B c976ddb9cc53c07c8c3077999a324746fafed3c7d913434d403baf08396196216aeb58ca61c434180e00a6b14ef939b3e86497236e44f9a5e1365357ea0f64ff SHA512 d786705277e1837f725c7b5a239a19744a7bdf8767c0ee75613270eb9592aeaee1cd0c6f05edb67abf93597d0f5c6fc3826d76847cd6b2aaa6cb21256720d19f -DIST mipsgit-4.13.0-20171007.diff.xz 1008 BLAKE2B dfbd93a92ff6a925223dec22936d40281e5a1054f9dcb8a3e44159d1ec6ea5c76e0ae57b2f50e92d414185ffa7b94749a9182c56589512208fdb57ed7d0105a5 SHA512 0c6244a7346018fbfcdab6537ee33931682c168a15c10f26f84615c29ea90ee77d6a4ca402109d6e5b66cd09c8925325a484dbfcbb50f8002a1a4d4ef4ab61c9 +DIST mipsgit-4.14.0-20180128.diff.xz 1008 BLAKE2B 2a317ff97aab096883680c6b653e993aee31994e6caec52c52dfbbb61f1dc1f25d03ebd3182fa122923a67aeee0aa598b36e603692333e4c9ccdc741fd456d96 SHA512 378deb1bc1d10a6b4912e5e4a0d6fcab28952e2e59c35fc879601841cf8160081b318a2598ef74db225e95f0f26483f6b9a56a348811b1ee7b8934391dd271ae +DIST mipsgit-4.17.0-20180705.diff.xz 1008 BLAKE2B 07d316dd9dd0c16033763d066e4d703ee8e2a107ce0eb43dbabf96dccaebb7efb62d6b77e17adb59effd14f6af1b5b6bbc8bcfdb14fc4036eef2f41752bfee9b SHA512 9d5c85716de6da8880d8221673957aa528cb59e3e882d8471ec253943501d5accd9197a7358d933060ebea344c3b50fdf53ca28792f291beb587df52a7febd9a 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.13.16.xz 271596 BLAKE2B 3ff4ae40c1ea5f9b547ff3d6bf59a065f84cdc66e9b6423b344c8fd7ea5ba96bd60e18861be64d2c6027b3b73fd30dcda99ada9b19f4a2daa8f7917fae0f1bb2 SHA512 6d9e6593477fb7aa663e6b9cdccb1d30df8d3bb3721b93afa9ddefce539d267bee062809dd6c50135ba113cf5220ef4b2799f25eca73c791ff59f4480189d211 -DIST patch-4.4.110.xz 1553352 BLAKE2B eb4e37d1deee89586db12a56dab415a985a678291b74fd4c0c5ded3214e47ca7f9019e572db79ed2d534f737dac01ecf065460c998de5e902b49fbe2d8631be9 SHA512 c247b8258d203448f5f8e0595475a4ac73c9550dadf2cd910c3179aaffb43cf11580647146e6e27d9fbcb33d869be91d4c206f3f1090492123973e3f239324fd -DIST patch-4.9.75.xz 1339980 BLAKE2B 9f644981b4a1c173b505b9828a012417c0536732844ee9034e868b8679feadb40db5cfba1f1bffd31bb2f97960b13e3f682b01a27009d9fcca924e4dbe72d11a SHA512 4dbf9b7c6da142b63506542c0f1c5f0f3d4bb22c5291d4d99bcfc3945691ab5f969ce16b1d1a30553ba002feb3de66a9c39c1cf9c51a6c315e8820bc8853d221 -EBUILD mips-sources-4.13.16.ebuild 13140 BLAKE2B 8f08b6b870d092a5b678c1a73c01ac252a4f3045496e25be72060922307b42fe44c2f33efb36815734e5a0fa14651833c8516b73998c929b465f3d5d231d1476 SHA512 81209ba1b342529ecc14172630574b11fbc2313042b4ab5e24d8f8b541071c51fcd74eebce5d5b9c74ae07cfb04f068a1851fc49ce0dbbe05fe7ea5e3d996c8e -EBUILD mips-sources-4.4.110.ebuild 13233 BLAKE2B 1f6b8e4f13a245bbd86cfe3f81d4fc242d64279ab73b4944a2a00292d27e4e1e2dc6c14fd82fd33c2e75fc2dd900cee332a62660fff8a6514741d476154172c5 SHA512 866f79fdd9740b64a1f8b08aaaa6e77b92ed458bddee5f98ee3865112625f4cc9d6993bd7e4119052bb33229197d5f164f8b35819790ba0bdc5630b5c7f37360 -EBUILD mips-sources-4.9.75.ebuild 13135 BLAKE2B 01aadc5f38e521000e359a678109ab6ec92868810ae3a7009e1178fe39e588ea019e606c4e91887f1e1343aa50aeee273e7d20186e3a4e3c8ded702c25cde2c9 SHA512 bb30cc2249f70de0688bd0ec1b319b36922de9a6a391baf124d32ceaa4e43279224fc340f0c90b60993230f7011cb7539eb82d77f81791f31f328a06a01b8e83 +DIST patch-4.14.67.xz 1650468 BLAKE2B 538e1abaa2401fb988be642a1c80e23821f7132e821322c1c82ad8c0ba3f3ff7f68713ee7b9a3d5a391d2ada9c08db2cc799e45f36d10df1abd839c20eb27dfc SHA512 fa55874353fb4aec12fc50d39e24ebfebcbcdf84f8602511f6bb5afca9585e4be63691599bed29a97e34901487f380bc1bcdb260e14b3709c81c715fa86e8579 +DIST patch-4.17.19.xz 463572 BLAKE2B 6097f24f8663ade71204d83e4b89bc15f3d0b0f906cb4a0e6a9aa32705fdbd7e8855337acca37697ef93bb3f2c696ce60bab2d4e02f1e20a0113ca02c7df61a7 SHA512 57fab939df862c3807d1ddd6461b19f85b3c0aba83203f327cf174f9d6e33c79e996362cabbb44014e03fe1eb77cf0232944927ae95aa1e51ef43b153d6343ab +DIST patch-4.4.152.xz 2100204 BLAKE2B 3f9c9d7929b1e318a6a429b462c9011994fa201ca5f8ab7911e8356b02f634a2df6a6e49c7112988d5b7b6273bac2f02ded29093a9728275d84bec99bda1fb92 SHA512 3885257de141a3e4c95a772ed678f54707eea2dcd9dd6fe2108fefe8c18be34b1c0b3a22f29914d89e6bdf2548e27542c4a61ec96552fd7370b5a014faa12dcc +DIST patch-4.9.124.xz 2175868 BLAKE2B 0dc5c27d85d696670ef86051015260cc36603fe3dda0626ac82b9f364cc8c562ca5155e4cd30c499febd85710c620683bbda67293e0f9be5799e78cf89b991d1 SHA512 6ae8e557ea4c72c04e9fd99fdae4f69a8f4cb1edb2cf4647de43b288f07069c0b54f9b0e8c45dc14165c48d58690e239d626d9503693decdc2b33903b79f421d +EBUILD mips-sources-4.14.67.ebuild 13153 BLAKE2B cb8374f4c041ac1999dd79cd95add78b3895377366a11f97640579ccb20d38d418d7c76f82a5c22ba8a3096dd2b920447e510e86f9ddd7fe18baa83be6d4a809 SHA512 6fdb8376b96a39064945f6a77a0a2f0eb2a87a748ab0e73b206715df63a611d468055b0e692dec0d3d84273067f06bf0ca4b7660b02d8ab3d3fd423203e48a49 +EBUILD mips-sources-4.17.19.ebuild 13153 BLAKE2B 7731959134d8ed3c69ce521be818b74208fbfe8e2df636351bcf167a05e9cdd882aad7fddb59d1f56c79334be721cdd01b353123832d192e726cfdfcd1ce78d7 SHA512 d200632ff5c6b7cec9b72d93ac7ed7f3225f4ec5886543eb62f6416ee4d2678429b0e013f6f7f87c0093ef6e088060523523d7e13db4d99088fb64f67b2cf973 +EBUILD mips-sources-4.4.152.ebuild 13247 BLAKE2B 0fbd9c89cb5db74be02d239a34dbd6e84f8cb802decc1b550396df79a3ee41a14274e3c805eb38d26d4e8cf647cb65b6029ade1a0e017bde38a99f432e221a94 SHA512 5a829ca527c0ae20ead5461fb2888b9d7877167b5412d5f8baf7bb4184a2dabc11ae5c8f48fa5cbf93580d44c0e350db0e43d537e5116767196cbf18cbebe3f2 +EBUILD mips-sources-4.9.124.ebuild 13149 BLAKE2B d81460502bcb1e5c8d7e450da2ef00a013ca08c27235e95ee97b80af6acfb666ee930e6a21ea3155be76ff32b2f1386db3293b9ef9315d7c6c63a6e7d618eb2d SHA512 97a26f1b8143b199fe1a04d0b54d4b4ef66e8d682b81dc383556cb0e0fa920eab7fef15883e58aef6cd8de9360b7c5c319bb1a4e5b1aaf70a6713be83b860252 MISC metadata.xml 791 BLAKE2B 8f6a800e1ce23fc8d8fa9a2e93f29c7161c30770ed2ed7345e1175d06a44298c645020317f6e21eac3d798edf4b2a72eaca8ae32207ad62c2e151e9d87c8cd07 SHA512 8a8f75a760d1ca13dc53038271236e16801136db499d52f97cedf0120077d06870750f51440f5cf765bbc8bc1cbc8745b354f467c582e219c58be3e700ee29cf diff --git a/sys-kernel/mips-sources/mips-sources-4.13.16.ebuild b/sys-kernel/mips-sources/mips-sources-4.13.16.ebuild deleted file mode 100644 index 2aa774a33d25..000000000000 --- a/sys-kernel/mips-sources/mips-sources-4.13.16.ebuild +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# EAPI Version -EAPI="5" - -#//------------------------------------------------------------------------------ - -# Version Data -GITDATE="20171007" # Date of diff between kernel.org and lmo GIT -GENPATCHREV="1" # Tarball revision for patches - -# Directories -S="${WORKDIR}/linux-${OKV}-${GITDATE}" -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.12" -K_FROM_GIT="yes" -ETYPE="sources" - -# Inherit Eclasses -inherit eapi7-ver eutils kernel-2 -detect_version - -# Version Data -F_KV="${PVR}" -BASE_KV="$(ver_cut 1-2).0" -[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}" - -# Portage Vars -HOMEPAGE="https://www.linux-mips.org/ https://www.gentoo.org/" -KEYWORDS="-* ~mips" -IUSE="experimental ip27 ip28 ip30" -RDEPEND="" -DEPEND="${RDEPEND} - >=sys-devel/gcc-4.7.0 - >=sys-devel/patch-2.7.4" - -# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" -SRC_URI="${KERNEL_URI} - mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz - mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" - -UNIPATCH_STRICTORDER="yes" -UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" - ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" - ewarn "unknown at this time. Please report any oops messages from this" - ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" - 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}-${GITDATE}" - for x in {ip27,ip28,ip30}; do - use ${x} && v="${v}.${x}" && break - done - mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die - S="${WORKDIR}/linux-${v}" - - # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE - EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" - 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 -} - -#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.14.67.ebuild b/sys-kernel/mips-sources/mips-sources-4.14.67.ebuild new file mode 100644 index 000000000000..4162d7a9c3fa --- /dev/null +++ b/sys-kernel/mips-sources/mips-sources-4.14.67.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# EAPI Version +EAPI="6" + +#//------------------------------------------------------------------------------ + +# Version Data +GITDATE="20180128" # Date of diff between kernel.org and lmo GIT +GENPATCHREV="1" # Tarball revision for patches + +# Directories +S="${WORKDIR}/linux-${OKV}-${GITDATE}" +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.13" +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.linux-mips.org/ https://www.gentoo.org/" +KEYWORDS="-* ~mips" +IUSE="experimental ip27 ip28 ip30" +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.7.0 + >=sys-devel/patch-2.7.4" + +# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" +SRC_URI="${KERNEL_URI} + mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz + mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" + +UNIPATCH_STRICTORDER="yes" +UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" + ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" + ewarn "unknown at this time. Please report any oops messages from this" + ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" + 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}-${GITDATE}" + for x in {ip27,ip28,ip30}; do + use ${x} && v="${v}.${x}" && break + done + mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die + S="${WORKDIR}/linux-${v}" + + # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE + EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" + 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 +} + +#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.17.19.ebuild b/sys-kernel/mips-sources/mips-sources-4.17.19.ebuild new file mode 100644 index 000000000000..cd1ccaadfa6e --- /dev/null +++ b/sys-kernel/mips-sources/mips-sources-4.17.19.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# EAPI Version +EAPI="6" + +#//------------------------------------------------------------------------------ + +# Version Data +GITDATE="20180705" # Date of diff between kernel.org and lmo GIT +GENPATCHREV="1" # Tarball revision for patches + +# Directories +S="${WORKDIR}/linux-${OKV}-${GITDATE}" +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.16" +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.linux-mips.org/ https://www.gentoo.org/" +KEYWORDS="-* ~mips" +IUSE="experimental ip27 ip28 ip30" +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.7.0 + >=sys-devel/patch-2.7.4" + +# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" +SRC_URI="${KERNEL_URI} + mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz + mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" + +UNIPATCH_STRICTORDER="yes" +UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" + ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" + ewarn "unknown at this time. Please report any oops messages from this" + ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" + 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}-${GITDATE}" + for x in {ip27,ip28,ip30}; do + use ${x} && v="${v}.${x}" && break + done + mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die + S="${WORKDIR}/linux-${v}" + + # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE + EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" + 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 +} + +#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.4.110.ebuild b/sys-kernel/mips-sources/mips-sources-4.4.110.ebuild deleted file mode 100644 index 79d5f1e3cf28..000000000000 --- a/sys-kernel/mips-sources/mips-sources-4.4.110.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# EAPI Version -EAPI="5" - -#//------------------------------------------------------------------------------ - -# Version Data -GITDATE="20160123" # Date of diff between kernel.org and lmo GIT -GENPATCHREV="2" # Tarball revision for patches - -# Directories -S="${WORKDIR}/linux-${OKV}-${GITDATE}" -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.3" -K_FROM_GIT="yes" -ETYPE="sources" - -# Inherit Eclasses -inherit eapi7-ver eutils kernel-2 -detect_version - -# EPATCH Vars -# XXX: Required to properly apply Impact/Odyssey driver patches. -EPATCH_OPTS="-F3" - -# Version Data -F_KV="${PVR}" -BASE_KV="$(ver_cut 1-2).0" -[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}" - -# Portage Vars -HOMEPAGE="https://www.linux-mips.org/ https://www.gentoo.org/" -KEYWORDS="-* ~mips" -IUSE="experimental ip27 ip28 ip30" -RDEPEND="" -DEPEND="${RDEPEND} - >=sys-devel/gcc-4.7.0 - >=sys-devel/patch-2.7.4" - -# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" -SRC_URI="${KERNEL_URI} - mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz - mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" - -UNIPATCH_STRICTORDER="yes" -UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" - ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" - ewarn "unknown at this time. Please report any oops messages from this" - ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" - 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}-${GITDATE}" - for x in {ip27,ip28,ip30}; do - use ${x} && v="${v}.${x}" && break - done - mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die - S="${WORKDIR}/linux-${v}" - - # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE - EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" - unpack_set_extraversion -} - -src_prepare() { - local psym="patch-symlinks" - - # Now go into the kernel source and patch it. - cd "${S}" - epatch "${WORKDIR}/${psym}"/*.patch -} - -#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.4.152.ebuild b/sys-kernel/mips-sources/mips-sources-4.4.152.ebuild new file mode 100644 index 000000000000..9d25a5dca63e --- /dev/null +++ b/sys-kernel/mips-sources/mips-sources-4.4.152.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# EAPI Version +EAPI="6" + +#//------------------------------------------------------------------------------ + +# Version Data +GITDATE="20160123" # Date of diff between kernel.org and lmo GIT +GENPATCHREV="2" # Tarball revision for patches + +# Directories +S="${WORKDIR}/linux-${OKV}-${GITDATE}" +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.3" +K_FROM_GIT="yes" +ETYPE="sources" + +# Inherit Eclasses +inherit kernel-2 eutils eapi7-ver +detect_version + +# EPATCH Vars +# XXX: Required to properly apply Impact/Odyssey driver patches. +EPATCH_OPTS="-F3" + +# Version Data +F_KV="${PVR}" +BASE_KV="$(ver_cut 1-2).0" +[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}" + +# Portage Vars +HOMEPAGE="https://www.linux-mips.org/ https://www.gentoo.org/" +KEYWORDS="-* ~mips" +IUSE="experimental ip27 ip28 ip30" +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.7.0 + >=sys-devel/patch-2.7.4" + +# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" +SRC_URI="${KERNEL_URI} + mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz + mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" + +UNIPATCH_STRICTORDER="yes" +UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" + ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" + ewarn "unknown at this time. Please report any oops messages from this" + ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" + 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}-${GITDATE}" + for x in {ip27,ip28,ip30}; do + use ${x} && v="${v}.${x}" && break + done + mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die + S="${WORKDIR}/linux-${v}" + + # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE + EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" + unpack_set_extraversion +} + +src_prepare() { + local psym="patch-symlinks" + + # Now go into the kernel source and patch it. + cd "${S}" + epatch "${WORKDIR}/${psym}"/*.patch + + eapply_user +} + +#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.9.124.ebuild b/sys-kernel/mips-sources/mips-sources-4.9.124.ebuild new file mode 100644 index 000000000000..367089311a06 --- /dev/null +++ b/sys-kernel/mips-sources/mips-sources-4.9.124.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# EAPI Version +EAPI="6" + +#//------------------------------------------------------------------------------ + +# Version Data +GITDATE="20161216" # Date of diff between kernel.org and lmo GIT +GENPATCHREV="1" # Tarball revision for patches + +# Directories +S="${WORKDIR}/linux-${OKV}-${GITDATE}" +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.8" +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.linux-mips.org/ https://www.gentoo.org/" +KEYWORDS="-* ~mips" +IUSE="experimental ip27 ip28 ip30" +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.7.0 + >=sys-devel/patch-2.7.4" + +# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" +SRC_URI="${KERNEL_URI} + mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz + mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" + +UNIPATCH_STRICTORDER="yes" +UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" + ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" + ewarn "unknown at this time. Please report any oops messages from this" + ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" + 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}-${GITDATE}" + for x in {ip27,ip28,ip30}; do + use ${x} && v="${v}.${x}" && break + done + mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die + S="${WORKDIR}/linux-${v}" + + # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE + EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" + unpack_set_extraversion +} + +src_prepare() { + local psym="patch-symlinks" + + # Now go into the kernel source and patch it. + cd "${S}" + epatch "${WORKDIR}/${psym}"/*.patch + + eapply_user +} + +#//------------------------------------------------------------------------------ diff --git a/sys-kernel/mips-sources/mips-sources-4.9.75.ebuild b/sys-kernel/mips-sources/mips-sources-4.9.75.ebuild deleted file mode 100644 index 124b95b19f6d..000000000000 --- a/sys-kernel/mips-sources/mips-sources-4.9.75.ebuild +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# EAPI Version -EAPI="5" - -#//------------------------------------------------------------------------------ - -# Version Data -GITDATE="20161216" # Date of diff between kernel.org and lmo GIT -GENPATCHREV="1" # Tarball revision for patches - -# Directories -S="${WORKDIR}/linux-${OKV}-${GITDATE}" -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.8" -K_FROM_GIT="yes" -ETYPE="sources" - -# Inherit Eclasses -inherit eapi7-ver eutils kernel-2 -detect_version - -# Version Data -F_KV="${PVR}" -BASE_KV="$(ver_cut 1-2).0" -[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}" - -# Portage Vars -HOMEPAGE="https://www.linux-mips.org/ https://www.gentoo.org/" -KEYWORDS="-* ~mips" -IUSE="experimental ip27 ip28 ip30" -RDEPEND="" -DEPEND="${RDEPEND} - >=sys-devel/gcc-4.7.0 - >=sys-devel/patch-2.7.4" - -# 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="Linux-Mips GIT sources for MIPS-based machines, dated ${GITDATE}" -SRC_URI="${KERNEL_URI} - mirror://gentoo/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.xz - mirror://gentoo/${PN}-${BASE_KV}-patches-v${GENPATCHREV}.tar.xz" - -UNIPATCH_STRICTORDER="yes" -UNIPATCH_LIST="${DISTDIR}/mipsgit-${BASE_KV}${KVE}-${GITDATE}.diff.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 "Heavy disk I/O on recent kernels may randomly trigger a VM_BUG_ON_PAGE()" - ewarn "in move_freepages() in mm/page_alloc.c. The exact trigger cause is" - ewarn "unknown at this time. Please report any oops messages from this" - ewarn "bug to bugs.gentoo.org (assign to mips@gentoo.org)" - 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}-${GITDATE}" - for x in {ip27,ip28,ip30}; do - use ${x} && v="${v}.${x}" && break - done - mv "${WORKDIR}/linux-${fkv/_/-}" "${WORKDIR}/linux-${v}" || die - S="${WORKDIR}/linux-${v}" - - # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE - EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}" - unpack_set_extraversion -} - -src_prepare() { - local psym="patch-symlinks" - - # Now go into the kernel source and patch it. - cd "${S}" - epatch "${WORKDIR}/${psym}"/*.patch -} - -#//------------------------------------------------------------------------------ -- cgit v1.2.3