Page 1 of 3

Compiling the new 2.6.26 Kernel for puppy

Posted: Sun 14 Sep 2008, 17:14
by PlatonicPimp
As you might know, I'm trying to get puppy to work on my OLPC. Apparently the latest Kernel release includes support for the OLPC out of the box, so I'd like to try that out. The trouble is, I've never compiled anything before, much less a kernel,, and I understand from reading here that to work for puppy a kernel needs specific patching.

So the questions are:
Can anyone recommend a good overview on compiling a Kernel?
How do I specifically compile the kernel for Dingo 4.0?
What patches do I need to apply for puppy, where do I get them, and how do I apply them?

Also, There seemed to be mention of a repository of kernel source modified for puppy already. Where is that, does it already have 2.6.26, and if not, maybe we can make that source to add to the depository?

Posted: Wed 17 Sep 2008, 00:08
by Aitch
Hi Platonic Pimp

Not sure that you won't have already seen this?

http://www.murga-linux.com/puppy/viewto ... c16c9db471

& Barry's Blog

http://www.puppylinux.com/blog/?viewDetailed=00169

& Steffan's Howto

http://www.murga-linux.com/puppy/viewto ... 8695e7c6dd

HTH

Aitch :)

Re: Compiling the new 2.6.26 Kernel for puppy

Posted: Wed 17 Sep 2008, 08:38
by Bruce B
PlatonicPimp wrote: What patches do I need to apply for puppy, where do I get them, and how do I apply them?
It is wise to consider the question before wasting your time compiling it.

The developer is supposed to include the complete* kernel software used in the compilation, with the distribution; or include a written offer, with the distribution, to provide it.

The complete source code is obviously not included in the Puppy distribution. The distribution doesn't offer to provide it either.

In view of it not being offered, you can ask the developer.

* Definition of complete source code:
  • For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.
Emphasis mine, verbatim copy from a portion of Section 3 of GPL version 2

That's how I think it should be. And what you need is the complete source code.

Posted: Wed 17 Sep 2008, 08:51
by Bruce B
Aitch wrote:Hi Platonic Pimp

Not sure that you won't have already seen this?

http://www.murga-linux.com/puppy/viewto ... c16c9db471

{text cut}

Aitch :)
What struck me as odd about the link you provided was the guy was looking to download the kernel source code and couldn't find it.

At first glance, there doesn't seem anything odd about that does there?

But my experience with Vector Linux is they include the kernel source code with the distribution. Meaning to say, I think the guy already had the code in the .iso file and / or on his cd disc and then started looking in all the places it wasn't.

Bruce

Posted: Wed 17 Sep 2008, 10:27
by BarryK
The kernel source, patches, 3rd-party drivers, are always made available for download. Where? Well, look at the download page, which has the appropriate link:

http://puppylinux.com/download/

The link is to:

http://puptrix.org/sources/

Posted: Wed 17 Sep 2008, 13:27
by magerlab
Is it posiible to have a special power-saving kernel for netbooks
like in Ubuntu
http://www.ubuntu-eee.com/index.php5?ti ... nux_kernel
and to use powertop with puppy linux

Posted: Wed 17 Sep 2008, 15:28
by PlatonicPimp
Bruce, I'm not sure I'm following you. Yes, Puppy does include the complete Kernel, I'm trying to use a later one. So as I understand this, the Developer did provide the complete code, I just want to replace parts of it and I'm not skilled enough to recognize what to do without help.

Honestly I have no business attempting a kernel recompile at my skill level in linux, but it doesn't look like anyone else is going to port puppy to the XO for me.

Aitch, thanks for the links, that's a big help. I still don't understand quite a bit of it, But I have the feeling that the information I need is contained there, and I just have to learn what I'm doing. Right now I'm wondering, if I want to swap the Kernel, if I can do that with Puppy Unleashed or if I'm going to have to go with Puppy from scratch.

Posted: Wed 17 Sep 2008, 16:07
by trapster
Years ago when I played with RedHat, I seem to recall a gui for kernel configuration.
Is there still such a beast out there that would work with puppy?

Posted: Wed 17 Sep 2008, 16:11
by Bruce B
PlatonicPimp wrote:Bruce, I'm not sure I'm following you. Yes, Puppy does include the complete Kernel, I'm trying to use a later one. So as I understand this, the Developer did provide the complete code, I just want to replace parts of it and I'm not skilled enough to recognize what to do without help.
If that's true, I was wrong.
PlatonicPimp wrote:Honestly I have no business attempting a kernel recompile at my skill level in linux, but it doesn't look like anyone else is going to port puppy to the XO for me.


That's why sometimes people need to recompile the kernel, in order to have support for something it wasn't compiled for.
PlatonicPimp wrote:Aitch, thanks for the links, that's a big help. I still don't understand quite a bit of it, But I have the feeling that the information I need is contained there, and I just have to learn what I'm doing. Right now I'm wondering, if I want to swap the Kernel, if I can do that with Puppy Unleashed or if I'm going to have to go with Puppy from scratch.
Somethings don't change. Linux is not one of them. Two of the three links Aitch referenced are three years old. Some of the content in those posts are timeless, other parts are dated and kernel specific.

There are plenty of kernel compiling tutorials on the web. Review a few of them and see which ones speak best to you. Then study, it is not all that hard.

Tip: You probably don't want to vary much from the way the kernel was compiled. There is a very important file you will want to use and understand at /lib/modules/DOTconfig-K2.6.21.7 (for Dingo 4.00)

Posted: Wed 17 Sep 2008, 16:18
by Bruce B
trapster wrote:Years ago when I played with RedHat, I seem to recall a gui for kernel configuration.
Is there still such a beast out there that would work with puppy?
There are different ways to compile the kernel, and yes easy to use interfaces are included with the kernel. It is mostly a matter of checking or not checking options.

If the file I referenced in my last post is used, the existing options are already checked and unchecked. Then, it's just a matter of seeing what else needs to be checked or maybe unchecked.

Posted: Wed 17 Sep 2008, 16:26
by Aitch
trapster wrote:Years ago when I played with RedHat, I seem to recall a gui for kernel configuration.
Is there still such a beast out there that would work with puppy?
maybe something like this, trapster? [way out of my league]

http://linux.softpedia.com/get/System/O ... 5572.shtml

though it was more likely linuxconf, top of the list, here

http://www.comptechdoc.org/os/linux/use ... gdiag.html

@Bruce - Yes, I knew they were old, but as you say, some things never change & on balance, IMHO, they were more useful than nowt [or, not]

Aitch :)
edit: dang, Bruce, it doesn't seem to warn of a post, if you are editing :D

Posted: Wed 17 Sep 2008, 17:20
by Bruce B
A picture of the interface attached

Posted: Wed 17 Sep 2008, 19:27
by alcy
@topic-starter:

For getting started about kernel compilation:

http://kernelnewbies.org/FAQ/KernelCompilation

I have compiled the kernel (latest stable 2.6.26.5) for Dingo for my classmate clone and had nothing to look for beyond that link. Obviously I have crashed the system quite a few times due to bad kernel configuration, but kernel compilation isn't that hard. In fact, its fun and satisfactory. Even if you go for the most basic command line interface , even that's full of help. You just gotta be patient and gotta know the basic hardware information(a little more will be helpful, though !) about your system. Oh and having a lot of free time for experimenting is quite helpful too. ;)

Also, I should mention that compiling the kernel for Puppy has been far more consistent and easier when compared to Ubuntu (and probably other distributions as well). So, go ahead, crash your system few times and get that thing working !

You do need to have the devx_400.sfs package installed first.

Have fun.

Posted: Wed 17 Sep 2008, 20:30
by trapster
OK, I give up Bruce. What program is that a picture of?

Posted: Wed 17 Sep 2008, 22:38
by Aitch
also available - kernel config, needs basic but not QT3/4 as KCC [previous link]

http://linux.softpedia.com/get/System/O ... 4075.shtml

Aitch :)

Posted: Thu 18 Sep 2008, 04:18
by Bruce B
trapster wrote:OK, I give up Bruce. What program is that a picture of?
It's the GUI you referenced earlier. It's part of the kernel source code, you build the configuration program by running the 'make xconfig' command when you are compiling the kernel.

Another configuration utility is ncurses based, you build it by running the 'make menuconfig' command.

Posted: Thu 18 Sep 2008, 11:38
by shroomy_bee
re: going ahead & crashing your system.

How are you meant to get back into your OS to try compiling it again, if it hasn't recompiled correctly?

Posted: Thu 18 Sep 2008, 12:01
by shroomy_bee
re: this link from the link in alcy's post -

http://www.digitalhermit.com/linux/Kern ... HOWTO.html

What is the Puppy equivalent command to see hw info? The various switches for lspci do not give the info as the link shows.

Posted: Thu 18 Sep 2008, 16:04
by alcy
shroomy_bee wrote:
How are you meant to get back into your OS to try compiling it again, if it hasn't recompiled correctly?
When you compile the new kernel, you get a bzImage or the kernel image. It doesn't replace the existing kernel. You just rename the newly compiled kernel image as vmlinuz-x.x.x and place an entry for it in the menu.lst file. That's it. Now you have the choice of booting linux with whichever kernel version you want. If one gets crashed, you always have the original kernel.

Posted: Thu 18 Sep 2008, 16:08
by alcy
shroomy_bee wrote:
What is the Puppy equivalent command to see hw info? The various switches for lspci do not give the info as the link shows.
There's an entry for HardInfo hardware information under Menu-->System. You can check it out.