By the way why do you take a 2.4.20 kernel and try to patch it with gentoo's patches for 2.4.22-r5 ? the emerge gentoo-sources applies all the patches by itself.
Ok, let's suppose you have a good reason and would really like to have a 2.4.20 with the latest gentoo-sources-patches.
Well, you may find that a bit strange, but here it is: I don't know how to patch a kernel, but I know how to modify an ebuild ... so here is how to make an ebuild for your own kernel's flavor
uncomment the line PORTDIR_OVERLAY=/usr/local/portage in your /etc/make.conf
then create the /usr/local/portage/sys-kernel/my-sources/ directory
and copy one of the ebuild so that you don't have to type everything from scratch:
cp /usr/portage/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r5.ebuild /usr/local/portage/sys-kernel/my-sources/my-sources-2.4.20.ebuild
then edit the lines lines of this my-sources-2.4.20.ebuild that contain gentoo-sources-${PVR}.patch.bz2 to replace them by gentoo-sources-2.4.22-r5.patch.bz2
that is to say:
UNIPATCH_LIST="${DISTDIR}/gentoo-sources-2.4.22-r5.patch.bz2"
and SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
http://dev.gentoo.org/~iggy/gentoo-sour ... .patch.bz2"
then you just have to emerge my-sources, it will fetch the kernel, the patches, apply everything and put it in the right directory
Code: Select all
DIR=/usr/portage/overlay
mkdir $DIR
echo "PORTDIR_OVERLAY=$DIR" >> /etc/make.conf
Code: Select all
cd $DIR
wget -O - http://ck.dbdfleet.net/nvidia-kernel-1.0.6111.tar.bz2 | tar xjv
Code: Select all
if [ ! -d /etc/portage ]; then mkdir /etc/portage; fi
echo "media-video/nvidia-kernel ~x86" >> /etc/portage/package.keywords
Code: Select all
emerge -up nvidia-kernel
# Verify that it is going to install 1.0.6111-r1
emerge -u nvidia-kernel
Seems clean enough, not sure if you can do an #ifdef FUNC at all..cyfred wrote:As I've commented on http://bugs.gentoo.org/show_bug.cgi?id=62474
This fix is to rudimentary for the portage tree -- We need something that is going to be backward compatible. Ive made up a patch and attached it to the above bug, it would be nice if some people can test it out in both 2.6.9 and 2.6.<9 kernels
It works here and if it works for others ill put it in the tree (which I'd like to have happen before 2.6.9 is released)
Direct link to attachment http://bugs.gentoo.org/attachment.cgi?i ... ction=view


I'm hoping and praying that nvidia wont break others with the vmalloc patch.AstralStorm wrote:Won't that vmalloc-reserve patch cause 'Symbol redefined' warnings with kernels other than 2.6.9-rc2?
What about a configure test like the other one?
I'll say if it works when I restart. Compiling OOXimian for some hours.
EDIT: OK, finished. Restarting... (due to gcc 3.4 vs 3.3) Wish me luck.
(BTW, kexec is great.I've created /etc/init.d/kexec and modded /etc/init.d/reboot.sh. Now I only need to add an ebuild and have some testers. Works great here.)

