Kernel compiling question

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
PupGeek
Posts: 353
Joined: Sun 06 Sep 2009, 11:30

Kernel compiling question

#1 Post by PupGeek »

I am looking into compiling a real-time kernel for my ProducerPup, based on Puppy 4.2.1 using kernel 2.6.25.16. Most of the packages I added on came from ArtistX 0.5 using kernel 2.6.25.2 and they all work. I cannot find a real-time patch for 2.6.25.16 but was able to find an rt patch for 2.6.25.4. I was also able to download the 2.6.25.4 source as well as the 2.5.25.16 patch.

My question is, after applying all the necessary patches for puppy, would I be able to apply the rt patch to the 2.6.25.4 kernel and then apply the 2.6.25.16 patch afterwards?

I would like to keep the kernel versions the same if I can because I do not know if the default puppy apps will work with a lesser kernel version. My custom applications should be fine though. I would also like to add boot support for LSI Fusion MPT scsi interfaces as well.

P.S. If there is a clearly written and detailed HOW-TO on how to build a puppy kernel available, please feel free to post a link here. I can use all the help I can get, as this is a first for me.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#2 Post by pemasu »

Only puppy kernel howto which I know outside Barrys pages.

http://brainwavedesigncentral.net/dima/ ... nel-howto/

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#3 Post by tempestuous »

Official Puppy kernel information has been here for years -
http://www.puppylinux.com/development/compilekernel.htm

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#4 Post by tempestuous »

I have built many realtime kernels over the years.
Since you're building a new kernel from scratch, there's no need to restrict yourself to a particular kernel version, except that you could save yourself some work by using pre-patched Puppy kernel source. The pre-patched kernel source for Puppy 4.1/4.2 is here -
http://bkhome.org/sources/kernel-2.6.25 ... _mt.tar.gz

Regarding realtime patches, you're probably aware of competing versions of tweaks by different kernel developers.
The dust has now settled, somewhat, and many tweaks have been "officially" accepted into the kernel source. They just need to be enabled. Specifically I'm referring to these kernel settings:
- Tickless System (Dynamic Ticks)
- High Resolution Timer Support
- Preemption Mode > Complete Preemption (Real-Time)
- Timer frequency 1000 HZ

Then to get full Realtime preemption, you need a compatible patch from here -
https://rt.wiki.kernel.org/index.php/CO ... T_RT_Patch
As you can see, the closest versions to 2.6.25.16 are either 2.6.24.7 or 2.6.26.8.

PupGeek
Posts: 353
Joined: Sun 06 Sep 2009, 11:30

#5 Post by PupGeek »

I'm just sticking with the same kernel version for right now to keep it as simple as I can. Maybe if I find some success with it, I can go ahead and try different versions, and perhaps even different puppy versions as well. Truth is, I have never had any success in compiling programs, largely due to my lack of a home internet connection and dependency issues. I seem to be doing ok (on paper, at least) with compiling kernel source and modules, now I got to find the time to get the ramdrive together.

I looked at the 2.6.25.16 menuconfig and found that I have all the items mentioned above for realtime except for complete pre-emption. I can go as far as low-latency. Honestly, I have never had a problem with the default kernel. This is one of those "might as well" items that might be useful to someone else.

I'm guessing that to boot from a drive connected to an LSI Fusion mpt scsi controller (my real motive for recompiling the kernel), I would need the fusion modules inserted into the initrd's lib/modules/drivers/messages directory (that is the directory in the sources I have located them in after doing a make modules) as well as having fusion support enabled in the kernel. I just have to find the time to try it out. Sometimes a tutorial can take you most of the way but leave enough ambiguity for an incomplete puzzle to solve.

PupGeek
Posts: 353
Joined: Sun 06 Sep 2009, 11:30

#6 Post by PupGeek »

Booyah! Just for kicks and giggles, I manually did a frugal install of puppy on my server with the original kernel and as expected, it did not see my scsi drives through the fusion interface. I then rebooted into my ubuntu and from there, using vnc, samba, and my other computer running the same puppy, copied the newly compiled kernel and replaced it on my new frugal install on the server and it worked. Turns out, I did not even have to make a new initrd file (I found this out after already extracting a copy of the initrd.gz and adding the fusion objects to it, but later switching to the original initrd.gz), as I was using the same kernel version. Next step: configuring the kernel for low-latency too. Once I get the kernel configured for low-latency, or maybe even compile a realtime kernel, I will upload the fusion capable ProducerPup iso to MU's host.

Thank you all for your help and patience. It turns out recompiling the kernel was much easier than I ever expected.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#7 Post by technosaurus »

better overall latency for desktops by Con Kolivas
http://www.kernel.org/pub/linux/kernel/ ... atio.patch
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply