Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2005 10:35:16 -0300
From:      Alejandro Pulver <alejandro@varnet.biz>
To:        Benjamin Keating <motionsiren@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Recompiling the Kernel for better ATA support
Message-ID:  <20050308103516.4b0b7698@ale.varnet.bsd>
In-Reply-To: <781e2bc0050307150012c172a0@mail.gmail.com>
References:  <781e2bc0050307150012c172a0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 7 Mar 2005 15:00:24 -0800
Benjamin Keating <motionsiren@gmail.com> wrote:

> I'm having a problem with my drives and found a promising solution
> (http://lists.freebsd.org/pipermail/freebsd-hackers/2004-October/0088
> 21.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) {
> 
> >% --------------------------------------
> 

It is just a patch (a file generated by diff(1) that outputs the
difference between two files, generally the original file, and the
modified file).

It just changes the value "268435455" to "268435454".

For more information see diff(1) and patch(1).

> 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
> 

You have to patch the file '/usr/src/sys/dev/ata/ata-lowlevel.c' with:

# patch /usr/src/sys/dev/ata/ata-lowlevel.c <patchfile>

And then recompile your kernel.

Personally I use the "traditional" way (procedure 1) for just compiling
the kernel.

> Im new to kernel compiling and never patched files in the source
> before.
> 
> Keep up the good work guys! I love this OS.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"

Best Regards,
Ale



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050308103516.4b0b7698>