Jump to content

Recompile Kernel – SRPM


Recommended Posts

Hi People.

 

I am going to recompile a few source rpm packages for MandivaLE 2005 to use the enhancements for my Athlon-XP 3000 CPU and I need some advice / reassurance I am about to do this correctly - any advice is welcomed.

 

I am going to start by recompiling the Kernel, other packages I am thinking of recompiling are:-

 

- kde

- xorg

(are there any more which will benefit me for normal desktop use?)

 

 

The method I am using is from http://cybercfo.gkmweb.com/mandrake_a_la_gentoo-9.2.pdf.

 

 

I have done the following:-

 

- Created 2 files

1) ~/.rpmrc - for a normal user - is that o.k for the kernel?

- this has the following line in

optflags: athlon -O3 -fomit-frame-pointer -pipe -march=athlon-xp

(i used info from here - http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html - Are these optflags O.K for the kernel - should I add more lines?)

 

2) ~/rpmmacro

- this has the following lines in

 

%_topdir /home/morgan/RPM

%_tmppath /home/morgan/RPM/tmp

 

(do i need any other info?)

 

The command I am going to use is:-

 

rpm --rebuild --target athlon kernel.src.rpm - is this correct?

 

Also - one final thing

 

The resulting recompiled kernel RPM will be the same version number as the kernel I have already installed

 

Should i use the following command to install it?

 

rpm -Uvh kernel-version-Xmdk.athlon.rpm –-replacepkgs --replacefiles

 

Any advice would be great.

 

Cheers

Link to comment
Share on other sites

I recompiled the kernel source RPM and ended up with

 

kernel-2.6.11.6mdk-1-1mdk.athlon.rpm

 

I cannot install it, when i do

 

rpm -ivh kernel-2.6.11.6mdk-1-1mdk.athlon.rpm

 

It comes back with confilct messages as the kernel version I am trying to install is the same number as the one presently installed.

 

I get a lot of messages like:-

 

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/snd-usb-audio.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/snd-usb-lib.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/usx2y/snd-usb-usx2y.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

 

any ideas?

Link to comment
Share on other sites

Use --force.

 

BTW, I really wouldn't bother going through all this pain if I were you, it's not going to make much of a difference. But yes, if you're determined to you it, you're going about it the right way. Especially watch out when using -O3; it doesn't necessarily actually produce better code than -O2, and can cause errors. Most MDV packages are built with the highest safe -O level.

Edited by adamw
Link to comment
Share on other sites

Thank you everybody for your responses.

 

I have noticed a enhancement in the past after recompiling the kernel with the athlon-xp flag. One of the great things about Linux is you can do things like this if you want to.

 

I tried rpm -Uvh kernel-2.6.11.6mdk-1-1mdk.athlon.rpm and I still get messages from below

 

file /lib/modules/2.6.11-6mdk/kernel/sound/synth/snd-util-mem.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/snd-usb-audio.ko.gz frominstall of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/snd-usb-lib.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

file /lib/modules/2.6.11-6mdk/kernel/sound/usb/usx2y/snd-usb-usx2y.ko.gz from install of kernel-2.6.11.6mdk-1-1mdk conflicts with file from package kernel-2.6.11.6mdk-1-1mdk

 

(there are a lot of these messages)

 

I guess I have two questions

 

1) Should I just wait for Mandrake to release an updated kernel - then recompile the source rpm instead of installing the .i586 one

 

2) Is it possible when using rpm --rebuild to specify the kernel name ?

 

I know i can use the --force command but have been advised against it.

 

Thank you everybody who has helped me over the years in Lnux (I have helped others too - see my post here - https://mandrivausers.org/index.php?showtopic=16970)

 

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...