Page 1 of 1

Kernel Compile

Posted: Mon 20 Oct 2008, 14:34
by NickBiker
Hello

I am trying to recompile the Kernel.

http://www.puppylinux.com/development/compilekernel.htm

Gives details and tells me it is VITAL to copy the .configure file for puppy in folder /lib/modules.

But there is no such file here?

I am sure this is obvious once you know, but can anyone point me in the right direction?

Posted: Mon 20 Oct 2008, 16:33
by Sit Heel Speak
As of 4.1 it's been moved to /etc/modules.

Posted: Mon 20 Oct 2008, 16:38
by MU
here is an instruction to recompile:
http://www.murga-linux.com/puppy/viewtopic.php?t=34186

Using a different kernelversion is more complicated, see:
http://www.murga-linux.com/puppy/viewtopic.php?t=34341

Mark

Kernel 4.1 Compile from Scratch - NO JOY YET!

Posted: Mon 20 Oct 2008, 17:33
by NickBiker
Hello

I am most grateful for any help - as what hair I have left I am pulling out!! There are just so many posts on how to do this, it is not too straightforward to follow.

I am running latest Puppy 4.1 official release on full HDD install. I managed to (eventually) work out how to get the devx_410.sfs to work on a full hdd installation - as the script does not do this for you :-(

I downloaded the ready-patched kernel from: http://puptrix.org/sources/kernel-2.6.25.16/
called:

Code: Select all

linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz
and extracted it to /usr/src/

I read http://www.murga-linux.com/puppy/viewtopic.php?t=34186 that you need to download lzma.458.pet to avoid problems, which I did, although I assume that since I loaded the ready-patched kernel I did not really need to do this?

I then followed instructions at: http://www.puppylinux.com/development/compilekernel.htm
i.e.

Code: Select all

make clean
make mrproper
I then got a .config file from linux-2.6.25.16-src-patched_squashfs_un ... _mt.tar.gzand put it in /usr/src/linux-2.6.25.16/
I did a make menuconfig to check/change options
(I also did make oldconfig as this seems to be mentioned too!)
then

Code: Select all

make bzImage
A few warnings were generated during the compile but these appeared to be mostly minor warnings on pointer types. The build takes quite some time, but I was able to poke a bottle of red wine behind my PC to get it up to room temperature...

I then made all the modules and installed these as per above instructions - no errors!

The new kernel is called bzImage and was found in /use/src/linux-2.6.25.16/arch/i386/boot

It is 22 bytes long. Arrrrrr! Either this is an amazing compression algorithm or...

For my HDD install, I was told to copy the newly compiled kernel to /boot and edit the grub loader to give me the option to boot this - which I have done.

So what have I done wrong?

Nick

Re: Kernel 4.1 Compile from Scratch - NO JOY YET!

Posted: Mon 20 Oct 2008, 17:43
by NickBiker
NickBiker wrote: It is 22 bytes long. Arrrrrr! Either this is an amazing compression algorithm or...
Yes - I've spotted it! That file is a LINK, the actual file is at:

Code: Select all

/usr/src/linux-2.6.25.16/arch/x86/boot
I have now copied the 1,666k file, and it booted fine, and WOW, I now have multi core all working!
[/code]grep 'processor.*:' /proc/cpuinfo | wc -l

Code: Select all

Gives me 4 - for 4 cores!!

Just wondered - does anyone know of a nice CPU Usage viewer for multi-core in Linux (could this be ksysguard?)??

Pleased, now for my wine!!



Posted: Mon 20 Oct 2008, 17:54
by MU
lzma.458.pet
yes, this is needed to compress the Kernel.

You ran different steps then I did.

You should start with the existing .config.
Copy /etc/modules/DOTconfig-K2.6.25.16 to /usr/src/2.6.26.16/.config

Then run:

cd /usr/src/2.6.26.16
make oldconfig

(now you have Puppys original configuration, and could edit .config to your needs)
make
make_modules_install


Then copy bzImage to vmlinuz (if it has a correct size, around 2 MB).
And compile the aufs.ko module.

Mark