sys-kernel/mips-sources: version bumps for 4.4, 4.9, 4.10, and 4.11

Bumped to the following versions:
- 4.4.55 -> 4.4.71

Added new ebuilds for the following versions:
- 4.9.31
- 4.10.17
- 4.11.4

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Joshua Kinard
2017-06-12 02:04:16 -04:00
parent 366b0c91ea
commit 9efddd64b9
5 changed files with 1045 additions and 1 deletions

View File

@@ -1,8 +1,20 @@
DIST linux-4.10.tar.xz 94231404 SHA256 3c95d9f049bd085e5c346d2c77f063b8425f191460fcd3ae9fe7e94e0477dc4b SHA512 c3690125a8402df638095bd98a613fcf1a257b81de7611c84711d315cd11e2634ab4636302b3742aedf1e3ba9ce0fea53fe8c7d48e37865d8ee5db3565220d90 WHIRLPOOL 86d021bae2dbfc4ef80c22d9e886bed4fbd9476473a2851d7beaf8ed0c7f7fbc1fa0da230eb9e763eb231b7c164c17b2a73fd336ab233543f57be280d6173738
DIST linux-4.11.tar.xz 95447768 SHA256 b67ecafd0a42b3383bf4d82f0850cbff92a7e72a215a6d02f42ddbafcf42a7d6 SHA512 6610eed97ffb7207c71771198c36179b8244ace7222bebb109507720e26c5f17d918079a56d5febdd8605844d67fb2df0ebe910fa2f2f53690daf6e2a8ad09c3 WHIRLPOOL f577b7c5c209cb8dfef2f1d56d77314fbd53323743a34b900e2559ab0049b7c2d6262bda136dd3d005bc0527788106e0484e46558448a8720dac389a969e5886
DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc
DIST linux-4.8.tar.xz 91966856 SHA256 3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a SHA512 a48a065f21e1c7c4de4cf8ca47b8b8d9a70f86b64e7cfa6e01be490f78895745b9c8790734b1d22182cf1f930fb87eaaa84e62ec8cc1f64ac4be9b949e7c0358 WHIRLPOOL 3888c8c07db0c069f827245d4d7306087f78f7d03e8240eb1fcd13622cd5dbe1c17cd8ed7dc11513f77f3efd5dbd84e2b48e82bdb9b9bfd2242fd62ae32812d5
DIST linux-4.9.tar.xz 93192404 SHA256 029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a SHA512 bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a WHIRLPOOL 072505b29972ad120eb25a074217847c9c2813416c4903e605a0433574f5f87616dbea0b1454e4b19acc48107f11274b682958b1d773373156e99f8163e6606a
DIST mips-sources-4.10.0-patches-v1.tar.xz 168284 SHA256 595bd856d82c68f90a748f4ab9ba3d49265b8478589b8008f3c92663a9f76ac0 SHA512 2286b895b6705fc7411e6685c1ac7fba457e69c883e6e3f9f129c1b30537bdadc394bddcf3d81670ed3846427076e7574725d92169ba7413834807e5f519bced WHIRLPOOL a275e6d43f2487fabfc2b3de071b08f8a037460a17bd8b8da10ef58ceccabc46634cde82bcd9681c4a4a687fccb9d3bdbfd2390cd11589d88b86774405adad93
DIST mips-sources-4.11.0-patches-v1.tar.xz 169588 SHA256 103888b76ec66ca075a3b3d79ad5e5a23ca5f0c14ea7162ea3b87c7a35a2a1b2 SHA512 de3a46f6279689155064c8f3232b34bc453b2ac14fe816276b45c492d1aecb56106763b76a445545521008ce32eb9d243213b1373900a6ea4579392b43b9303c WHIRLPOOL 1dd1c26f8b4cea5d67d70495784b2725f7903ca88590bf6a8cea489112a73c5d48572c0f04ea205c975106e33b21d1929586316a94a5809655f37f4dd09d20ad
DIST mips-sources-4.4.0-patches-v2.tar.xz 156396 SHA256 7aa6ab5628c9094b2aab39e47a102ad6d9c021c6bd8e9dfc6cddece8fc8baaca SHA512 4186ee382037ec32126976ba453f78fc80c627a4ebdd79d8462f12559eb06dce25f926f3c205c7c4e5032cb501942ee10c8cb3a17339352cec3cf565c669dd52 WHIRLPOOL 86aba7143b3c38f34db0a68fc889d83676f6006eab594b89c13ea5d5abfd02ef64056472ad194aafbe15a86033c171e1fd06c0c7ffd6542cec19e553d7d6a716
DIST mips-sources-4.8.0-patches-v1.tar.xz 218452 SHA256 4322e03fe7bb383cb6a9ab0e93ae8bc06b6911c6f2441baa3341dc2df5428e1f SHA512 ff4e1ab26f085b4d64bcb8410dd0478debb2a92c24e70bb11d460bf69b5e61a17f7116913e1a71cd7e89ea15a6a5d52118cefc15e918b9155a9780069271c907 WHIRLPOOL 5445d05a5a3b7e8cb24d09cef62317a87add0bb22f65719fdae8cc35459ac89819002b6d16d72041e28ba8cde11871a8badedc027103cc5dddc0581169441cc8
DIST mips-sources-4.9.0-patches-v1.tar.xz 233620 SHA256 62064b9c02145af55968c1f2361c6bdbcd3ebfd8ce87517567877fafa89938c4 SHA512 d786705277e1837f725c7b5a239a19744a7bdf8767c0ee75613270eb9592aeaee1cd0c6f05edb67abf93597d0f5c6fc3826d76847cd6b2aaa6cb21256720d19f WHIRLPOOL d1fd287bc58f5fab14f45001905210aca852a44c7f1775dd0f64d599eed3a4837b0d30f20921ffe8b44279c74aa2a7d87d4095ccfbbeed4953597a641fa4023a
DIST mipsgit-4.10.0-20170314.diff.xz 1816 SHA256 d6c54ad335bf547266e1c0ae13090eb9fa31109262ae1b0e81b195cff641231c SHA512 3dabcd65da143c20b553a2b79687e8cde5521b61d9bf64a8d583ada72f4835baa8dd5d1bef9ed3334466b6fb2f4397a0ee8a0fa3b642985348a61363b45ef435 WHIRLPOOL 1e1a4de11c9245ccf320486e05b89cf19ffb0fcce51a679969b0a72e974d77cd830a7810c2d56f4af9f485b661b4bc1248436fe18173cf50a46a37ebd7dd3bc8
DIST mipsgit-4.11.0-20170513.diff.xz 1560 SHA256 1ebf0a9ecdb4cb35f1931f3985142ea1d93d462ba5115ababc11af26654531fa SHA512 6adeda78012b26ebfdad577af59305756b8b090764c17e62cc988d884ab41a39e280371ccaebd9564fff4216b515b58cf4f02d529303f75e614b67e0caf84e06 WHIRLPOOL c9547fbbf1b7a18fa0a887aa85ac53a2b7b32f8192e8837594071023a12baa9550227b4f0d23318f89d978e383c35fae7b2a7bb193b48ef481504964872bc2b3
DIST mipsgit-4.4.0-20160123.diff.xz 1908 SHA256 71ada981970c6271765fc4cb45af1899fdc32419b5493802ff3af8febd211fe3 SHA512 0086c470064dd4e5c2fefd8161b70200475659fe925e68d374ff139b506147c39163f366be689bbb92a9aaf72e8c58cdaaaff5def6718c5e87ff7e047551a1f8 WHIRLPOOL 973bc1f626566dc13be8bd315b1339ddecda2008ef829258b8d82b1220d146115960f11808970e34299a9bdffa2e08e4e730bde4cbd3d49a1850c386ac90e9e3
DIST mipsgit-4.8.0-20161016.diff.xz 1932 SHA256 ad0ba84c2710cfc07c7a215a435d5aa89dd477172577c4d6bbecc2195208e9ec SHA512 578792e7ce7a5c25e6acccc442ada9b829cec9d113390e5aa705359d1bf6b1d67fb6ce761eac418d411fdaf3312b04c4cbaee17d0127ef69d6c1f4a1467f75cd WHIRLPOOL 9382d87f0d71754272a1fa06eff1c4d413aa4554b903e138f5001456b7817e6780d744e82fee8681310852b864fc7b2fa7143d9303f7c728f769bcbe481c2fe5
DIST patch-4.4.55.xz 1009900 SHA256 da056df583be182032af0ae06394b0cc1a1557eb23af0a7ab7105fe44eae8a2e SHA512 e9e39200e1c43c664c289109600fa9dfb75a0119c4354f2766bc679fdcad50d397219d3d18b2b0514830365526dcf5da4c32c2f41e5ee62fa348f5d1bc8f1d2b WHIRLPOOL c5eab19da64af45786d92fcb297fe8824a13377c5b02d48c2b55adc5fd5911b7d49579867c1f00d06ee120a459c3f1c908641d750539289fbde1592eaa4414f2
DIST mipsgit-4.9.0-20161216.diff.xz 1120 SHA256 a1176dfc87dca9313e8eacf193c549ecee469810644f781c7d3b256da6d9237d SHA512 d1d8d95661d349826e2978d2259df9e30dbd6779a6506fe769dd8e60699e8461920b290a2064a432b8c3bd95888854f4dbcc2ba40929c58f0dd165fcb7894e15 WHIRLPOOL 11a2f9ff130258077a0f59ccd516c8055f3091453ab2f556047cbfd75dfbf28dcd569b49a7b076ada98fa969752ebcd8f2424993be8c31fd8f40b40859366009
DIST patch-4.10.17.xz 347932 SHA256 5d6b91751fb0ec2b0fd8c30ceb792f0f90ea665fe5967345aeaa64c8bfeb19ba SHA512 98700d32b4787eae26bdece45563c171b6b8af43a1a15cf5674530fa5cd1dd47fced054b740b568a4a7a1fdbe1b10cdb8126ef43dc92551e06dc4d3245b2fb56 WHIRLPOOL 1c7e2a3ac4b96672a1983ba6b5c4ab200fad173ac9e111ffe6151bcaec2e0f3cf5fc84b59606d247b4774f918014d6de8c41d21624c99af952a8c7f913f0c748
DIST patch-4.11.4.xz 150920 SHA256 7b36a573cce74d8e5312c88595bc0c0a60957c1fb79758303c9de9e944e2d339 SHA512 d38c48994e852c51f126d362faae0ee939043917287223e68eac84c59b43cda5908e5a31af6aa6b0fc1aeecbbc6d89b6c6351fefbc51c0becb9a7223f38a2c7b WHIRLPOOL 9c85bd58e3bf265bc3942575193eb5510d2b2add94193a5e136fd96af90580de0625646aaeb9f85d40ae53f41d7011027fc2fe3eefe8bcffdaf53a5c2d8ffcb6
DIST patch-4.4.71.xz 1166732 SHA256 355e7d918f31940b54c099fe52c05a02a1c2a97afb82a44c055a165d6d55272b SHA512 d806da9f497a506071ab98ff6b2220c4e4079d405b459677819596602695dc7fa77fca774afa6969f8274fe0ac78c2e3cfdac716262a4f8eca5d95c6f340c6dc WHIRLPOOL 204e86ce123e8331cdc4433ec0e69bdfe35fbbd9d1b9fbfef951e2aaf4e88d8b50e82bc62bb711b0413dd81a8fd2a8aa379def73fc237fda770eb05ad1b6a0e5
DIST patch-4.8.17.xz 320288 SHA256 1e4be6f6a8eab3edcd0899db382fe1a9330320c603a9ad2c32ebb1dc6f53b3db SHA512 df239d990077cdf697fd487b4b8abb97fe442ac9fac4ed2e90c626560fc15058363310cf40580fd000d4ad55198486594a608544ce9c2bcaf03704415aa45441 WHIRLPOOL 401c8ee9f41b78b355ab76f1f0ed25b53855f641e0c27c07461e82af4e322fe958f73ef3cce6d074de2a6be550c8c8615a0a53187f3f9d17c8bd8b928d3a6051
DIST patch-4.9.31.xz 667816 SHA256 c6ee18e4b2d1d0d88b92d00f0d6583d1927a2e8b7b954b342d98c347aa15fa63 SHA512 387f667ddcd93b51d7fd4ed55db22ad07fa27faaa2005d2a1dbba704b31f236eff22d9c7a48b89b2cf91ae22cb9b366170a33035eee4b3f42ece3b4f2e7fe4c1 WHIRLPOOL a3319d96d33ff04371779084af978c3130dfc266c0cb4f8a669ab00f7fa12de84eeebab498f905b9789996685559ea6a061402b60ab155d0022482a789e9a01b

View File

@@ -0,0 +1,344 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# EAPI Version
EAPI="5"
#//------------------------------------------------------------------------------
# Version Data
GITDATE="20170314" # 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.9"
K_FROM_GIT="yes"
ETYPE="sources"
# Inherit Eclasses
inherit kernel-2 eutils
detect_version
# Version Data
F_KV="${PVR}"
BASE_KV="$(get_version_component_range 1-2).0"
[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}"
# Portage Vars
HOMEPAGE="http://www.linux-mips.org/ http://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
}
#//------------------------------------------------------------------------------

View File

@@ -0,0 +1,344 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# EAPI Version
EAPI="5"
#//------------------------------------------------------------------------------
# Version Data
GITDATE="20170513" # 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.10"
K_FROM_GIT="yes"
ETYPE="sources"
# Inherit Eclasses
inherit kernel-2 eutils
detect_version
# Version Data
F_KV="${PVR}"
BASE_KV="$(get_version_component_range 1-2).0"
[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}"
# Portage Vars
HOMEPAGE="http://www.linux-mips.org/ http://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
}
#//------------------------------------------------------------------------------

View File

@@ -0,0 +1,344 @@
# Copyright 1999-2017 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 kernel-2 eutils
detect_version
# Version Data
F_KV="${PVR}"
BASE_KV="$(get_version_component_range 1-2).0"
[[ "${EXTRAVERSION}" = -rc* ]] && KVE="${EXTRAVERSION}"
# Portage Vars
HOMEPAGE="http://www.linux-mips.org/ http://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
}
#//------------------------------------------------------------------------------