Cutting edge kernel for 2.17

Under development: PCMCIA, wireless, etc.
Message
Author
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

Cutting edge kernel for 2.17

#1 Post by tempestuous »

On the News Blog Barry mentioned that there may be an alternative cutting-edge version of the next Puppy kernel.
http://www.puppylinux.net/news/comments ... 703-092842

I decided to test some of the kernel changes suggested, especially the RealTime (low-latency) patch by Ingo Molnar from http://people.redhat.com/mingo/realtime-preempt/
This patch, plus the preemptible kernel patch by Con Kolivas, are both highly regarded by musicians using midi production applications in Linux.
A few years ago both of these patches could co-exist, but it appears that the current versions interfere with each other, so I only applied the Ingo Molnar patch.

Then I applied the Software Suspend 2 patch from http://www.tuxonice.net/index.html

Then I went on to enable all those fancy configuration options:

Tickless System (Dynamic Ticks)
High Resolution Timer Support
Symmetric multi-processing support
SMT (Hyperthreading) scheduler support
Multi-core scheduler support
Preemption Mode > Complete Preemption (Real-Time)
Timer frequency 1000 HZ
Support for hot-pluggable CPUs (necessary for Suspend2)

Sounds scary, especially since my development computer is currently a P2-350, but the kernel/modules compilation went without errors, and I'm now running this kernel on the P2-350 with no apparent adverse effects.
This is my interpretation of the ultimate Puppy kernel, but I cannot test the full potential of this "ferocious" Puppy. If anyone wants to try this kernel, I could upload it somewhere, or you could just duplicate my efforts.
The 2 patches I applied are these -
http://people.redhat.com/mingo/realtime ... .21.5-rt20
http://www.tuxonice.net/downloads/all/s ... .patch.bz2

And I also attach my kernel configuration.

Regarding the Software Suspend 2 patch, the menuconfig options explained on the website are out of date. I contacted the developer, Nigel Cunningham, via the mailing list and he explained that the option is now "Software Suspend", not "Suspend2".

EDIT: kernel config attachment removed. See later post.
Last edited by tempestuous on Fri 13 Jul 2007, 02:27, edited 1 time in total.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

but the kernel/modules compilation went without errors, and I'm now running this kernel on the P2-350 with no apparent adverse effects.
Interesting!
Do you mean that you are running Puppy 2.17alpha with this kernel? And the alpha-modules all loaded okay? -- it would be good to examine the various boot logs to see if any modules complained.

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

#3 Post by tempestuous »

BarryK wrote:Do you mean that you are running Puppy 2.17alpha with this kernel?
Yes.
BarryK wrote:And the alpha-modules all loaded okay?
No, absolutely not. When I said "I'm now running this kernel" I meant "I'm running this kernel PLUS corresponding modules".
It goes against all logic to imagine that you could do such extreme changes to a kernel, and still have the original modules compatible ...
but OK, for the sake of experimentation I just copied the original 2.17alpha module for my Realtek network card, r8169.ko, into the correct /lib/modules location then tried to load it. Here's the result:

Code: Select all

# modprobe r8169
cat: /lib/modules/modules.dep.2.6.21.5-rt20: No such file or directory
cat: /lib/modules/modules.dep.2.6.21.5-rt20: No such file or directory
FATAL: Error inserting r8169 (/lib/modules/2.6.21.5-rt20/kernel/drivers/net/r8169.ko): Invalid module format
And at the end of /var/log/messages I see this:

Jul 11 22:29:10 (none) user.warn kernel: r8169: disagrees about version of symbol struct_module
Jul 11 22:29:10 (none) user.warn kernel: r8169: disagrees about version of symbol struct_module

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#4 Post by cb88 »

I would like to try it maybe you could post it as Dynamite Puppy in the derivatives area the thread already exists. It could mean a sort of pre testing of new kernels ect....
I would like a copy of your kernel and would also like to compile it myself my previous attempt failed early on and I was a little clueless. I have a sempron 1.8 ghz and 512 ram that should be enough to test it out a little more don't have broadband at home though. I have acess to broadband at college so not a problem. If you upload the files please tell exactly what to do w/ them.

cb88

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#5 Post by jamesbond »

I would definitely BEG barry to include this in 2.18 (or is it 2.20) ... :D
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

Re: Cutting edge kernel for 2.17

#6 Post by John Doe »

tempestuous wrote:The 2 patches I applied are these -
first off, thanks a bunch for this. I'm going to test it out.

just to clarify, none of these are needed anymore for puppy?

ksize.patch
linux-2.6.18.5-e2compr-0.4.50.patch
patch_dpath.diff
squashfs3.1-lzma.patch
squashfs3.1-patch
via-patch-2.6.18

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

Re: Cutting edge kernel for 2.17

#7 Post by BarryK »

John Doe wrote:
tempestuous wrote:The 2 patches I applied are these -
first off, thanks a bunch for this. I'm going to test it out.

just to clarify, none of these are needed anymore for puppy?

ksize.patch
linux-2.6.18.5-e2compr-0.4.50.patch
patch_dpath.diff
squashfs3.1-lzma.patch
squashfs3.1-patch
via-patch-2.6.18
The patches required for Puppy 2.17 are posted on the puptrix.org site, along with the patched kernel source. An advanced experimental kernel would also require those patches. One way to achieve this would be to use my patched source as the starting point for further patches, which is maybe what tempestuous has done.

Note, the squashfs module is not compiled with the kernel, although it is patched in. There are instructions -- very lengthy and complicated -- at the squashfs-lzma site on how to compile it separately. It has to be done this way.

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

#8 Post by tempestuous »

Barry, you beat me to it by just minutes. Yes, I used the pre-patched Puppy kernel source from here -
http://puptrix.org/sources/kernel-2.6.21.5-pup217/

You could probably apply all of those patches to vanilla kernel source, but why bother? Barry has already done the work.
And I'm receiving messages from other forum members suggesting further kernel tweaks. Standby, there could be further changes.
cb88 wrote:If you upload the files please tell exactly what to do w/ them.
If you don't know what to do with them, then you're unfamiliar with compiling a kernel, and I don't want to get into lengthy HOW-TO's.
When 2.17 final is released I might make a remaster with this kernel, but it will take a certain amount of work; the initial ramdisk will need to be rebuilt with the new modules, and whenever I make a remaster I always replace Seamonkey/Gxine with Firefox/Claws-Mail/MPlayer.
And if Barry decides to run with an official cutting edge kernel then there's no point.

In the meantime, I suggest anyone interested should compile this kernel themselves, in a FULL HD install of Puppy so no initial ramdisk is necessary. And since you will be discarding the original kernel, it doesn't necessarily need to be Puppy 2.17.
Barry provided a kernel compile HOWTO here -
http://www.puppylinux.com/development/compilekernel.htm

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#9 Post by John Doe »

BarryK wrote:The patches required for Puppy 2.17 are posted on the puptrix.org site, along with the patched kernel source.
just a quick note, page not found here (no rush, not going that far for a couple months)
http://puptrix.org/sources/kernel-2.6.2 ... 7/patches/
BarryK wrote:Note, the squashfs module is not compiled with the kernel, although it is patched in. There are instructions -- very lengthy and complicated -- at the squashfs-lzma site on how to compile it separately. It has to be done this way.
thanks for the tip. i'll have to do some reading before i tinker.
tempestuous wrote:Barry, you beat me to it by just minutes. Yes, I used the pre-patched Puppy kernel source from here -
http://puptrix.org/sources/kernel-2.6.21.5-pup217/
ok, thanks for clarifying. i was thinking perhaps they were included now, with the updated kernel (i don't follow the kernel progress that closely). i grabbed the new patched source from puptrix.
tempestuous wrote:You could probably apply all of those patches to vanilla kernel source, but why bother? Barry has already done the work.
sort of as a mental excercise. it's great to have it done for me and didn't mean to dismiss the effort, but i'd rather know how to swim than just ride in the boat.
tempestuous wrote:And I'm receiving messages from other forum members suggesting further kernel tweaks. Standby, there could be further changes.
sounds great!

maybe a 2.17alpha2 would be fun for a week of testing?

firmware would be the same wouldn't it? because the kernel api wouldn't change, only the bits in between? is "kernel api" the right term?

i had started reviewing the structure of the kernel modules in the main system and in unleashed, in order to find a method of quickly deploying and testing differently patched kernels and modules.

would a script that went through (with correct kernel version of course):

boot/initrd-tree/modules/2.6.18.1/
kernels/2.6.18.1/all-modules/
kernels/2.6.18.1/modules/final-modules/

and pulled the appropriate file out of:

/lib/modules/2.6.18.1/

be helpful for unleashed?

I was thinking of writting something like that.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#10 Post by BarryK »


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

#11 Post by tempestuous »

For those unable to recompile a kernel themselves, I just created a ready-to-go dotpet of the kernel and modules.
Thanks to Raffy, it's available here - http://www.bexa.org/pup/tempestuous/cut ... July13.pet

Remember, this new kernel can be used ONLY in a full HD installation of Puppy. It should work with any version of Puppy since v2.10, but it makes sense to use 2.17.
INSTRUCTIONS: After installing the dotpet, open /boot/grub/menu.lst in geany and add these lines -

title Puppy cutting edge
root (hd0,0)
kernel /boot/vmlinuz-2.6.21.5 root=/dev/hda1 ro vga=normal

Now when you reboot you will see a new boot menu entry "Puppy cutting edge".

I also revised the kernel configurations, according to suggestions in this thread -
http://www.murga-linux.com/puppy/viewtopic.php?t=19194
Here is a list of revisions:
Suggested by Dougal -
CONFIG_IP_NF_H323 H.323 protocol support
CONFIG_IP_NF_SIP SIP protocol support
CONFIG_MTD_NAND_ECC_SMC NAND ECC Smart Media byte order
CONFIG_PARPORT_AX88796 AX88796 Parallel Port
CONFIG_I2C_OCORES OpenCores I2C Controller
CONFIG_SENSORS_ABITUGURU Abit uGuru
CONFIG_USB_TOUCHSCREEN USB Touchscreen Driver
CONFIG_USB_APPLEDISPLAY Apple Cinema Display support

suggested by craftybytes -
CONFIG_MTD_PARTITIONS MTD partitioning support
CONFIG_SPI SPI support
CONFIG_W1 Dallas' 1-wire support
CONFIG_W1_SLAVE_THERM Thermal family implementation

suggested by Ted Dog -
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_SAA7134_ALSA=m
CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y
CONFIG_DVB_USB_DIB0700=m
CONFIG_DVB_CORE_ATTACH=y
CONFIG_VIDEO_BUF=m
CONFIG_VIDEO_TUNER=m
CONFIG_ZISOFS=y

I now attach the new kernel configuration.
I have some more detailed notes on what this all means if anyone is interested. It took almost 2 hours to look through the details of all these options.
I didn't disable "Loopback device support" as suggested by wdef to facilitate loop-aes support. And I'm not sure what John Doe needs for dmcrypt support.
Sorry guys, these options look TOO cutting-edge for my money at this stage.
Attachments
DOTconfig-k2.6.21.5-cuttingedge13JULY07.gz
(17.73 KiB) Downloaded 665 times

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#12 Post by John Doe »

BarryK wrote:Okay, the URL works now:
http://puptrix.org/sources/kernel-2.6.2 ... 7/patches/
thanks. i grabbed them and downloaded for a rainy day.
tempestuous wrote:And I'm not sure what John Doe needs for dmcrypt support.
TrueCrypt and/or LUKS.

I grabbed the july13 test. will test with HD install and if all goes well try to "remaster the alpha CD" to test around on some other machines.

Leachim
Posts: 229
Joined: Sun 27 May 2007, 23:04

works fine with 2.15CE

#13 Post by Leachim »

I downloaded the patched kernel sources (2.6.21.5) and enabled the squashfs-option, but got an error (missing header-file). After removing the lzma-option everything compiled well.

(Remark: I'm using Puppy 2.15CE - not 2.17alpha.)

I do not have a harddisk based installation, so I replaced all kernel-modules in the initrd with the newly compiled modules and - voilà - everything booted fine (from my USB-Stick).

Only the X-Server (using the ATI-proprietary driver) hang the machine. After googeling the Internet I replaced the ATI-driver with the newest version from ATI (8.38.6) and now I can start the X-Server manually.

Attempting to start it via xwin still freezes the PC. It's due to xinit which leaves me with an empty screen and a working mouse cursor. When I try to stop the X-Server via ctrl-alt-bs or try to switch to a text mode console the cursor (and I assume the whole PC) freezes.

Under the 2.6.18.1-kernel xwin works fine with the new ATI-driver.

Despite of these small inconveniences I'm now a proud puppy owner with an SMP-kernel and hardware-virtualization support! :-)

Another interesting fact: I do not need the proprietary r1000-driver for my NIC anymore, because under the new kernel the r8169-driver is willing to work with it!

During testing I would have liked a kernel option in the boot-loader to prevent the starting of X (I finally added an exit-command as the first statement to xwin).

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#14 Post by John Doe »

Timer frequency 1000 HZ
I think this is the main problem and all other changes are ok.
John Doe wrote:I grabbed the july13 test. will test with HD install...
boot time results with full HD install and GRUB MBR boot using test machine:

2.16 - 1:52
2.17alpha - 1:54
2.17experimental - 5:36

application load times are similarly related.
John Doe wrote:...and if all goes well try to "remaster the alpha CD" to test around on some other machines.
a bit OVERZEALOUS!! sorry about that. was thinking out script i mentioned and got out of control.

tried the same test on a 3ghz/hyperthreaded machine and found it worked fine.

pretty sure the "sweet spot" to work out between new and old is "Timer frequency".

looking forward to more testing :-)
Last edited by John Doe on Sun 15 Jul 2007, 21:45, edited 1 time in total.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: works fine with 2.15CE

#15 Post by Dougal »

Leachim wrote:During testing I would have liked a kernel option in the boot-loader to prevent the starting of X (I finally added an exit-command as the first statement to xwin).
There is pfix=nox but it might have only been added in 2.16.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

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

#16 Post by kirk »

...and enabled the squashfs-option, but got an error..
Ithink the squashfs option should be set to =n. It's built on it's own.

wrote:
Timer frequency 1000 HZ


I think this is the main problem and all other changes are ok.
The tickless option should only use the high frequency as needed. 300hz is also an option. What the probelm with 1000hz?

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#17 Post by Dougal »

John Doe wrote:
Timer frequency 1000 HZ
I think this is the main problem and all other changes are ok.
Maybe changing the HZ to 250 will be a good compromise?
This (oldish) post actually mentiones 250 as being the default setting. (The last two comments there also mention another possible problem with using 1000)


I've looked through the config file and have some options to possibly enable as modules:

# CONFIG_X86_MCE_P4THERMAL is not set

# CONFIG_PCI_MSI is not set

# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_M25P80 is not set

# CONFIG_MTD_NAND_NANDSIM is not set

# CONFIG_TOUCHSCREEN_ADS7846 is not set


SPI is on, but what about the two new sections it introduced:

Code: Select all

# SPI Master Controller Drivers
#
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_BUTTERFLY is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_AT25 is not set

Same with "Dallas's 1-wire bus"


# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_K8TEMP is not set
and a new one:
# CONFIG_SENSORS_LM70 is not set

# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_W83793 is not set

# CONFIG_VIDEO_VIVI is not set

# CONFIG_USB_STORAGE_KARMA is not set

# CONFIG_USB_ALI_M5632 is not set
# CONFIG_USB_AN2720 is not set
# CONFIG_USB_EPSON2888 is not set
# CONFIG_USB_KC2190 is not set

There's also a bunch of modules in the "USB Gadget Support" section.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Leachim
Posts: 229
Joined: Sun 27 May 2007, 23:04

#18 Post by Leachim »

kirk wrote:
...and enabled the squashfs-option, but got an error..
I think the squashfs option should be set to =n. It's built on it's own.
Maybe I made something wrong. But without enabling the squashfs-option in the kernel, the boot stopped while attempting to mount pup_215.sfs.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#19 Post by John Doe »

kirk wrote:The tickless option should only use the high frequency as needed. 300hz is also an option. What the probelm with 1000hz?
the boot times i listed and performance where the problem on older machines (cleaned them up, they where hard to read). not sure if that was the cause, just a guess. i thought i remembered something about it from the 2.x developers forum. further testing will happen.
Dougal wrote:Maybe changing the HZ to 250 will be a good compromise?
I'll give it a shot. I just got alpha installed on my laptop so I can recompile the kernel and modules.

will report ASAP (going to neighborhood picnic right now for dinner).

will enter the new modules you listed below on my second test (and post config if it works). need to keep a control in there for now to make sure i find the correct answer.

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

#20 Post by kirk »

Maybe I made something wrong. But without enabling the squashfs-option in the kernel, the boot stopped while attempting to mount pup_215.sfs.
Here's the squashfs-lzma site:

http://www.squashfs-lzma.org/

You'll find it on that page. Looks like kind of a pain to build. But for loading the 2.15 sfs files the old squashfs should work.
Maybe changing the HZ to 250 will be a good compromise?
I've read that 300hz is a good compromise because of the 50hz/60hz pal/ntsc horizontal frequencies. But with tickless I didn't think it would matter. The reason for looking for a compromise before tickless was that the higher frequencies used lots of power (watts) and the lower frequencies (100hz) was too low for multimedia. The Xine FAQ page recommends 1000hz.

Post Reply