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 Dec 2014, 19:35
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to recompile Puppy 4.1 kernel with SMP support?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [54 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
MU


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

PostPosted: Fri 10 Oct 2008, 16:00    Post subject:  

so it is a frugal installation on the stick?
So I wonder, what the problem is.
Is it possible to use .sfs files?

If no, one still could mount devx_410.sfs "by hand", and copy the contents to the savefile.

Or use SFS-Combiner to merge devx_410.sfs with pup_410.sfs.
Same with the 2.6.25.16_410.sfs or Barrys new kernel sfs.

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: 11131
Location: The Peoples Republic of California

PostPosted: Sat 11 Oct 2008, 04:50    Post subject:  

Mark,

Four hours? I think processor speed and ram matter. It would be nice if a kernel compile gave me time to brew up a pot of coffee, but as it is, I might be able to microwave a cup of instant coffee.

Truthfully, I love watching the output of the compile and wouldn't leave for coffee. But four hours, is a long time to watch output. Probably nothing we'd ever be able to sell as a movie and get rich on.

Please keep us posted. I have held back offering testing anything, until I know you have all the right software to work with.

When you think things are right and ask for testers. Please be specific about any and all things you want tested.

Bruce

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


Joined: 27 Feb 2008
Posts: 735
Location: Ghent, Belgium

PostPosted: Sat 11 Oct 2008, 08:57    Post subject:  

MU wrote:
So I wonder, what the problem is. Is it possible to use .sfs files?

I can use .sfs without problems. I also can compile.

The point is that, for compiling the kernel,
(1) Barry recommends using full install (cfr http://www.puppylinux.com/blog/?viewDetailed=00404),
(2) Kirk says that it's nogo from usb drives (cfr http://www.murga-linux.com/puppy/viewtopic.php?p=234637#234637).

If I understand correctly, the issue is not just compiling the kernel, but the other stuff required to make a recompiled-kernel Puppy work (such as generating the module dependencies list).

Bruce B wrote:
Truthfully, I love watching the output of the compile and wouldn't leave for coffee. But four hours, is a long time to watch output. Probably nothing we'd ever be able to sell as a movie and get rich on.

I vividly recall the times when it took me a full working day, on three Intel MDS development systems working in parallel, for generating an 8085 application program of roughly 32 KB (kilobytes) object code (some 25,000 lines of macro-assembler source code). Today's SW developers are really spoilt Smile

_________________
If it ain't broke, don't fix it. --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
http://www.desonville.net/
Puppy page: http://www.desonville.net/en/joere.puppy.htm

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


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

PostPosted: Sat 11 Oct 2008, 12:07    Post subject:  

Quote:
If I understand correctly, the issue is not just compiling the kernel, but the other stuff required to make a recompiled-kernel Puppy work (such as generating the module dependencies list).


yes, this also applies to frugal.
But you can skip the "depmod", if you use the SAME kernelversion.
Like this you also can use frugal, and it should work for your USB-Stick, too.


Compiling the Puppy Kernel with new options using a frugal installation

You boot Puppy with devx_410.sfs and the sfs with the Kernelsource.
For the following instructions, I used the Kernelsource:
ftp://ks301128.kimsufi.com/testing/puppy4.1-smp/2.6.25.16_410.sfs
Barry meanwhile released a official one, so you might prefer that one:
http://www.puppylinux.com/blog/?viewDetailed=00407
There you also find devx_410.sfs.

You then must save
ftp://ks301128.kimsufi.com/Puppylinux-sources/kernel-2.6.25.16/DOTconfig-K2.6.25.16-26AUG08-STANDARD
as
/usr/src/linux-2.6.25.16/.config
You now could edit it to your needs.
If you just want to add SMP support, you can use the config, that already includes the required changes:
ftp://ks301128.kimsufi.com/testing/puppy4.1-smp/SMP.config

Now you compile the Kernel:


cd /usr/src/linux-2.6.25.16/
make oldconfig
make
make modules_install


The last step installed the modules to the running system.
Then you copy /usr/src/linux-2.6.25.16/arch/x86/boot/bzImage
as "vmlinuz" to the place, where your old vmlinuz is, that boots Puppy.

You cannot reboot yet, though, because initrd.gz still has the old modules.
So you must replace them.
If you now had a Kernel with a different versionnumber, you also had to do additional steps.
You had to run depmod on initrd.gz, what is somewhat tricky.
Kirk explains that more detailed:
http://www.murga-linux.com/puppy/viewtopic.php?p=234637#234637
So I used the original kernelversion, as like this, I can skip this step.

Before you continue, please read further down: The aufs driver
Maybe that could be done here already, so we had to rebuild initrd.gz only once!


So you just must update the modules in initrd.gz, I did this:
copied it to /root/test/
Saved there this script as "editinit":

Code:
#!/bin/bash
gunzip initrd.gz
mkdir puppy-init
cd puppy-init
cat ../initrd | cpio -d -i
leafpad init
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
cd ..
rm -rf puppy-init
rm -f initrd


Made it executable and ran it:
cd /root/test
chmod 755 editinit
./editinit


Now leafpad opens, with "init".
If you close leafpad, the script continues to package initrd.gz again.
So you must NOT close leafpad yet!
You now will find the extracted initrd.gz as
/root/test/puppy-init/

It has an own folder /lib/modules/.
Examine it, and you will find for example
lib/modules/2.6.25.16/kernel/crypto/cbc.ko.gz

So you must copy there the new /lib/modules/2.6.25.16/kernel/crypto/cbc.ko

then type:
cd /root/test/puppy-init/lib/modules/2.6.25.16/kernel/crypto
rm cbc.ko.gz
gzip cbc.ko


Do the same with all other modules, that you can find there.

Finally close leafpad, so that the new initrd.gz is created.

Copy it to where your vmlinuz is stored, that boots Puppy.

Now reboot with the option "layerfs=unionfs".
You can add this in Grubs menu.lst as Kerneloption.
We need this, as we did not yet compile the new aufs module.

--------------------------------
The aufs driver
Finally we need to add the updated aufs driver.
I am not certain, if this must be done afterwards, as I describe here, or if it could be done already after "make modules_install".
I will check that, when I compile the next kernel.

extract somewhere ftp://ks301128.kimsufi.com/Puppylinux-sources/kernel-2.6.25.16/3rd-party-drivers/filesystem/aufs-20080825.tar.gz.
Then edit the file in it: local.mk
Only one line changes:
Code:
export CONFIG_AUFS_UNIONFS23_PATCH =

to:
Code:
export CONFIG_AUFS_UNIONFS23_PATCH = y


Then compile in that folder the module with:
make -f local.mk

Now also add fs/aufs25/aufs.ko to initrd.gz in /root/test/ as described above.
Then copy this new initrd.gz to the final location again, and reboot as usual (without the option "layerfs=unionfs").

Done.
You now could compile the additional 3rd party drivers, if the existing ones no longer work.
You'll find them here:
ftp://ks301128.kimsufi.com/Puppylinux-sources/kernel-2.6.25.16/

-----------------------------
Sidenotes:

1.) If you use Muppy0084c3, then you must install this PET before compiling the kernel:
http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-4/lzma-458.pet
Without it, vmlinuz is packaged wrong, and only 16 kb in size.

2.) You can find a recompiled Puppy with SMP for tests here:
ftp://ks301128.kimsufi.com/testing/puppy4.1-smp/
Read the readme.txt there for notes!

Mark

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


Joined: 14 Dec 2007
Posts: 111
Location: New York

PostPosted: Sat 11 Oct 2008, 14:17    Post subject:  

MU, I downloaded your ISO, and it worked great! If all the modules were compiled, we would have an SMP Puppy!

Anyways, I added a hardinfo_report so we all can see the second core detected. (hardinfo_report2 is from regular Puppy 4.1)

PS: It seemed very fast.
hardinfo.zip
Description  my reports
zip

 Download 
Filename  hardinfo.zip 
Filesize  7.91 KB 
Downloaded  324 Time(s) 

_________________
"Develop for it? I'll piss on it." -Bill Gates on the NeXTcube
Back to top
View user's profile Send private message Visit poster's website AIM Address 
erikson


Joined: 27 Feb 2008
Posts: 735
Location: Ghent, Belgium

PostPosted: Sat 11 Oct 2008, 15:53    Post subject:  

MU wrote:
Compiling the Puppy Kernel with new options using a frugal installation

Great, thx for this detailed how-to.

Quote:
You boot Puppy with devx_410.sfs and the sfs with the Kernelsource.

Meanwhile I have downloaded kernelsource and devx_410 from ibiblio, and peeked some into the sfs files.

Re. devx_410.sfs I notice that it contains hundreds of orphaned symlinks, in subdirs
./lib
./opt/qt4/lib
./usr/lib
./usr/lib/sane
./usr/X11R7/lib

Doesn't that cause difficulties?

I also notice that, for a frugal install, devx_xxx is "under" pup_xxx in the union, while for a full install, it's copied "over" the pup_xxx filestructure and thus takes precedence (while also the orphaned symlinks are resolved, I guess). Maybe that's why Barry recommends full-install for compiling the kernel?

Finally, I notice that ibiblio has only one devx_410 while there are two 410 versions (with 2.6.25.16 resp. 2.6.21.7 kernel). Is the same devx_410 applicable to both?

_________________
If it ain't broke, don't fix it. --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
http://www.desonville.net/
Puppy page: http://www.desonville.net/en/joere.puppy.htm

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


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

PostPosted: Sat 11 Oct 2008, 16:04    Post subject:  

Quote:
I notice that ibiblio has only one devx_410 while there are two 410 versions (with 2.6.25.16 resp. 2.6.21.7 kernel). Is the same devx_410 applicable to both?


yes, as the kernel is in a second sfs.
devx_410.sfs contains only common, kernel-independant files.

Quote:
Re. devx_410.sfs I notice that it contains hundreds of orphaned symlinks, in subdirs


Ithink those point to the corresponding files in Puppy itself (that are in pup_410.sfs).
I encountered no problem in compiling the kernel because of that.
I used Puppy 4.1 only for my kernel tests, usually I run Muppy, that has an own devx.

Mark

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


Joined: 27 Feb 2008
Posts: 735
Location: Ghent, Belgium

PostPosted: Sun 12 Oct 2008, 10:31    Post subject:  

Mark,

Please add explicitly to your last instructions that the lzma-458 pet must be loaded before compiling. Otherwise one ends up with a 16KB bzImage, as you found out earlier, and now me too.

BTW compile time is roughly 90 minutes on my 1.6GHz laptop.

_________________
If it ain't broke, don't fix it. --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
http://www.desonville.net/
Puppy page: http://www.desonville.net/en/joere.puppy.htm

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

Joined: 09 Nov 2005
Posts: 414

PostPosted: Sun 12 Oct 2008, 12:27    Post subject: Down side of booting SMP support in a single core computer?  

Down side of booting SMP support in a single core computer? Is loss of RAM? Sometimes application programs run off the tracks?

Can there become problems in switching between the two cores? Which an actually cause some type of performance delay?

Anyone guess how much one gains in speed by using SMP support in a dual core machine?

I would feel that a derivative of Puppy, can have a long future as a web surfing machine. A version of Puppy that already has Java, and .... already installed for a newbie to use. Surely it is easier to use -- blank --version of Puppy with a live CD than it is to do all the things Windows now requires to keep malware scraped out of it. Gee Puppy is smaller and feels faster than Norton Antivirus alone.

_________________
Google Search of Forum: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
erikson


Joined: 27 Feb 2008
Posts: 735
Location: Ghent, Belgium

PostPosted: Sun 12 Oct 2008, 16:21    Post subject:  

Results of today:

Using Puppy 4.1-k2.6.25.16 I recompiled the kernel from Barry's source, with Barry's original config. For various reasons it took me a couple of retries "from scratch".

I only did the 'make oldconfig' and 'make' which produced bzImage (with the lzma pet installed it's now 1589 KB i.e. nearly same size as original vmlinuz). I did *not* 'make modules_install' and did *not* update modules in initrd.gz - my reasoning is that these "ought" to be the same since I "self-compiled". I also did not yet recompile aufs.

I copied bzImage, renamed it to vmlinuz and rebooted (with unionfs).

Lo and behold, Puppy boots with the recompiled vmlinuz.

So the next step is to adapt the configuration, to include usb driver support, and see if my goal is achieved (boot full-install off external usb hdd).

_________________
If it ain't broke, don't fix it. --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
http://www.desonville.net/
Puppy page: http://www.desonville.net/en/joere.puppy.htm

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


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

PostPosted: Mon 13 Oct 2008, 13:02    Post subject:  

you will encounter some issues, if you do not compile the usb-stuff as modules.
See here please:
http://www.murga-linux.com/puppy/viewtopic.php?p=239608#239608
At least in frugal installations.
As full installations do not use initrd.gz, this might be no issue for you.

By the way:
I cannot boot from USB-drives, as my bios does not support it.
But I can do this (frugal):
I just have vmlinuz and initrd.gz on the internal harddisk (which is a CF-Card in an adapter).
The rest (pup_410.sfs, pup_save.2fs) is located on an external USB-drive.

You can boot such a configuration like this:
Code:
  title Puppy 410smp (aufs)
  root (hd0,5)
  kernel /puppy410smp/vmlinuz acpi=force pmedia=idehd pdev1=sdb7 psubdir=puppy410
  initrd /puppy410smp/initrd.gz


Mark

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


Joined: 01 Mar 2006
Posts: 155
Location: Guildford, UK

PostPosted: Tue 21 Oct 2008, 15:06    Post subject: Pully 4.1 with Multi-Core and System Monitor Working!  

Hi

After reading this thread and others, I have been able to compile the kernel and modules for multi-core support - with everything working. I added the following:

* Tickless System
* High Resolution Timer
* Symetric mutli-processing (SMP)
* SMP Hyperthreading
* Multi-core scheduler

I have tested it on a 2 and 4 core system and all working.

I have compile an added a nice system monitor that shows the use of each core graphically on the screen (shown on right below):



I will continue to add to this new system - as I am aiming to build a higer-powered Puppy for cluster computing, etc.

If anyone is interested, let me know![/img]

_________________
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux
Back to top
View user's profile Send private message Visit poster's website 
Sit Heel Speak


Joined: 30 Mar 2006
Posts: 2595
Location: downwind

PostPosted: Tue 21 Oct 2008, 15:39    Post subject:  

I would like that system monitor...
Back to top
View user's profile Send private message 
NickBiker


Joined: 01 Mar 2006
Posts: 155
Location: Guildford, UK

PostPosted: Tue 21 Oct 2008, 16:15    Post subject: Pretty System Monitor  

Sit Heel Speak wrote:
I would like that system monitor...

Hi!
It's cool - there are many options and plug-ins too - I think you can monitor temperatures etc as well.

I will make into a .pup file so that anyone can load it into their system - hopefully in next day or so!

_________________
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux
Back to top
View user's profile Send private message Visit poster's website 
jboettge

Joined: 02 Apr 2007
Posts: 11
Location: Germany

PostPosted: Wed 22 Oct 2008, 05:58    Post subject: upload an .iso, please.  

@NickBiker
I'm really interested in that system - can you upload an iso somewhere, please?

Worked a while with the 4.0 2.6.25 alpha smp and it's not really stable on my w6000 workstation.
And I wan't to replace my NT4 server main system with efficient puppy. If getting vmware server to work on it.

Best regards,
Jörg

_________________
system 1) evo w6000 2GB@2x2600MHz intel xeon
system 2) tyan tiger 2GB@2x1600MHz amd athlon
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [54 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.1289s ][ Queries: 13 (0.0154s) ][ GZIP on ]