[PlanetCCRMA] kmod-ntfs

Matt Barber brbrofsvl@gmail.com
Sun May 20 13:09:03 2007


------=_Part_39085_31203528.1179691724692
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

You have to hack the spec file, and there are only a couple of things that
need to be changed for nvidia --

substitute your current ccrma kernel name  ( output of  uname -r )  for the
fedora kernel in kversion definition.  Mine looks like this:

%{!?kversion: %define kversion 2.6.21-0143.rt1.3.fc6.ccrmart}


in the kvariants definition line, remove all of the variants except
%{?upvar}  --  since you're not building variants for a xen kernel (etc...).

my line looks like this:

%{!?kvariants: %define kvariants %{?upvar}}

I usually delete all the corresponding preceding definitions as well,
leaving only

%define upvar ""


write it, and then

rpmbuild -ba --target i686 nvidia-kmod.spec

(this will make both the module and a .src.rpm for you to use later if you
wish)


This may be a totally bogus way of doing it, but it works cleanly for me.

For kmod-ntfs I did exactly the same as the above, but also had to apply the
patch I've pasted in at the end.  Again, this may be totally bogus, but it
compiles and loads cleanly for me, and I am able to browse my windows
partition.

someone chime in if what I've posted is dangerous or could be done better.

-- Matt




--- aops.c      2007-05-10 20:06:10.000000000 -0400
+++ aops.c      2007-05-10 20:10:11.000000000 -0400
@@ -107,8 +107,7 @@
                                "0x%llx.", (unsigned long
long)bh->b_blocknr);
        }
        first = page_buffers(page);
-       local_irq_save(flags);
-       bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
+       spin_lock_irqsave(&first->b_uptodate_lock, flags);
        clear_buffer_async_read(bh);
        unlock_buffer(bh);
        tmp = bh;
@@ -123,8 +122,7 @@
                }
                tmp = tmp->b_this_page;
        } while (tmp != bh);
-       bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
-       local_irq_restore(flags);
+       spin_unlock_irqrestore(&first->b_uptodate_lock, flags) ;
        /*
         * If none of the buffers had errors then we can set the page
uptodate,
         * but we first have to perform the post read mst fixups, if the
@@ -159,8 +157,7 @@
        unlock_page(page);
        return;
 still_busy:
-       bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
-       local_irq_restore(flags);
+       spin_unlock_irqrestore(&first->b_uptodate_lock, flags) ;
        return;
 }





> --__--__--
>
> Message: 2
> Date: Sat, 19 May 2007 21:40:54 +0200
> From: Louis van Dompselaar <louis@dompselaar.org>
> Organization: Site by Site bv
> To: planetccrma@ccrma.Stanford.EDU
> Subject: Re: [PlanetCCRMA] kmod-ntfs
>
> Matt,
>
> Can you do us a favour and give a quick guide how to rebuilt these
> packages?
> I'm not too familiar with it.  I already tried the nvidia module but it
> won't compile
> against the ccrma kernel headers.
>
> cheers
> Louis
> > All of the kmod packages from livna are easily rebuilt for ccrma/rt
> > kernels (though in a couple cases you need to apply a patch or two --
> > ntfs especially, unfortunately.  I have successfully rebuilt these
> > packages:
> >
> > kmod-nvidia
> > kmod-nvidia-96xx  (this is for older/intermediate cards that don't
> > support the newest drivers but aren't quite "legacy" yet)
> >
> > I've tested both nvidia packages fairly extensively with rt kernels.
>
>
>
> --__--__--
>
> _______________________________________________
> PlanetCCRMA mailing list
> PlanetCCRMA@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma
>
>
> End of PlanetCCRMA Digest
>

------=_Part_39085_31203528.1179691724692
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

You have to hack the spec file, and there are only a couple of things that need to be changed for nvidia --<br><br>substitute your current ccrma kernel name&nbsp; ( output of&nbsp; uname -r )&nbsp; for the fedora kernel in kversion definition.&nbsp; Mine looks like this:
<br><br>%{!?kversion: %define kversion 2.6.21-0143.rt1.3.fc6.ccrmart}<br><br><br>in the kvariants definition line, remove all of the variants except %{?upvar}&nbsp; --&nbsp; since you&#39;re not building variants for a xen kernel (etc...).
<br><br>my line looks like this:<br><br>%{!?kvariants: %define kvariants %{?upvar}}<br><br>I usually delete all the corresponding preceding definitions as well, leaving only<br><br>%define upvar &quot;&quot;<br><br><br>write it, and then 
<br><br>rpmbuild -ba --target i686 nvidia-kmod.spec<br><br>(this will make both the module and a .src.rpm for you to use later if you wish)<br><br><br>This may be a totally bogus way of doing it, but it works cleanly for me.
<br><br>For kmod-ntfs I did exactly the same as the above, but also had to apply the patch I&#39;ve pasted in at the end.&nbsp; Again, this may be totally bogus, but it compiles and loads cleanly for me, and I am able to browse my windows partition.
<br><br>someone chime in if what I&#39;ve posted is dangerous or could be done better.<br><br>-- Matt<br><br><br><br><br>--- aops.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-05-10 20:06:10.000000000 -0400<br>+++ aops.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-05-10 20:10:11.000000000
 -0400<br>@@ -107,8 +107,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;0x%llx.&quot;, (unsigned long long)bh-&gt;b_blocknr);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first = page_buffers(page);<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_irq_save(flags);<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bit_spin_lock(BH_Uptodate_Lock, &amp;first-&gt;b_state);
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spin_lock_irqsave(&amp;first-&gt;b_uptodate_lock, flags);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear_buffer_async_read(bh);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unlock_buffer(bh);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmp = bh;<br>@@ -123,8 +122,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmp = tmp-&gt;b_this_page;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } while (tmp != bh);<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bit_spin_unlock(BH_Uptodate_Lock, &amp;first-&gt;b_state);<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_irq_restore(flags);<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spin_unlock_irqrestore(&amp;first-&gt;b_uptodate_lock, flags) ;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * If none of the buffers had errors then we can set the page uptodate,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * but we first have to perform the post read mst fixups, if the<br>@@ -159,8 +157,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unlock_page(page);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;
<br>&nbsp;still_busy:<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bit_spin_unlock(BH_Uptodate_Lock, &amp;first-&gt;b_state);<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_irq_restore(flags);<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spin_unlock_irqrestore(&amp;first-&gt;b_uptodate_lock, flags) ;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
&nbsp;}<br><br><br><br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>--__--__--<br><br>Message: 2<br>Date: Sat, 19 May 2007 21:40:54 +0200
<br>From: Louis van Dompselaar &lt;<a href="mailto:louis@dompselaar.org">louis@dompselaar.org</a>&gt;<br>Organization: Site by Site bv<br>To: <a href="mailto:planetccrma@ccrma.Stanford.EDU">planetccrma@ccrma.Stanford.EDU</a>
<br>Subject: Re: [PlanetCCRMA] kmod-ntfs<br><br>Matt,<br><br>Can you do us a favour and give a quick guide how to rebuilt these packages?<br>I&#39;m not too familiar with it.&nbsp;&nbsp;I already tried the nvidia module but it<br>won&#39;t compile
<br>against the ccrma kernel headers.<br><br>cheers<br>Louis<br>&gt; All of the kmod packages from livna are easily rebuilt for ccrma/rt<br>&gt; kernels (though in a couple cases you need to apply a patch or two --<br>&gt; ntfs especially, unfortunately.&nbsp;&nbsp;I have successfully rebuilt these
<br>&gt; packages:<br>&gt;<br>&gt; kmod-nvidia<br>&gt; kmod-nvidia-96xx&nbsp;&nbsp;(this is for older/intermediate cards that don&#39;t<br>&gt; support the newest drivers but aren&#39;t quite &quot;legacy&quot; yet)<br>&gt;<br>&gt; I&#39;ve tested both nvidia packages fairly extensively with rt kernels.
<br><br><br><br>--__--__--<br><br>_______________________________________________<br>PlanetCCRMA mailing list<br><a href="mailto:PlanetCCRMA@ccrma.stanford.edu">PlanetCCRMA@ccrma.stanford.edu</a><br><a href="http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma">
http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma</a><br><br><br>End of PlanetCCRMA Digest<br></blockquote></div><br>

------=_Part_39085_31203528.1179691724692--