Hi,

On 26-Apr-01 Mark McClelland wrote:
> "Nemosoft Unv." wrote:
> 
>> No problem... But Im still deciding whats the best strategy. Ive tried
>> two approaches:
>>
>> * distribute a .o file with the code which requires a small patch to the
>>   Makefile, so that it gets linked in (the current method)
> 
> The advantage to that approach is that users can build a totally
> monolithic
> kernel. I suppose there are some people who still do that.

Yes, I had a few of those nerds in my mailbox :)

> 
>> * build a separate module that acts as a plugin to the pwc driver.
> 
> This is what I did with ov511. You can see the code at
> http://alpha.dyndns.org/ov511/download.html . The only thing left to do is
> make the decompressor autoload when it is needed.

Itīs possible, if you let your ov511.c refer to functions in your
decompressor module. Iīm not so sure autoloading is so great, however. I
opted to use it as a īpluginī that users can insert at their own will. No
autoload/unload fuss.

> This is why I opted against the first strategy...I expected users would be
> turning on the "OV518 Decompression" option in their kernel config, and
> then be
> complaining when their compiler couldn't find ov518_decomp.o (because they
> didn't
> RTFM and download it separately). It's too bad diff can't handle binary
> files.

*nod* Thereīs another problem though: cross-compilation of the decompression
stuff. Users would have to choose which module to download, or you would
have to stuck all modules in the diff with different names.

> Thanks...I didn't know about that. That solves half of my troubles (now I
> will only be pulling half of my hair out :) ).

Hmm; how much do you have left? :)

>> and using wrapper functions for kmalloc() etc.
> 
> I'm not sure what you mean by this. Am I missing something important here?

Yes; my module is compiled non-versioned, but uses kmalloc/kfree. On a
versioned kernel, this will result in īunresolved symbol kmallocī (really,
this module versioning stuff is the bane of Linux!!!!). So instead I export
pwc_kmalloc/pwc_kfree non-versioned from my pwc module, and the plugin uses
those. Of course, this is doable for a couple of functions, but not dozens.

[version-less modules impossible in 2.4.*]
> I couldn't find a solution to this either. If you come up with something,
> please let me know.

I havenīt find anything. Not even a good reason as to why.

 - Nemosoft

-----------------------------------------------------------------------------
Try SorceryNet!   One of the best IRC-networks around!   irc.sorcery.net:9000
URL: never        IRC: nemosoft      IscaBBS (bbs.isca.uiowa.edu): Nemosoft
                        >> Never mind the daylight << 

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to