summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/mips-sources/files')
-rw-r--r--sys-kernel/mips-sources/files/eblits/err_disabled_mach-v1.eblit41
-rw-r--r--sys-kernel/mips-sources/files/eblits/err_only_one_mach_allowed-v1.eblit15
-rw-r--r--sys-kernel/mips-sources/files/eblits/pkg_postinst-v1.eblit19
-rw-r--r--sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit72
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_cobalt_info-v1.eblit21
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_ip22_info-v1.eblit25
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_ip27_info-v1.eblit17
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_ip28_info-v1.eblit19
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_ip30_info-v1.eblit27
-rw-r--r--sys-kernel/mips-sources/files/eblits/show_ip32_info-v1.eblit49
-rw-r--r--sys-kernel/mips-sources/files/eblits/src_unpack-v1.eblit59
11 files changed, 364 insertions, 0 deletions
diff --git a/sys-kernel/mips-sources/files/eblits/err_disabled_mach-v1.eblit b/sys-kernel/mips-sources/files/eblits/err_disabled_mach-v1.eblit
new file mode 100644
index 000000000000..f276a564212e
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/err_disabled_mach-v1.eblit
@@ -0,0 +1,41 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/err_disabled_mach-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit to check if a given machine is disabled or marked for testing.
+
+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
+}
diff --git a/sys-kernel/mips-sources/files/eblits/err_only_one_mach_allowed-v1.eblit b/sys-kernel/mips-sources/files/eblits/err_only_one_mach_allowed-v1.eblit
new file mode 100644
index 000000000000..9f902f3852d6
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/err_only_one_mach_allowed-v1.eblit
@@ -0,0 +1,15 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/err_only_one_mach_allowed-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit informing a user when they try to apply two machine patches to the
+# same tree. Most machine patches are exclusive to avoid conflicts.
+
+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"
+}
diff --git a/sys-kernel/mips-sources/files/eblits/pkg_postinst-v1.eblit b/sys-kernel/mips-sources/files/eblits/pkg_postinst-v1.eblit
new file mode 100644
index 000000000000..51d3f04c1808
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/pkg_postinst-v1.eblit
@@ -0,0 +1,19 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/pkg_postinst-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit that handles binpkg postinst tasks.
+# In this case, it sets up the /usr/src/linux symlink.
+
+eblit-mips-sources-pkg_postinst() {
+ # Symlink /usr/src/linux as appropriate
+ local my_ksrc="${S##*/}"
+ for x in {ip27,ip28,ip30,cobalt}; 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
+}
diff --git a/sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit b/sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit
new file mode 100644
index 000000000000..90299f056aec
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit
@@ -0,0 +1,72 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit to check our USE flags for machine-specific flags and give appropriate
+# information, warnings, or errors to the user.
+
+# Some machine patches are mutually-exclusive to avoid conflicts:
+# Affected: ip27 ip28 ip30
+# Not Affected: cobalt ip22 ip32
+
+eblit-mips-sources-pkg_setup() {
+ local arch_is_selected="no"
+ local m_ip m_enable m_name
+
+ # See if we're on a cobalt system first (must use the cobalt-mips profile)
+ if use cobalt; then
+ arch_is_selected="yes"
+ [ "${DO_CBLT}" = "test" ] \
+ && err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt" "test"
+ [ "${DO_CBLT}" = "no" ] \
+ && err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt"
+ show_cobalt_info
+ fi
+
+ # 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
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_cobalt_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_cobalt_info-v1.eblit
new file mode 100644
index 000000000000..70a11ec9e715
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_cobalt_info-v1.eblit
@@ -0,0 +1,21 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_cobalt_info-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit with information/warnings for Cobalt users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+show_cobalt_info() {
+ echo -e ""
+ einfo "Please keep in mind that the 2.6 kernel will NOT boot on Cobalt"
+ einfo "systems that are still using the old Cobalt bootloader. In"
+ einfo "order to boot a 2.6 kernel on Cobalt systems, you must be using"
+ einfo "the CoLo bootloader, which does not have the kernel"
+ einfo "size limitation that the older bootloader has. If you want"
+ einfo "to use the newer bootloader, make sure you have sys-boot/colo"
+ einfo "installed and setup."
+ echo -e ""
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_ip22_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_ip22_info-v1.eblit
new file mode 100644
index 000000000000..75c7b94e10bd
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_ip22_info-v1.eblit
@@ -0,0 +1,25 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_ip22_info-v1.eblit,v 1.1 2009/03/16 06:39:09 kumba Exp $
+
+# Eblit with information/warnings for IP22 (Indy/Indigo2 R4x00) users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+show_ip22_info() {
+ echo -e ""
+ einfo "IP22 systems with an R5000 processor should work well 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) supposedly exists, but its author"
+ einfo "\t\040\040has steadfastly refused to release the code for various reasons."
+ einfo "\t\040\040Any questions regarding its status should be directed to "onion" in"
+ einfo "\t\040\040#mipslinux on the Freenode IRC network. Given he is the author, he"
+ einfo "\t\040\040will know the most current status of the driver."
+ echo -e ""
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_ip27_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_ip27_info-v1.eblit
new file mode 100644
index 000000000000..4f4ea940f8ca
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_ip27_info-v1.eblit
@@ -0,0 +1,17 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_ip27_info-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit with information/warnings for IP27 (Origin 200/2000/Onyx2) users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+show_ip27_info() {
+ echo -e ""
+ ewarn "IP27 support can be considered a game of Russian Roulette. It'll work"
+ ewarn "great for some but not for others. We don't get a chance to test this"
+ ewarn "machine very often with each new kernel, so your mileage may vary."
+ echo -e ""
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_ip28_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_ip28_info-v1.eblit
new file mode 100644
index 000000000000..0ca1705ff528
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_ip28_info-v1.eblit
@@ -0,0 +1,19 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_ip28_info-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit with information/warnings for IP28 (Indigo2 Impact R10000) users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+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 ""
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_ip30_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_ip30_info-v1.eblit
new file mode 100644
index 000000000000..111772579af6
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_ip30_info-v1.eblit
@@ -0,0 +1,27 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_ip30_info-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit with information/warnings for IP30 (Octane) users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+show_ip30_info() {
+ echo -e ""
+ einfo "Things to keep in mind when building a kernel for an SGI Octane:"
+ einfo "\t- Impact (MGRAS) console and X driver work, please report any bugs."
+ einfo "\t- VPro (Odyssey) console works, but no X driver exists yet."
+ einfo "\t- PCI Card Cages should work for many devices, except certain types like"
+ einfo "\t\040\040PCI-to-PCI bridges (USB hubs, USB flash card readers for example)."
+ einfo "\t- Do not use OHCI-based USB cards in Octane. They're broke on this machine."
+ einfo "\t\040\040Patches are welcome to fix the issue."
+ einfo "\t- Equally, UHCI Cards are showing issues in this release, but should still"
+ einfo "\t\040\040function somewhat. This issue manifests itself when using pl2303 USB->Serial"
+ einfo "\t\040\040adapters."
+ einfo "\t- Other XIO-based devices like MENET and various Impact addons remain"
+ einfo "\t\040\040untested and are not guaranteed to work. This applies to various"
+ einfo "\t\040\040digital video conversion boards as well."
+ echo -e ""
+}
diff --git a/sys-kernel/mips-sources/files/eblits/show_ip32_info-v1.eblit b/sys-kernel/mips-sources/files/eblits/show_ip32_info-v1.eblit
new file mode 100644
index 000000000000..891ecb459210
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/show_ip32_info-v1.eblit
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/show_ip32_info-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit with information/warnings for IP32 (O2) users.
+#
+# If you need to add whitespace for formatting in 'einfo', 'ewarn', or 'eerror', use
+# \040 for a space instead of the standard space. These functions will strip
+# redundant white space.
+
+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 or panic"
+ einfo "\t\040\040the kernel."
+ einfo "\t- X support is limited to the generic fbdev driver. No X gbefb"
+ einfo "\t\040\040driver exists for O2 yet. Patches are welcome, however! :)"
+ echo -e ""
+
+ if use ip32r10k; then
+ eerror "R10000/R12000 Support on IP32 is ${HILITE}HIGHLY EXPERIMENTAL!${NORMAL}"
+ eerror "This is intended ONLY for people interested in fixing it up. And"
+ eerror "by that, I mean people willing to SEND IN PATCHES! If you're not"
+ eerror "interested in debugging this issue seriously or just want to run it"
+ eerror "as a user, then DO NOT USE THIS. Really, we mean it."
+ echo -e ""
+ eerror "All that said, initial testing seems to indicate that this system will"
+ eerror "stay online for a reasonable amount of time and will compile packages."
+ eerror "However, the primary console (which is serial, gbefb seems dead for now)"
+ eerror "will fill with CRIME CPU errors every so often. A majority of these"
+ eerror "seem harmless, however a few non-fatal oopses have also been triggered."
+ echo -e ""
+ eerror "We're interesting in finding anyone with knowledge of the R10000"
+ eerror "workaround for speculative execution listed in the R10000 Processor"
+ eerror "manual, or those who are familiar with the IP32 chipset and the feature"
+ eerror "called \"Juice\"."
+ echo -e ""
+ fi
+
+ eerror "!!! To Build 64bit kernels for SGI O2 (IP32) or SGI Indy/Indigo2 R4x00 (IP22)"
+ eerror "!!! systems, you _need_ to be using a >=gcc-4.1.1 compiler, have CONFIG_BUILD_ELF64"
+ eerror "!!! disabled in your kernel config, and building with the ${HILITE}vmlinux.32${NORMAL} make target."
+ eerror ""
+ eerror "!!! Once done, copy the ${GOOD}vmlinux.32${NORMAL} file and boot that. Do not use the"
+ eerror "!!! ${BAD}vmlinux${NORMAL} file -- this will either not boot on IP22 or result in"
+ eerror "!!! undocumented weirdness on IP32 systems."
+}
diff --git a/sys-kernel/mips-sources/files/eblits/src_unpack-v1.eblit b/sys-kernel/mips-sources/files/eblits/src_unpack-v1.eblit
new file mode 100644
index 000000000000..fc3de1c70c28
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/src_unpack-v1.eblit
@@ -0,0 +1,59 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-sources/files/eblits/src_unpack-v1.eblit,v 1.1 2009/03/16 06:39:10 kumba Exp $
+
+# Eblit to handle src_unpack.
+
+eblit-mips-sources-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-${F_KV}.
+ echo -e ""
+ cd "${WORKDIR}"
+ unpack "${PN}-${F_KV}-patches-v${GENPATCHREV}.tar.bz2"
+
+ # Create a new folder, patch-symlinks, and create symlinks to
+ # 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-${F_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="501*"
+ local p_ip27="502*" p_ip28="503*" p_ip30="504*" p_ip32r10k="6001*"
+ use ip27 && unset p_generic p_ip27
+ use ip28 && unset p_ip28
+ use ip30 && unset p_generic p_ip30
+ use ip32r10k && unset p_ip32r10k
+
+ # 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.
+ local patchlist="${p_generic} ${p_ip27} ${p_ip28} ${p_ip30} ${p_ip32r10k}"
+ 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 v="${F_KV}${EXTRAVERSION}-${GITDATE}"
+ for x in {ip27,ip28,ip30,cobalt}; do use ${x} && v="${v}.${x}" && break; done
+ mv "${WORKDIR}/linux-${F_KV}${EXTRAVERSION}" "${WORKDIR}/linux-${v}"
+ S="${WORKDIR}/linux-${v}"
+
+ # Now go into the kernel source and patch it.
+ cd "${S}"
+ epatch "${WORKDIR}/${psym}"/*.patch
+
+ # Set the EXTRAVERSION to linux-VERSION-mipsgit-GITDATE
+ EXTRAVERSION="${EXTRAVERSION}-mipsgit-${GITDATE}"
+ unpack_set_extraversion
+}