How to recompile Puppy 4.1 kernel with SMP support?
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
Update: I wrote a summary:
http://www.murga-linux.com/puppy/viewto ... 056#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-s ... _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-s ... 8-STANDARD
as:
/usr/src/linux-2.6.25.16/.config
edited it:
line 153
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/viewto ... 1&start=30
Mark
http://www.murga-linux.com/puppy/viewto ... 056#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-s ... _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-s ... 8-STANDARD
as:
/usr/src/linux-2.6.25.16/.config
edited it:
line 153
Code: Select all
# CONFIG_SMP is not set
CONFIG_SMP=y
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/viewto ... 1&start=30
Mark
Last edited by MU on Sat 11 Oct 2008, 16:38, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
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
I get the same error as John Doe, bzimage is only 16kb.
I tried his solution to upgrade lzma, but no luck:
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
I tried his solution to upgrade lzma, but no luck:
Code: Select all
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)
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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
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: Select all
+cmd_lzma = (lzma e $< -so ; $(size_append) $<) >$@
Code: Select all
+cmd_lzma = lzma -9 -c $< >$@
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.
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
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.
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.
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
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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
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
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
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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
Mark,MU wrote:
So I think, all required patches were applied already?
Or must I patch something on my own?
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
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
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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
If you are talking about ibibio.org, that is, IMO the proper place.MU wrote:Bruce, Barry will upload a kernel.sfs for 4.1 this weekend.
The license is explicit about where to host the source code.
Myself included.MU wrote:I am curious, if I have success with that one.
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.
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?
Source = http://www.puppylinux.com/blog/?viewDetailed=00404download the patched kernel source from here:
http://puptrix.org/sources/kernel-2.6.25.16/
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:
But the line:
I now will rebuild the Kernel in 4.1 using Barrys original config, without smp, and look, if this fixes the aufs issue...
Mark
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:
This might mean nothing, because the Fritz itself has many problems.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
But the line:
is attracting my attention...Oops: 0000 [#1] SMP
I now will rebuild the Kernel in 4.1 using Barrys original config, without smp, and look, if this fixes the aufs issue...
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
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
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
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
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
Last edited by MU on Thu 09 Oct 2008, 23:02, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
Jocoder24,jcoder24 wrote: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?
Thank you for your answers!
The README.txt file in the appropriate directory didn't help me in
thinking it was the source code. Actually on the contrary.
For the purpose of clarification, the definition of source code is
very close to this: the 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. (my reading of the gnu version 2
license requirements)
Even if the source code at puptrix matches all the criteria above, itjcoder24 wrote:download the patched kernel source from here:
http://puptrix.org/sources/kernel-2.6.25.16/
Source = http://www.puppylinux.com/blog/?viewDetailed=00404
is the wrong place to host the source code.
Just so there is no confusion, I'll post verbatim, the kernel
developers license terms as to the proper venue.
- If distribution of executable or object code is made by
offering access to copy from a designated place, then offering
equivalent access to copy the source code from the
same place counts as distribution of the source code.
distributors who don't want to include the source with the
distribution. To be compliant, put the source code, the complete
kernel source code, in this case as defined, at the
same place people downloaded the (official)
binaries.
Seems simple to me, the reason why is; because it is simple.
Moreover, it is expected, not only expected, it is required.
Bruce, the source is here:
http://puptrix.org/sources/
As my tests show, it is complete.
I just was confused by the errors, that now have resolved as a problem, that I compiled with smp-support.
Without smp, the Kernel compiles and works great.
Also Barrys instructions seem to be correct, he just does not explain explicitly, how a Kernel must be compiled.
But he does that on the homepage.
I however used the other instruction posted by Kirk, as it looked easy to reproduce.
The different location has historical reasons.
Barry had limited access on ibiblio, so Ted Dog offered to create a source repository on puptrix.org.
There ALL sources are available, not only the Kernel, but also the applications (I did not check if the apps are up to date).
So the current system is logic.
As the Puptrix.org server is shut down in end of October, we need a new location though.
We created 2 mirrors already:
http://www.murga-linux.com/puppy/viewtopic.php?t=34183
If it is possible by ibiblio now to host the sources, Barry certainly will use that one now, though mine is faster
Mark
http://puptrix.org/sources/
As my tests show, it is complete.
I just was confused by the errors, that now have resolved as a problem, that I compiled with smp-support.
Without smp, the Kernel compiles and works great.
Also Barrys instructions seem to be correct, he just does not explain explicitly, how a Kernel must be compiled.
But he does that on the homepage.
I however used the other instruction posted by Kirk, as it looked easy to reproduce.
The different location has historical reasons.
Barry had limited access on ibiblio, so Ted Dog offered to create a source repository on puptrix.org.
There ALL sources are available, not only the Kernel, but also the applications (I did not check if the apps are up to date).
So the current system is logic.
As the Puptrix.org server is shut down in end of October, we need a new location though.
We created 2 mirrors already:
http://www.murga-linux.com/puppy/viewtopic.php?t=34183
If it is possible by ibiblio now to host the sources, Barry certainly will use that one now, though mine is faster
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
I just tried the newest aufs source from CVS now, but still no joy.
So I am curious, if my test SMP iso works for other people.
If not, it might be time, to go for a newer Kernel?
I wonder, which one Barry currently uses for his SMP tests.
I must search, if I find one of the beta versions, that had smp support (was it 4.05?).
I must test, if those also crash on my computer.
**edit: found it:
http://distro.ibiblio.org/pub/linux/dis ... 4.1alpha6/
faster mirror:
http://mirror.internode.on.net/pub/pupp ... 4.1alpha6/
Will test that one tomorrow.
Mark
So I am curious, if my test SMP iso works for other people.
If not, it might be time, to go for a newer Kernel?
I wonder, which one Barry currently uses for his SMP tests.
I must search, if I find one of the beta versions, that had smp support (was it 4.05?).
I must test, if those also crash on my computer.
**edit: found it:
http://distro.ibiblio.org/pub/linux/dis ... 4.1alpha6/
faster mirror:
http://mirror.internode.on.net/pub/pupp ... 4.1alpha6/
Will test that one tomorrow.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]