Jump to content

9.1 & kernel-multimedia-2.1.21.0 for athlon-xp


Recommended Posts

Since it worked out OK on Mandrake 9.1 (no issues in two days so far), I thought I'd post this in case anyone was interested. I rebuilt the Mandrake kernel-multimedia-2.4.21.0.16mdk-1-1mdk.src.rpm for athlon-xp, using these flags (I edited the rpmrc file), with no errors:

 

optflags: athlon -O3 -march=athlon-xp -mcpu=athlon-xp -mmmx -msse -m3dnow -funroll-loops -fomit-frame-pointer -pipe -ffast-math -fforce-addr -fno-strength-reduce

 

According to man gcc, the -mcpu=athlon-xp flag is not redundant, and without specifially using it, the compiler will not generate code which will not run on the i386, even with the -march=athlon-xp flag included. Apparently, this means that with only the -march=athlon-xp flag specified, gcc omits some features specific to the athlon-xp cpu. I assume this would hold true for any specific cpu.

 

The command (on one line, from the directory the srpm is in) is:

 

rpm --rebuild --target athlon kernel-multimedia-2.4.21.0.16mdk-1-1mdk.src.rpm

 

You get the kernel, kernel-source, and the smp kernel (if you need it).

 

I haven't examined the spec file yet, but I understand this kernel has the preemptive and low-latency patches, and the generated .config file in the source directory in /usr/src confirms this (CONFIG_PREEMPT=y). It can be found at:

 

http://distro.ibiblio.org/pub/Linux/distri.../contrib/SRPMS/

 

Robert Crawford

Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Is there a place in MDK that you can specify compile flags? I know when I tried out Gentoo this was /etc/make.conf, is this relevant in MDK also? Because the file doesn't exist...plus I don't remember the format :-)

Link to comment
Share on other sites

/usr/lib/rpm/rpmrc

 

I edited the athlon line as root (added my extra flags for xp), and saved.

 

Then after a rebuild you find your new rpms in /usr/src/RPM/RPMS/athlon.

 

People say you should not do all this as root, and I've followed all the instructions to create the proper trees in ~/home, added the additional .rpmrc and .rpmmacros files to home exactly as instructed in the Mandrake rpm how-to, but it never works. I always get an immediate error "can't build to /usr/src/source," or something to that effect- can't recall right now. I've always resorted to doing it as root, and haven't had any problems, but if someone knows why I can't get this to work as user in home, please enlighten me! I'm sure it's some stupid error I'm making, like a path or something.

 

wrc1944

Link to comment
Share on other sites

i found that file, but what i'm actually looking for a is a file that gcc uses to add compile flags when it compiles stuff. i tend to compile some things like this, instead of src rpms and the like. specifically waimea (my WM), gaim, and various other things..

 

the problem your having is probably that a regular user can't write to that directory. i do most of my rpm stuff as root (su in console of course), and it all seems to work out just fine.

 

p.s.-i'm rebuilding that kernel rpm as we speak, i'll post how it turns out :-)

Link to comment
Share on other sites

i found that file, but what i'm actually looking for a is a file that gcc uses to add compile flags when it compiles stuff.
Is not a file what gcc uses for that purpose, is just the enviroment variable "CFLAGS"; for example put this file at your /etc/profile.d/ dir:

 

# cflags.sh  -- Compile flags for gcc3

CHOST="i586-mandrake-linux-gnu"

CFLAGS="-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe"

CXXFLAGS=${CFLAGS}

export HOST CFLAGS CXXFLAGS[

 

The above is for my pentiumMMX; for a i686 you need something like this:

 

CHOST="i686-mandrake-linux-gnu"

CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"



export HOST CFLAGS CXXFLAGS

 

HTH

 

(in the case of kernel compilation I use the optimizations set through the "make menuconfig")

Link to comment
Share on other sites

As I understood it, after you had created the same tree in ~/home, so you could rebuild as user, the rpm --rebuild command wasn't suppose to write to the /usr/src/RPM directories, but use the new ones in home/wrc1944/RPM. But apparently it still tries to. I have checked and rechecked that I have folled the instructions correctly, and I have. I've never gotten an srpm to rebuild as a user, in the ~/home directory tree created for that specific purpose.

 

I've posted at pclinuxonline, and CyberCFO tried to help, but we never figured it out, and he does it all the time. He sent me his ~/home .rpmrc file which he uses with Mandrake to build rpms as user, and I made my .rpmmacros file as instructed with my user name. Same error- it still tries to write to /usr/src/RPM/SOURCES- that's why I figure Mandrake must be defaulting somewhere in a config file/PATH, or somewhere??? This is on generic installs of both 9.0 and 9.1.

 

wrc1944

Link to comment
Share on other sites

just a note, if you do this and use the nvidia modules, be sure to also get the kernel-source from texstar and install that so that you can recompile them for the new kernel.

Link to comment
Share on other sites

ran into some issues with the nvidia stuff. i was attempting to use the new installer, and it kept failing for some reason, unsure of why. going to try the 4191 src RPMs instead. we'll see how that turns out.

 

alright, starting a new thread concerning the issues i'm having with this kernel and compiling the nvidia drivers. i'll link to it then.

 

here ya go: http://www.mandrakeusers.org/viewtopic.php?t=4126

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...