James Sparenberg wrote:
On Mon, 2003-06-30 at 20:43, Robert Crawford wrote:

Dave,
Sounds like you had great success! So, we now know at least that Hz patch can be added to the already heavily patched Mandrake kernels. Could you please post some info on the two minor patch failures, and how you fixed them?


Yes please please please! *grin*

OK, here goes...


Install Mandrake's multimedia kernel (hereafter "mm kernel") and source. Technically, you don't need to install the kernel, but I did so that I could perform a "sanity check" and make sure everything would work ok with the basic mm kernel. Why bother patching and compiling a kernel that is broken (for my particular hardware, anyway) from the start?

Reboot into the mm kernel and make sure everything works. If yes, continue...

In a console, su to root and copy the mm kernel source directory from /usr/src to $HOME/src:
# cp -R /usr/src/linux-2.4.21-0.16mm-mdk/ /home/username/src/
Change directory back to /home/username/src, and change ownership to your user name:
# chown -R username:username linux-2.4.21-0.16mm-mdk/
In the console, Ctrl-D to exit out of root and get back to yourself. Change directories into the new kernel source dir.


Go to http://members.optusnet.com.au/ckolivas/kernel/ and download the Variable Hz kernel patch. This appears to be a little more recent than the Variable Hz patch available at kernel.org, although I could be wrong - but the file sizes are different, so I went with the bigger patch file, assuming it would have the most recent changes/additions. Save the patch in the root of the kernel source directory (linux-2.4.21-0.16mm.mdk).

In the console, apply the patch:
$ patch -p1 <patch-1030_VH_0306200116_2.4.21-ck2
You will see a bunch of messages go by, most of them indicate success, but two of them failed for me (assuming the same kernel source version and patch, they will for you too :-) ).


Thankfully, the failed patch bits are easy to fix. The patch program generates *.rej (reject) files for each failure, so you can see what was attempted to patch, and look at the pristine file to figure out where it should go. The two files are ./kernel/sys.c and ./kernel/signal.c. Just open up both files in kate or another text editor, and you can see that there is only a single "#include <asm/param.h>" line to add to each file. Copy and paste, and save the files!

From here Robert's directions are pretty clear. Open up the Makefile in the root of the kernel source directory, and look at the EXTRAVERSION line. It should say -0.16mm-mdk, and I changed it to -0.16mm-ck2. Also, you need to "make mrproper" before anything else.

Next, make a backup of Mandrake's supplied .config file, called .config.backup. Then, in a console:
$ make xconfig
There is only a single change, in the General section you will see the Variable Hz box with the number 100 in it. Change it to 1000, and save your config.


Still in the console:
        $ make dep
        $ make clean
        $ make bzImage
        $ make modules
(No errors encountered on my system, so su to root and...)
        # make modules_install

Now, copy the System.map and bzImage into the /boot directory, renaming them on the fly:
# cp System.map /boot/System.map-2.4.21-0.16mm-ck2
# cp arch/i386/boot/bzImage /boot/bzImage-2.4.21-0.16mm-ck2


Edit lilo.conf to add an entry for the new kernel:
        # vi /etc/lilo.conf
My new entry looks like this:
image=/boot/bzImage-2.4.21-0.16mm-ck2
        label=linux-2421-ck
        root=/dev/hda5
        read-only
        optional
        vga=788
        append=" devfs=mount hdc=ide-scsi acpi=on quiet"
(Notice we're not using a ramdisk for this kernel.)

Save the file, and run lilo to re-write your boot sector:
# /sbin/lilo -v
I add the -v (verbose) option so that I can see extra success or failure messages.


If everything is still good, then reboot your system, and choose the new kernel! I do see one error upon boot, but it seems inocuous enough. The first line to appear says something about the scheduler not being started yet. I suspect this a just a minor timing issue, since we have now sped up the timing of the kernel schedule.

We also lost the pretty blue Mandrake graphical boot screen, which I might like to get back, but at the moment I am happy to have a working kernel.

Hope this helps, and have fun!

--
Dave Sherman
MCSE, MCSA, CCNA
I think animal testing is a terrible idea; they get all nervous and
give the wrong answers.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to