blob: e62755ac7ebdc85af933d9aabd2d13efcdebd43b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc64-sources/ppc64-sources-2.6.6.ebuild,v 1.2 2004/06/24 23:00:36 agriffis Exp $
ETYPE="sources"
inherit kernel
OKV="2.6.6"
######## last BK changeset in this patch: 1.1390
AMV=1
EXTRAVERSION="-${PR}"
KV=${PV}${EXTRAVERSION}
S=${WORKDIR}/${PN}-${KV}
inherit eutils
IUSE="extlib"
# What's in this kernel?
# INCLUDED: 2.6 ames snapshot
DESCRIPTION="Full sources for the linux kernel 2.6 with ames's patchset"
SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${OKV}.tar.bz2
mirror://kernel/ppc64-ames266-1.patch.gz"
KEYWORDS="-ppc ppc64"
DEPEND=" extlib? ( dev-libs/ucl )"
RDEPEND="sys-apps/module-init-tools"
SLOT=${KV}
PROVIDE="virtual/linux-sources
virtual/alsa"
src_unpack() {
cd ${WORKDIR}
unpack linux-${OKV}.tar.bz2
mv linux-${OKV} ${S}
cd ${S}
cp ${DISTDIR}/ppc64-ames266-1.patch.gz ${WORKDIR}
gunzip ${WORKDIR}/ppc64-ames266-1.patch.gz
epatch ${WORKDIR}/ppc64-ames266-1.patch
rm ${WORKDIR}/ppc64-ames266-1.patch
# Gentoo Linux uses /boot, so fix 'make install' to work properly
# also fix the EXTRAVERSION
mv Makefile Makefile.orig
sed -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \
-e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" \
Makefile.orig >Makefile || die # test, remove me if Makefile ok
rm Makefile.orig
cd Documentation/DocBook
sed -e "s:db2:docbook2:g" Makefile > Makefile.new \
&& mv Makefile.new Makefile
cd ${S}
# This is needed on > 2.5
MY_ARCH=${ARCH}
unset ARCH
# Sometimes we have icky kernel symbols; this seems to get rid of them
make mrproper || die "make mrproper died"
ARCH=${MY_ARCH}
}
src_install() {
dodir /usr/src
echo ">>> Copying sources..."
mv ${WORKDIR}/* ${D}/usr/src
}
pkg_postinst() {
if [ ! -e ${ROOT}usr/src/linux ]
then
ln -sf ppc64-sources-2.6.6-r0 ${ROOT}/usr/src/linux
fi
ewarn "Please note that ptyfs support has been removed from devfs"
ewarn "in the later 2.6 kernels, and you have to compile it in now,"
ewarn "or else you will get errors when trying to open a pty."
ewarn "The option is File systems->Pseudo filesystems->/dev/pts"
ewarn "filesystem."
echo
ewarn "Also, note that you must compile in support for"
ewarn "input devices (Input device support->Input devices),"
ewarn "the virtual terminal (Character Devices->Virtual terminal),"
ewarn "and the vt_console (Character Devices->Support for console...)."
ewarn "Otherwise, you will get the dreaded \"Uncompressing the Kernel\""
ewarn "error."
echo
ewarn "DONT enable preempt as it's very broken on ppc64, also"
ewarn "rivafb and the mac floppy drivers are both broken. NVidia"
ewarn "users should use the openfirmware framebuffer for now."
echo
einfo "Consult http://www.linux.org.uk/~davej/docs/post-halloween-2.6.txt"
einfo "for more info about the 2.6 series."
echo
}
|