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 Sat 23 Aug 2014, 09:36
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 1 of 4 [54 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
Brandon


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

PostPosted: Tue 07 Oct 2008, 16:07    Post subject:  How to recompile Puppy 4.1 kernel with SMP support?  

I have never compiled a kernel before, but I need SMP support. So how hard would it be to recompile the Puppy 4.1 Kernel with SMP?
_________________
"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 
MU


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

PostPosted: Tue 07 Oct 2008, 16:26    Post subject:  

Update: I wrote a summary:
http://www.murga-linux.com/puppy/viewtopic.php?p=239056#239056

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!

------------------------------------------------
------------------------------------------------

I currently compile 2.6.25.16 with smp in Muppy.
I then will try also, if it works in Puppy 4.1.

It is not difficult, but do not know yet, if it will work.
I made a sfs of
ftp://ks301128.kimsufi.com/Puppylinux-sources/kernel-2.6.25.16/linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz

Booted it with the devx.sfs.
Added a symlink:

cd /lib/modules/2.6.25.16
ln -s ../../../usr/src/linux-2.6.25.16 build




saved:
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

edited it:
line 153
Code:
# CONFIG_SMP is not set
CONFIG_SMP=y


typed in a console:
cd /usr/src/linux-2.6.25.16/
make oldconfig


There were 3 questions about options, I just pressed enter to continue.
Then I typed:
make

Now it compiles since hours...

Then I will continue as described here in kirks long message:
http://www.murga-linux.com/puppy/viewtopic.php?t=33461&start=30

Mark

_________________
my recommended links

Last edited by MU on Sat 11 Oct 2008, 12:38; edited 1 time in total
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: Tue 07 Oct 2008, 17:37    Post subject: idea  

So maybe I'm better off waiting for someone like you, who knows what they are doing to compile a SMP kernel.
_________________
"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 
MU


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

PostPosted: Tue 07 Oct 2008, 18:12    Post subject:  

I get the same error as John Doe, bzimage is only 16kb.

I tried his solution to upgrade lzma, but no luck:

Code:
  CC      arch/x86/boot/version.o
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  OBJCOPY arch/x86/boot/compressed/vmlinux.bin
  LZMA    arch/x86/boot/compressed/vmlinux.bin.lzma
lzma: invalid option -- s
  LD      arch/x86/boot/compressed/piggy.o
  LD      arch/x86/boot/compressed/vmlinux
  OBJCOPY arch/x86/boot/vmlinux.bin
  BUILD   arch/x86/boot/bzImage
Root device is (0, 13)


I don't know how to solve this, must google.
Maybe in Puppy 4.1, the steps would work, but I want to compile one in Muppy, as I also need to check another issue.
Mark

_________________
my recommended links
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: Wed 08 Oct 2008, 02:57    Post subject:  

MU wrote:
I get the same error as John Doe, bzimage is only 16kb.

I tried his solution to upgrade lzma, but no luck...



i'm pretty sure the error is a problem with one line in the patch of the file 'linux-2.6.25.5/scripts/Makefile.lib' and the lzma version.

Code:
+cmd_lzma = (lzma e $< -so ; $(size_append) $<) >$@


the 2.6.26.3 patch has this line:

Code:
+cmd_lzma = lzma -9 -c $< >$@


i'm sure this line is where the -- s problem originates from.

seem to recall tinker around with them a bit to get it going. sorry for not commenting about it in my prior post. it does work.
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5234
Location: Australia

PostPosted: Wed 08 Oct 2008, 08:09    Post subject:  

If you guys are preparing an SMP kernel that's great, but can I suggest you also enable HyperThreading and Multicore, since these are really just variations/extensions of SMP.

And if you want to take the "performance" aspect a step further; enable Tickless System, High Resolution Timer Support, Preemptible Kernel, and high Timer frequency.

And if you want to go a step up in hardware support (such as for the One Laptop Per Child) then the 2.6.26 kernel is worth considering.
Food for thought.
Back to top
View user's profile Send private message 
MU


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

PostPosted: Wed 08 Oct 2008, 08:42    Post subject:  

I had to install lzma.458.pet from Puppy 4.
Now bzImage was created correctly.

I then quickly found out, that Kernel and modules are incompatible with the same from Puppy 4.1rc.

There might be two reasons:
1.) the activation of smp (not certain)
2.) Muppy uses gcc from Slackware 12.1.

I think the latter might have more effect.

I then created a new initrd.gz, and finally could boot.

I just had to use Muppys option:
layerfs=unionfs
as the aufs driver was not built (Muppy uses aufs by default).
Muppys devx is different from Puppys, maybe devx_409.sfs contains files required for aufs?

In the bootkernel.log I could see, that smp is active.
But I cannot test that furter, as I have a single core Pentium 3.
But there are other issues.
Icewm does not run, I now use openbox.
I could not find ANY error concerning this, so it might be related to the well known unionfs bugs.

Then I thought, there were network-issues, until I found out, that my provider dropped internet connection.
It seems they just fixed it.

Conclusion:
I will have to rebuild the Kernel in Puppy 4.1.
This will allow me, to sort out, what problems are caused by Muppy, or if there is something else wrong already in Puppys settings
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: Wed 08 Oct 2008, 11:42    Post subject: Cool  

So, once you compile the kernel, I can help you test, I have a AMD Athlon 64 X2 and a Core 2 Duo.
_________________
"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 
MU


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

PostPosted: Wed 08 Oct 2008, 11:52    Post subject:  

Barry gave some tips in his blog:
http://www.puppylinux.com/blog/?viewDetailed=00404
http://www.puppylinux.com/blog/?viewDetailed=00405

I had a look at the additional files and readmes.
aufs is a module.
I extracted the source, and ran:
make -f local.mk
as described in modules-compile.txt

That created aufs.ko, that I replaced in initrd.gz.

I started Muppy without "layerfs=unionfs", so aufs should be used.

But the computer now hangs at "setting up the unionfs layered filesystem".

I started again with unionfs, and modprobed aufs by hand.
I get no error here.

So I'm puzzled, why Muppy will not boot.
The name of the kernelsources is:
linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz

So I think, all required patches were applied already?

Or must I patch something on my own?
I must read more in the supplied textfiles.
They also mention many patches for older kernels, so it takes some time to find out, what is required, and what must not be done.
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: 11084
Location: The Peoples Republic of California

PostPosted: Wed 08 Oct 2008, 16:38    Post subject:  

MU wrote:


So I think, all required patches were applied already?

Or must I patch something on my own?


Mark,

I can't easily describe how discouraging it is for me to read posts
like of these types. And they are increasing in frequency.

This post is an attempt to remove any need for questions or
doubt for everyone.

Puppy distribution kernels are compiled with very specific
software. That is the software you need and want to do a
recompile.

Locating this software is not intended to be by way of perusing
forums, blogs and web pages. Then wondering if you have
extrapolated enough of the help and right information to have or
put together the complete corresponding kernel software.

If you want to rebuild the kernel, at a minimum, you want the
confidence to 'know' you have the complete corresponding
software to do it with.

I think there are enough developers on this forum to answer my
question.

Q: where can anyone download the source code used in compiling
Puppy 4.01, if no one knows for a fact, then where do I
ask?

(No user made, patched kernels are acceptable, without the full
stamp of Vendor approval, as being the kernel source used
in the compilation.)


Bruce

_________________
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: Wed 08 Oct 2008, 18:19    Post subject:  

I now compiled the kernel in Puppy 4.1.
The compilation itself takes 4 hours, then more time is needed, to replace the modules by hand in initrd.gz.

Did it the same way as in Muppy.
Have the same error finally with aufs.
The computer stops, when it tries to set up the layered filesystem.
I then mounted the savefile manually using another Puppy, to verify, that
/lib/modules/2.6.25.16/initrd
was created at startup, that is a copy of the files in initrd.gz.

The new aufs module is there, but still no joy.

------------------------------------------
Bruce, Barry will upload a kernel.sfs for 4.1 this weekend.
I am curious, if I have success with that one.

The compilation itself went well, and I can boot using unionfs, there is just the aufs issue.
When that is solved, we are a big step further, because then it will become very easy to recompile with custom options (hopefully...).

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

PostPosted: Thu 09 Oct 2008, 00:04    Post subject:  

MU wrote:
Bruce, Barry will upload a kernel.sfs for 4.1 this weekend.


If you are talking about ibibio.org, that is, IMO the proper place.
The license is explicit about where to host the source code.

MU wrote:
I am curious, if I have success with that one.


Myself included.

If you don't have success, I hope it isn't because you
don't have complete source code, 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
.

The reason why is, my take on it is, the license if very explicit in this area also.

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


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Thu 09 Oct 2008, 08:58    Post subject:  

Bruce B wrote:
Q: where can anyone download the source code used in compiling
Puppy 4.01, if no one knows for a fact, then where do I
ask?


Quote:
download the patched kernel source from here:
http://puptrix.org/sources/kernel-2.6.25.16/

Source = http://www.puppylinux.com/blog/?viewDetailed=00404
Back to top
View user's profile Send private message 
MU


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

PostPosted: Thu 09 Oct 2008, 12:13    Post subject:  

maybe I found the problem, it might be the smp support.

I wanted to compile a Fritz Wlan driver in the Muppy with the selfcompiled smp-Kernel for tests.
That driver is very problematic even in the version without smp.

To check errors, I ran "dmesg".

That includes these lines:
Quote:
Linux video capture interface: v2.00
gspca: disagrees about version of symbol struct_module
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<f8b4438e>] :fwlanusb:strcpy+0xd/0x1b
*pde = 00000000
Oops: 0000 [#1] SMP


This might mean nothing, because the Fritz itself has many problems.
But the line:
Quote:
Oops: 0000 [#1] SMP

is attracting my attention...

I now will rebuild the Kernel in 4.1 using Barrys original config, without smp, and look, if this fixes the aufs issue...

Mark

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


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

PostPosted: Thu 09 Oct 2008, 18:05    Post subject:  

My assumption was right.

I now compiled Kernel 2.6.25.16 in Puppy 4.1 with Barrys original config.
This Puppy boots correct!
So there is the bug with AUFS caused by enabling SMP Exclamation

How can one solve this?

Maybe this just happens on my Single core computer?
If someone wants to try out:
I uploaded the modified version of Puppy 4.1 here:

ftp://ks301128.kimsufi.com/testing/puppy4.1-smp/

As I ran my tests frugal, I did not use this iso, but it should work, as I created it as I create Muppy.
It includes the new vmlinuz and initrd.gz.
And pup_410.sfs contains the recompiled modules in /lib/modules.

Note:
I did not compile additional modules like the wifi stuff, so those are the OLD modules, that certainly will not work.

This iso is ONLY intended to check, if it boots on a computer with 2 to 8 processors or not.
I also enabled Hyperthreading (default was no).
Apart from that, I used the default values.
By default, also Multicore is enabled.


-------------------------------------------------
I also uploaded there a 2.6.25.16_410.sfs.
It includes Barrys kernelsource from puptrix.org, the symlink:
/lib/modules/2.6.25.16/build
and:
/usr/src/linux-2.6.25.16/.config

You also must use the devx_410.sfs from Puppy!

So you could compile your own Kernel with:
make oldconfig
(edit then .config to your needs)
make
make modules_install

Then you had to create a new initrd.gz as described in the other thread, and rename bzImage to vmlinuz.
Then you had to reboot with that system (using the option "layerfs=unionfs"), and create the aufs module, and update again initrd.gz with that one.

Mark

_________________
my recommended links

Last edited by MU on Thu 09 Oct 2008, 19:02; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 4 [54 Posts]   Goto page: 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.1028s ][ Queries: 12 (0.0085s) ][ GZIP on ]