Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Sep 2014, 02:12
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Compiling the new 2.6.26 Kernel for puppy
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [53 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
Bruce B


Joined: 18 May 2005
Posts: 11108
Location: The Peoples Republic of California

PostPosted: Sat 20 Sep 2008, 22:22    Post subject:  

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.21.7-dingo/README.txt

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Sat 20 Sep 2008, 23:40    Post subject:  

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

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Bruce B


Joined: 18 May 2005
Posts: 11108
Location: The Peoples Republic of California

PostPosted: Sun 21 Sep 2008, 01:09    Post subject:  

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.

[quote="MU"]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.[quote="MU"]

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

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
alcy

Joined: 04 May 2008
Posts: 144

PostPosted: Sun 21 Sep 2008, 04:08    Post subject:  

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 ? .
Back to top
View user's profile Send private message 
shroomy_bee


Joined: 28 Jun 2008
Posts: 666

PostPosted: Wed 24 Sep 2008, 06:34    Post subject:  

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

Quote:
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)?
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10750
Location: Ontario Canada,Sydney Australia

PostPosted: Wed 24 Sep 2008, 06:52    Post subject:  

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
ntfs%20warning.png
 Description   
 Filesize   10.46 KB
 Viewed   1363 Time(s)

ntfs%20warning.png


_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
alcy

Joined: 04 May 2008
Posts: 144

PostPosted: Wed 24 Sep 2008, 12:38    Post subject:  

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 ?
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 24 Sep 2008, 13:25    Post subject:  

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

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
kirk

Joined: 11 Nov 2005
Posts: 1408
Location: florida

PostPosted: Wed 24 Sep 2008, 23:29    Post subject:  

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.25.16/patches-required.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.
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 24 Sep 2008, 23:33    Post subject:  

kirk, fantastic, many thanks Very Happy
A very good start for my first experiments!
Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
shroomy_bee


Joined: 28 Jun 2008
Posts: 666

PostPosted: Thu 25 Sep 2008, 10:17    Post subject:  

Alcy:

a remaster? I don't follow you. As far as I know, 'remaster' means the same thing as 'recompile' - but don't quote me on that, cause the first time I heard 'remaster' used in this context was yesterday, when I was searching a security forum elsewhere for posts on recompiles.
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10750
Location: Ontario Canada,Sydney Australia

PostPosted: Thu 25 Sep 2008, 10:35    Post subject:  

shroomy_bee wrote:
Alcy:

a remaster? I don't follow you. As far as I know, 'remaster' means the same thing as 'recompile' - but don't quote me on that, cause the first time I heard 'remaster' used in this context was yesterday, when I was searching a security forum elsewhere for posts on recompiles.

A lot of puppy derivatives are remaster, basically it takes a image of what you have while running live and makes a iso out of it, or you could also use puppy unleashed script which is different. The reason why he is asking to remaster, is because he made some really big changes and wanted to see if they actually worked after reboot, and if so he could upload his new iso and share it with us.
Or a simpler way to understand is
a remaster is everything you've done from a pristine state and builds a iso image of the end result.
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Thu 25 Sep 2008, 20:16    Post subject:  

kirk wrote:
I'm using 2.6.26.3 right now with aufs and squashfs-lzma on a frugal install .


Sounds cool. I'm trying to jump a full install up to 2.6.26.5 right now.

Only two of the patches for the latest puppy don't work. The others give a few "offset" messages, but they seem to work ok.

I fixed one and attached it (ti_usb_3410_5052-2.6.26.5.diff). Don't even know what this is for, but I figured it's in there now I should fix it for whoever. I only had to fix 3 hunks and it was mainly line issue problems. Should work ok.

Kirk, where did you find LZMA patch that works with 2.6.26x?

wrote:
When it's done you'll find your compressed kernel in arch/x86/boot/bzimage.


Can anyone think of a reason why my bzimage is not correct?

I've compiled the kernel before and had no problems so I'm at a loss right now.

Using DOTconfig-K2.6.25.16-26AUG08-STANDARD and BK's patched source my bzimage ends up at 16K and ROX says:

"Linux kernel x86 boot executable RO-rootFS, root_dev 0x802, Normal VGA"

The kernel in Puppy is 1590K and ROX says:

"Linux kernel x86 boot executable RO-rootFS, root_dev 0x1601, swap_dev 0x1, Normal VGA"

Obviously something is wrong. I've done all manner of 'make', 'make modules', 'make bzImage' and it's there but doesn't work and the previous problems are there.
ti_usb_3410_5052-2.6.26.5.diff.gz
Description  ti_usb_3410_5052.dff for kernel 2.6.26.5 (probably 1-4 also)
gz

 Download 
Filename  ti_usb_3410_5052-2.6.26.5.diff.gz 
Filesize  1.93 KB 
Downloaded  270 Time(s) 
Back to top
View user's profile Send private message 
kirk

Joined: 11 Nov 2005
Posts: 1408
Location: florida

PostPosted: Thu 25 Sep 2008, 22:33    Post subject:  

For squashfs-lzma the normal patches are here: http://www.squashfs-lzma.org/

Use Barry's 4300_squashfs-3.3.patch kernel patch instead of the one included in the squashfs-3.3 package. And use Barry's instructions for patching Puppy 2.17 found in patches-required.txt.

Kernel 2.6.26 won't load a tainted module (previous kernels would just post a message and load it) I've attached a patch for 2.6.26.3 to make it load tainted modules as in the past. You might have to edit it for a newer kernel. Change into you kernel source directory and do a patch -p1 < ../linux*.diff

I didn't use all the patches that Barry did. Some are known not to work with 2.6.26 and some I had no interest in. I used these patches:

Loglevel
Squashfs-lzma (like in 2.17)
splice-2.6.23.patch
fsync_super-2.6.19.patch
deny_write_access.patch

I didn't use the linux-lzma patch, don't really see the need unless your doing a unipup, or the gprs patches or unionfs.

I don't know why your kernel isn't working. I've never had to do "make bzimage" I'll attach my config file for 2.6.26.3. Note that I've changed a few options like Pentium3, SMP, tickless. That off the top of my head.

Also, the squashfs-lzma modules are compiled separate from the kernel, so they can be compiled for the stock kernel if someone wants.
dot.config.gz
Description 
gz

 Download 
Filename  dot.config.gz 
Filesize  18.67 KB 
Downloaded  321 Time(s) 
linux-2.6.26-kernel-module.c.diff.gz
Description 
gz

 Download 
Filename  linux-2.6.26-kernel-module.c.diff.gz 
Filesize  364 Bytes 
Downloaded  279 Time(s) 
Back to top
View user's profile Send private message 
alcy

Joined: 04 May 2008
Posts: 144

PostPosted: Fri 26 Sep 2008, 03:08    Post subject:  

kirk wrote:


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.



Hey kirk, I don't really know the significance of this part of the procedure you've posted, about the initrd.gz. Is it something specific to the frugal install, and if not, why have I been able to get away without doing any of it, and still be running the new kernel (which works fine) ? Please help ! (I have a full install Puppy 4)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [53 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2777s ][ Queries: 12 (0.0417s) ][ GZIP on ]