aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-01-13 21:44:55 +0000
committerSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-01-13 21:44:55 +0000
commit3acf7f6b3544eeab3e770500c72358d261884ed0 (patch)
tree2674f4d425e082667ee51a05a75281ee0dce355a /sys-kernel
parentAdded consolekit (diff)
downloadembedded-cross-3acf7f6b3544eeab3e770500c72358d261884ed0.tar.gz
embedded-cross-3acf7f6b3544eeab3e770500c72358d261884ed0.tar.bz2
embedded-cross-3acf7f6b3544eeab3e770500c72358d261884ed0.zip
Added (somewhat outdated) openmoko kernel sources
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/openmoko-stable-sources/Manifest2
-rw-r--r--sys-kernel/openmoko-stable-sources/files/time_aeabi_uldivmod.patch16
-rw-r--r--sys-kernel/openmoko-stable-sources/openmoko-stable-sources-20081008.ebuild63
3 files changed, 81 insertions, 0 deletions
diff --git a/sys-kernel/openmoko-stable-sources/Manifest b/sys-kernel/openmoko-stable-sources/Manifest
new file mode 100644
index 0000000..74755ee
--- /dev/null
+++ b/sys-kernel/openmoko-stable-sources/Manifest
@@ -0,0 +1,2 @@
+AUX time_aeabi_uldivmod.patch 519 RMD160 bea442dc33ae0f5cd2ae06fdfe5230453fba58df SHA1 ffaef35341f7209214354d57f9d8500657eba66d SHA256 a795ba5ab33b7054b99db661163e15de4ccca4b6038f2eb0bc8f8751dfe109cb
+EBUILD openmoko-stable-sources-20081008.ebuild 1472 RMD160 2cb9166ee92d898b0416e9be4a2f3afdb0b1f02c SHA1 a983ee0d12bf15cd337ca7bcd41f324777cb25e2 SHA256 25c3265c9c003d136e0ce496ad4d969613304ee9f2ee1cf4f9c39ccd7b07f655
diff --git a/sys-kernel/openmoko-stable-sources/files/time_aeabi_uldivmod.patch b/sys-kernel/openmoko-stable-sources/files/time_aeabi_uldivmod.patch
new file mode 100644
index 0000000..80e9f04
--- /dev/null
+++ b/sys-kernel/openmoko-stable-sources/files/time_aeabi_uldivmod.patch
@@ -0,0 +1,16 @@
+Prevent gcc-4.3 form "optimizing" the while loop into a costly modulo operation.
+Patch found at http://lkml.org/lkml/2008/2/22/464.
+
+--- include/linux/time.h 2008-10-09 19:47:23.000000000 +0200
++++ include/linux/time.h.new 2008-10-09 19:47:54.000000000 +0200
+@@ -173,6 +173,10 @@
+ {
+ ns += a->tv_nsec;
+ while(unlikely(ns >= NSEC_PER_SEC)) {
++ /* The following asm() prevents the compiler from
++ * optimising this loop into a modulo operation. */
++ asm("" : "+r"(ns));
++
+ ns -= NSEC_PER_SEC;
+ a->tv_sec++;
+ }
diff --git a/sys-kernel/openmoko-stable-sources/openmoko-stable-sources-20081008.ebuild b/sys-kernel/openmoko-stable-sources/openmoko-stable-sources-20081008.ebuild
new file mode 100644
index 0000000..9b18a59
--- /dev/null
+++ b/sys-kernel/openmoko-stable-sources/openmoko-stable-sources-20081008.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="Stable kernel for Openmoko devices"
+HOMEPAGE="http://www.openmoko.org/"
+SRC_URI=""
+EGIT_REPO_URI="git://git.openmoko.org/git/kernel.git"
+EGIT_TREE="a2ef813d2f439a3e9f377d33a2e5baad098afb7e"
+EGIT_BRANCH="stable"
+
+ETYPE="sources"
+OKV="2.6.24"
+CKV="-${PVR}"
+
+K_NOUSENAME="yes"
+K_NOSETEXTRAVERSION="yes"
+K_SECURITY_UNSUPPORTED="yes"
+
+inherit git kernel-2 toolchain-funcs
+detect_version
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="arm"
+
+IUSE=""
+DOCS=""
+
+RDEPEND=""
+DEPEND="sys-devel/gcc
+ dev-embedded/u-boot-tools"
+
+MY_P="linux-${OKV}${CKV}"
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ # Fetch and unpack current git sources
+ git_src_unpack
+
+ # Fix compilation error with gcc-4.3
+ epatch "${FILESDIR}/time_aeabi_uldivmod.patch"
+}
+
+pkg_postinst() {
+ postinst_sources
+ einfo "The kernel source is now installed in"
+ einfo " ${ROOT}/usr/src/linux."
+ einfo "Please change to this directory to configure and build the kernel."
+ einfo ""
+ einfo "To use a default kernel-configuration for your device, rename one"
+ einfo "of the defconfig-<device> files to .config"
+
+ if tc-is-cross-compiler ; then
+ ewarn ""
+ ewarn "NOTE: If you are cross-compiling you have to run"
+ ewarn " make ARCH=arm CROSS_COMPILE=${CHOST}- INSTALL_MOD_PATH=${ROOT}"
+ ewarn "instead of just"
+ ewarn " make"
+ ewarn "to configure, compile and install the kernel + modules."
+ fi
+}
+