From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7740 invoked by uid 1002); 20 Oct 2003 04:32:44 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 1789 invoked from network); 20 Oct 2003 04:32:44 -0000 Message-ID: <3F9365A5.5000509@gentoo.org> Date: Mon, 20 Oct 2003 00:33:41 -0400 From: Kumba Reply-To: kumba@gentoo.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gentoo-dev@gentoo.org References: <1066617251.991.5.camel@sfa237013.richmond.edu> In-Reply-To: <1066617251.991.5.camel@sfa237013.richmond.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [gentoo-dev] Patches and the 2.4->2.6 move X-Archives-Salt: 53f7d473-1480-436a-b71e-b2f4c29cd8eb X-Archives-Hash: bdec28610ea313b1c22c7098669a7c83 Donnie Berkholz wrote: > I'd like some input on this: > > I have a patch that fixes SSE problems on 2.4 kernels. However, on 2.6 > kernels it breaks OpenGL (applications segfault). > > Currently I'm applying this patch if /usr/src/linux is linked to a 2.4 > kernel at compile-time. > > This means that if a user emerges xfree when linked to a 2.4 kernel, > that user will need to remerge xfree after moving to 2.6 kernels. This > takes about 40 minutes on a ~2GHz x86. However, if this patch is not > applied, the bug will continue to exist for all Gentoo users on 2.4 > kernels. > > My request to you is: > 1) Is this acceptable? > 2) If not, what is a better solution? Dropping the patch entirely? Note > that I don't know Mesa/programming well enough to write a patch > compatible for both 2.4 and 2.6 kernels. > > Thanks, > Donnie Here's an idea. Bit demented, though. First, why check /usr/src/linux? IMHO, that link may or may not always be there or be correct. I recommend instead using the get_KV and KV_to_int functions defined in /sbin/functions.sh to determine what the machine is currently running. The second part is where to apply the patch, and how. This is the difficult part. I'd first say to apply it from the kernel.eclass file, but this likely goes against some odd policy somewheres, which means most modern 2.4 ebuilds would need updating to use this patch. Alot of work is involved in tweaking all the 2.4 sources ebuilds. The third part is How to know when to apply the patch? In pseudo-codish form, here is what I can come up with. if KV_to_int(get_KV) <= KV_to_int(2.4.99) then if (use x86) && (use xfree) then epatch echo "${BAD}*${NORMAL} " echo "${BAD}*${NORMAL} BIG FAT WARNING: You are running Xfree on an x86 system and are running a 2.4 kernel. echo "${BAD}*${NORMAL} Because of this, a patch has been applied to the kernel to fix some SSE/3DNOW problems." echo "${BAD}*${NORMAL} This patch requires you to rebuild Xfree in order to take advantage of the patch's" echo "${BAD}*${NORMAL} benefits. Please note that this patch is only for 2.4 kernels. If you move to a 2.6" echo "${BAD}*${NORMAL} kernel, you WILL need to re-merge Xfree, otherwise OpenGL-based applications" echo "${BAD}*${NORMAL} will fail in X." echo "${BAD}*${NORMAL} " fi fi That should go into pkg_postinst, and probably include a sleep delay timer + bell dinging like on portage and baselayout ebuilds to get the attention of users. All speculation, of course, but it's a slow night and I'm in brainstorm mode. --Kumba -- "Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere." --Elrond -- gentoo-dev@gentoo.org mailing list