Recompiling the Kernel for better ATA support

Benjamin Keating motionsiren at gmail.com
Mon Mar 7 15:00:26 PST 2005


I'm having a problem with my drives and found a promising solution
(http://lists.freebsd.org/pipermail/freebsd-hackers/2004-October/008821.html)
It looks like i need to modify /usr/src/sys/dev/ata/ata-lowlevel.c
with the following, but im unsure how to read it. Some pointers about
how to understand this would be awesome.

%< --------------------------------------

--- ata-lowlevel.c.orig Fri Oct 29 12:06:09 2004
+++ ata-lowlevel.c      Fri Oct 29 12:05:38 2004
@@ -700,7 +700,7 @@
     ATA_IDX_OUTB(atadev->channel, ATA_ALTSTAT, ATA_A_4BIT);

     /* only use 48bit addressing if needed (avoid bugs and overhead) */
-    if ((lba > 268435455 || count > 256) && atadev->param &&
+    if ((lba > 268435454 || count > 256) && atadev->param &&
        atadev->param->support.command2 & ATA_SUPPORT_ADDRESS48) {

>% --------------------------------------

After modifying this file, do I simply recompile my kernel? Here is
how i go about recompiling mine (open to suggestions):

# cd /usr/src/sys/i386/conf
# cp GENERIC MYKERNEL
# vi MYKERNEL
# config MYKERNEL
# cd /usr/src
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL

Im new to kernel compiling and never patched files in the source before.

Keep up the good work guys! I love this OS.


More information about the freebsd-questions mailing list