Compiling the new 2.6.26 Kernel for puppy

Using applications, configuring, problems
Message
Author
User avatar
shroomy_bee
Posts: 536
Joined: Sat 28 Jun 2008, 16:54
Contact:

#21 Post by shroomy_bee »

The Hardware Info on the GUI doesn't do all that info either, was why I asked. I thought it would have, cause I was trying to get it to display info on my motherboard here and the likes of graphics chipsets.
It doesn't show anything on the USBs, nor the PCI cards (in the format in the example).

With the other question I was more meaning that there's more to it than just going ahead; like you say, you'd need to be aware of things like editing the boot menu, as well as,

http://www.digitalhermit.com/linux/Kern ... PATCHLEVEL

http://www.digitalhermit.com/linux/Kern ... KUP-CONFIG

It's not much use to find all that out only after you try a failed recompile.

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#22 Post by alcy »

I wonder if I have been too lucky then.

No.

According to the original link I posted, I compile the new kernel in my home directory rather than /usr/src. Also, I have never had to work with patches et al., since I didn't require them (my system worked without them). Backing up .config files can be useful, but hey, I never said I was a pro at this, so use your own discretion too.

Also, HardInfo has been pretty useful to me, since I can already see all the modules that are loaded along with other needed data, including scsi modules et al.

Bruce B

#23 Post by Bruce B »

alcy,

Did you succeed? What Puppy version?

As far as modules loaded, I think a lot of modules are internal and you don't seem them loaded, that Barry (or whoever is compiling these days) used a combination of internal modules and external ones.

A modular - monolithic build combination. I've been lucky also, I think it mainly has to do with recognizing what the words mean.

Bruce

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#24 Post by alcy »

@Bruce

Yes, as far as I know, I did succeed in compiling the kernel for Puppy 4.

Talking of modules, I can tell you what I did, or actually what I think I did.

There were options for building the components into the kernel itself or to compile them as separate modules which could be loaded or unloaded. I went with the former. Also, I should mention that in Puppy actually, I didn't see the options for compiling the components as modules (except a few, like scsi_wait_scan), whereas in Ubuntu I saw the option for compiling as modules in every component.

Bruce B

#25 Post by Bruce B »

alcy

Did you recompile it to make if more efficient and refine for your hardware, to get support that wasn't supported, I curious about why, if you wouldn't mind a brief answer.

If you are up to it, I very interested in the details on this offer to explain what you did and etc.

Bruce

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#26 Post by alcy »

@Bruce

I'd be happy to share.

I had been wanting to do it just for fun, but there were technical reasons too:

1. Puppy 4, with the default kernel was unable to detect my external usb cd drive.

2. I wanted to optimize for the hardware to increase the boot speed.
I got it down from 38.87 seconds to around 30 seconds, which I think is not bad. But, it can be worked on.

3. I am a student and I NEED to know the way around my kernel ! :wink:

4. The OLPC support in the new kernel was an attraction too.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#27 Post by MU »

I would like to build a new Kernel for Muppy, but I am a newbee in this concern.

So I also would appreciate, if someone writes a howto for the current kernel.

Thanks, Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#28 Post by alcy »

MU wrote:I would like to build a new Kernel for Muppy, but I am a newbee in this concern.

So I also would appreciate, if someone writes a howto for the current kernel.

Thanks, Mark
Hey Mark.

All I can say is that since you want to compile the kernel for a complete distribution that is meant for people round the world having different hardware specifications, you'll have to follow some standard guides and I have found this site quite useful, especially the FAQ section :

http://www.kernelnewbies.org

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#29 Post by MU »

ok, I will have a closer look in some days, thanks :)

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#30 Post by erikson »

alcy wrote:Puppy 4, with the default kernel was unable to detect my external usb cd drive.
Question: with your recompiled kernel, are you able to boot a Puppy live-CD (containing the recompiled vmlinuz) from external usb cd drive?
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

Bruce B

#31 Post by Bruce B »

MU wrote:So I also would appreciate, if someone writes a howto for the current kernel.
I'm writing this to everyone, not particularly Mark. Meaning this is not a reply to Mark specifically, just a reply to the question posed, with the intended audience being everyone.

If I could write an excellent howto, I would not do it. But, I'll make some comments about compiling.

Who compiled the Dingo 4.00 kernel? Frankly, I don't know, but think it was Barry. Moreover, who will compile the future kernels?

Two compiling considerations
  • * Do you want to compile from scratch?
    * Do you want to compile using the existing kernel options, and make modifications based on it?
(I've already said how to use the existing kernel options in this topic)

Using the correct source code
  • * you might have to rely on expert authoritative and informed
    opinion, in this case Barry, and;
    * and opt to ignore the README.txt file
The README.txt file, in this case, says that the source code identical to Puppy3 source, with updated squashfs. That it surprisingly compiles in Dingo, yet still works in Puppy3.

It makes no mention of being the source code for 4.00.
README.txt * wrote:This kernel is identical to that in Puppy3, except patched for Squashfs v3.3 instead of v3.2r2.

All the modules from Puppy3 still work with this new kernel, only 'squashfs.ko' is changed.

In fact, I was surprised. I compiled the kernel in Dingo, which has a different compiler and glibc versions than Puppy3, but all the modules from Puppy3 still load without complaint.
* http://puptrix.org/sources/kernel-2.6.2 ... README.txt

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#32 Post by MU »

Bruce, I want to compile for 3 reasons

1.) I could need a newer Kernel, as the old one might not support all new hardware.
Especially wifi is an issue

2.) I'd like to have multicore support. I do not have such a machine yet, but they are widespread meanwhile.

3.) My collegue encountered an issue. If he copies files over network on a machine with sata drives, there are sudden slowdowns. We need to verify, if this is related to the Kernel, or other issues.
As the newest test kernels in Puppy 4 seem to have a very different code for handling drives (no more "hd" , only "sd", we think, that the slowdown might be related to the old code in the Kernel 2.6.21.7. But this is just a vague guess.

So I intend to have a "Standard" Puppy Kernel without exotic addons.

As I maintain an own distro, it would be important, that I learn to compile a kernel on my own.
So I basically just had to learn, how to add Puppy specific patches like squashfs and aufs to a vanilla Kernel.

I am not under pressure with this, my idea was to deal closer with this topic in the end of the year, when I finished some other projects I work on.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Bruce B

#33 Post by Bruce B »

Mark,
MU wrote:1.) I could need a newer Kernel, as the old one might not support all new hardware.
Especially wifi is an issue
In reading posts, I see where the OP claims that such and such a Puppy version has the wifi support, the other version doesn't. It is mostly discouraging for me to read, when the newer version doesn't have the support, but the older version did.

I recommend getting the expert advice of tempestuous. Explain what you want, to have a kernel that supports the broadest range of wifi possible. I'm sure he could and would help with the best advice you can get.

MU wrote:2.) I'd like to have multicore support. I do not have such a machine yet, but they are widespread meanwhile.
It seems to me for the last couple or three years all a person can buy are multicore machines or motherboards or CPUs. To some, Linux may be an OS for their old computer. Yeah, I think that support is very important.
MU wrote:3.) My collegue encountered an issue. If he copies files over network on a machine with sata drives, there are sudden slowdowns. We need to verify, if this is related to the Kernel, or other issues.
MU wrote:
I have no sata drives. I asked forum questions and got a general answer that Puppy supports sata.

I searched Puppy 4.00 files for some sata module keywords and found nothing. I search another distro's files with the same keywords and get hits.

Having pata drives, I download files from ftp servers using wget. It downloads typically at around 450K on a fast server. Then it stops to 0, after a while it starts up again. On a big file like a cdrom size file this cycle repeats itself. It doesn't seem to matter what server I download from, or even the protocol (http,ftp) the behavior is the same. I think the behavior is on my end. Downloading packets faster than it can assemble and write them? I don't know.
MU wrote:As the newest test kernels in Puppy 4 seem to have a very different code for handling drives (no more "hd" , only "sd", we think, that the slowdown might be related to the old code in the Kernel 2.6.21.7. But this is just a vague guess.
The truth is in - the testing results, I suppose. I wonder if there is a generic SATA driver and optionally numerous controller specific modules available at compile time.
MU wrote:So I intend to have a "Standard" Puppy Kernel without exotic addons.

As I maintain an own distro, it would be important, that I learn to compile a kernel on my own.
So I basically just had to learn, how to add Puppy specific patches like squashfs and aufs to a vanilla Kernel.
Barry said the right and complete kernel source is at:
http://puptrix.org/sources/

Presumably:

http://puptrix.org/sources/kernel-2.6.21.7-dingo/

The filename says the patches applied. It doesn't mention anything about an aufs patch.

The unionfs and squashfs are patched. Maybe the current aufs is already in the base code for 2.6.21.7, if not, then what? More questions I suppose.

The aufs is one reason I'm hesitant to use that source, but it does have Barry's approval as the correct source for 4.00.
MU wrote:I am not under pressure with this, my idea was to deal closer with this topic in the end of the year, when I finished some other projects I work on.
I don't know how you manage to do as much as you do, but you do.

I think a person won't have any problem releasing a distro with two or even three kernels, compiled with different options.

Bruce

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#34 Post by alcy »

erikson wrote: Question: with your recompiled kernel, are you able to boot a Puppy live-CD (containing the recompiled vmlinuz) from external usb cd drive?
I did NOT *recompile* the existing kernel.

I compiled a new kernel, keeping the original one intact.

I haven't tried booting the live CD with the newly compiled kernel, but I don't see if there should be a problem in that. As far as boot up is concerned, doesn't it depend on my bios if it supports booting from a CD, rather than on my choice of kernel or whether its an external USB CD drive or an internal CD drive ? .

User avatar
shroomy_bee
Posts: 536
Joined: Sat 28 Jun 2008, 16:54
Contact:

#35 Post by shroomy_bee »

I'm not trying to put you on the spot or anything but I have to ask this because you wrote,
I had been wanting to do it just for fun, but there were technical reasons too:

1. Puppy 4, with the default kernel was unable to detect my external usb cd drive.
so why not check & see if it does boot from the CD (presumably it is now detected)?

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#36 Post by ttuuxxx »

MU wrote:Bruce, I want to compile for 3 reasons

1.) I could need a newer Kernel, as the old one might not support all new hardware.
Especially wifi is an issue

2.) I'd like to have multicore support. I do not have such a machine yet, but they are widespread meanwhile.

3.) My collegue encountered an issue. If he copies files over network on a machine with sata drives, there are sudden slowdowns. We need to verify, if this is related to the Kernel, or other issues.
As the newest test kernels in Puppy 4 seem to have a very different code for handling drives (no more "hd" , only "sd", we think, that the slowdown might be related to the old code in the Kernel 2.6.21.7. But this is just a vague guess.

So I intend to have a "Standard" Puppy Kernel without exotic addons.

As I maintain an own distro, it would be important, that I learn to compile a kernel on my own.
So I basically just had to learn, how to add Puppy specific patches like squashfs and aufs to a vanilla Kernel.

I am not under pressure with this, my idea was to deal closer with this topic in the end of the year, when I finished some other projects I work on.
Mark
Mark I have 3 sata2 hard drives on my building pc, 320,500,750 gigs I never had any problems transferring data between them.
The only problem I have is with the latest one. I had a io error
I can only retrieve software on that drive, It no longer saves fles.
I don't know if that has to do with the kernel in puppy 4.0 or not.
I always figured it would be nice to have Barry's configure code for 4.0 kernel compiling, so we all could see what Barry used to compile. It really would help a few of us understand compiling a kernel better, If we had a example to go off.
ttuuxxx
Attachments
ntfs%20warning.png
(10.46 KiB) Downloaded 1436 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#37 Post by alcy »

shroomy_bee wrote:I'm not trying to put you on the spot or anything but I have to ask this because you wrote,

so why not check & see if it does boot from the CD (presumably it is now detected)?
So I guess I need to make a remaster, right ?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#38 Post by MU »

ttuuxx, the problem appears only, if you copy over network.
E.g. if you copy via Samba to an attached computer.
My colleague was away for some days, but now also will check, if it happens via ftp.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#39 Post by kirk »

I'm using 2.6.26.3 right now with aufs and squashfs-lzma on a frugal install . Compiling a new kernel is not too hard. Doing it with only a frugal install is more challenging. Barry is a pretty organized fellow. Just use his kernel patching notes found here:

http://puptrix.org/sources/kernel-2.6.2 ... quired.txt

to put on what ever patches you need/want.

Copy Puppy's .config into your new kernel source. Make any changes you want to the config file. Then do:

# make oldconfig

This will generate a new config file based on the old one. You'll be asked about any new kernel options. Here's a great web site if you need info on config options: http://cateee.net/lkddb/web-lkddb/

Then type:

# make

and then

# make modules_install

When it's done you'll find your compressed kernel in arch/x86/boot/bzimage. You can rename bzimage to vmlinuz if you like. Your modules will be in /lib/modules.

Note: If you want to use squashfs-lzma with 2.6.26 you'll need a patch. If someone needs it I can dig it up.

Then you'll need to replace the modules in initrd with your new ones, extract the initrd:

# gunzip initrd.gz
# mkdir puppy-init
# cd puppy-init
# cat ../initrd | cpio -d -i

Replace the modules. Then you'll need to depmod the initrd. You can do this if your currently running your new kernel:

# depmod -b <path to extracted initrd>

And then zip your initrd back up:

# cd puppy-init
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz

Again depmod will only work if you are running your new kernel. That can be a problem if your running a frugal install. I don't have a spare partition for a full hard drive install, so I do it with a frugal. You'll need to add depmod to your initrd, the one included in Puppy at /sbin is static so just copy that one into your new initrd and zip it up.

You'll also want to get your main sfs file ready. Extract your sfs file to a folder. If you're running Puppy 4.1 you'll want to rename the file /etc/ modules/firmware.dep.<kernel version> to your new kernel version and replace the modules in /lib/modules

Then boot your new kernel and initrd with pfix=rdsh. Here's a sample grub entry:

title Puppy fatdog-rdsh (on /dev/sda4)
rootnoverify(hd0,3)
kernel /20fd/vmlinuz loglevel=7 psubdir=20fd pfix=rdsh
initrd /20fd/initrd.gz

Once it boots to a prompt, mount the drive that has your extracted initrd (must be a kernel built-in FS type, ext2/3 and drive type, no usb drives) . Then do:

# depmod -b <path to extracted initrd>
# depmod -b <path to extracted sfs file>

Reboot into normal Puppy, remove depmod from your initrd and zip it up again. Mksquashfs your new main sfs file and try it out.

Then for more fun, after booting your new puppy, you can link in your kernel source and compile all of the extra kernel modules like the modem drivers and extra wifi drivers.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#40 Post by MU »

kirk, fantastic, many thanks :D
A very good start for my first experiments!
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply