wrc1944 Posted July 9, 2003 Report Share Posted July 9, 2003 For those interested, I recompiled the 2.4.21-0.16mm-mdk kernel with pretty aggresive athlon-xp optflags, and it works fine. These flags also work on other kernels I have tried. The trick in making them take when compiling kernels is putting them in the linux-2.4.21-0.16mm-mdk/arch/i386/Makefile, in the following manner. First, I installed the MDK multimedia kernel and kernel-source rpms in the usual manner. Then I copied the resulting source directory placed in /usr/src to my "kernels" directory in ~/home. Then copy the .config file to another location, go to a console, cd to linux-2.4.21-0.16mm-mdk and do make mrproper. Then go into the above mentioned Makefile, and comment out the current MK7 flags, and add the new flags stanza, like shown below. --------------------------------------------------- #ifdef CONFIG_MK7 #CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi) #endif ifdef CONFIG_MK7 CFLAGS += -march=athlon-xp -falign-functions=16 -falign-labels=1 -falign-loops=16 -falign-jumps=16 -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays endif The =16 values set things to corelate precisely with the athlon-xp's design parameters, which I would think are pretty important. This is said to allow the on-die cache to be fully utilized and filled with 16 byte segments. ---------------------------------------------------- Then do make xconfig, and import the config file you copied before, and do any editing needed. (In my case, I removed some 3rd party stuff that caused depmod errors for modules concerning ethernet cards etc. not found when rebooting, but it does no harm.) Save the config file, and edit the main extra version Makefile (not the one you put flags in) like below: VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 21 EXTRAVERSION = -0.16mmxp Then do the usual: make dep make clean make bzImage make modules su to root make modules_install You will get a warning in make modules (among a few other minor ones) as shown here: cc1: warning: -fprefetch-loop-arrays is not supported with -Os This only occurs in one small section where -Os apparently takes over, and does no harm AFAIK. -Os then releases, and -fprefetch-loop-arrays comes right back. (Can anybody explain this?) As long as you get done with no actual errors and compile bail outs, you are OK. I don't do the usual make install, but manually copy bzImage and System.map to /boot, adding the kernel name-version, like below. [root@localhost linux-2.4.21-0.16mm-mdk]# cp System.map /boot/System.map-2.4.21-0.16mmxp [root@localhost linux-2.4.21-0.16mm-mdk]# cd /home/wrc1944/kernels/linux-2.4.21-0.16mm-mdk/arch/i386/boot [root@localhost boot]# cp bzImage /boot/bzImage-2.4.21-0.16mmxp Then edit lilo, adding the stanza for the new "xp optimized" mm kernel, omitting the initrd line: image=/boot/bzImage-2.4.21-0.16mmxp label=2421mmXP root=/dev/hda10 append="devfs=mount hdc=ide-scsi acpi=off quiet" vga=788 read-only Save, run lilo, and then reboot. I don't think I left anything out. wrc1944 :D Quote Link to comment Share on other sites More sharing options...
Guest RuudLinux Posted July 9, 2003 Report Share Posted July 9, 2003 Are the Athlon rpm´s also for the DURON? PCLinux[/i] Quote Link to comment Share on other sites More sharing options...
tyme Posted July 9, 2003 Report Share Posted July 9, 2003 the instructions he's made optimize it for the athlon XP processor. I do not think they will work with the duron. Also, the files in downloads I believe are also optimized for the XP and may not work with the duron. Quote Link to comment Share on other sites More sharing options...
wrc1944 Posted July 9, 2003 Author Report Share Posted July 9, 2003 The xp flags will work on the later versions of Durons. For sure the 1300Mhz, as I have done it with that cpu , and I believe anything after and including 1100Mhz. These versions of Durons are actually xp's with a smaller cache- the architecture is supposedly the same. If you have an earlier Duron, leave out the =sse flag, and drop the "-xp" and that should work. They are just cut down Athlon T-birds, AFAIK. wrc1944 Quote Link to comment Share on other sites More sharing options...
Guest Kormac Posted July 12, 2003 Report Share Posted July 12, 2003 It gives march=i586 when I compile. Should I have changed the CPU type to athlon in xconfig:?: Edit: Never mind, of course I had to specify processor-type Having trouble adding my own patches though. Doing 'patch -p1 nameofpatch.patch' from the source dir does nothing, just sits there.... Quote Link to comment Share on other sites More sharing options...
wrc1944 Posted July 12, 2003 Author Report Share Posted July 12, 2003 Kormac, I had trouble patching kernels at first too- now it's second nature. Add the patches before you do xconfig. What I do is put the ck .bz2 patches desired into the linux-2.4.21 directory, cd to that directory, and type: bzip2 -dc whatever-patch.bz2 | patch -p1 Be sure and do them in order, with the ck base patch first, and performance patches you want, and then the extra patches, like supermount. Also change the Makefiles before doing make dep. wrc1944 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.