* Linux 2.6 Build System and Binary Modules
@ 2004-02-29 18:31 Robbert Haarman
2004-02-29 18:42 ` Grzegorz Kulewski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Robbert Haarman @ 2004-02-29 18:31 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 858 bytes --]
Hello list,
Excuse me for not finding this if it has been asked before. Please Cc any answers, as I am not subscribed to this list.
I am trying to port a driver for the Realtek 8180 wireless ehternet controller from 2.4 to 2.6. The module comes as a binary-only object file with some sources that can be adapted to fit the specific kernel. My problem is that I can't figure out how to get the 2.6 kernel to include the binary part (it's in a .o file). The new build system does a little too much magic - compiling the module from source to .ko without giving me a chance to sneak in the binary code. How do I get it to link in the .o file, without making it look for the like-named .c file?
Cheers,
Robbert Haarman
---
"UNIX was not designed to stop you from doing stupid things, because that
would also stop you from doing clever things."
--Doug Gwyn
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux 2.6 Build System and Binary Modules
2004-02-29 18:31 Linux 2.6 Build System and Binary Modules Robbert Haarman
@ 2004-02-29 18:42 ` Grzegorz Kulewski
2004-02-29 19:20 ` Robbert Haarman
2004-02-29 19:20 ` Larry Reaves
2004-02-29 19:32 ` Sam Ravnborg
2 siblings, 1 reply; 7+ messages in thread
From: Grzegorz Kulewski @ 2004-02-29 18:42 UTC (permalink / raw)
To: Robbert Haarman; +Cc: linux-kernel
On Sun, 29 Feb 2004, Robbert Haarman wrote:
> Hello list,
>
> Excuse me for not finding this if it has been asked before. Please Cc any answers, as I am not subscribed to this list.
>
> I am trying to port a driver for the Realtek 8180 wireless ehternet controller from 2.4 to 2.6. The module comes as a binary-only object file with some sources that can be adapted to fit the specific kernel. My problem is that I can't figure out how to get the 2.6 kernel to include the binary part (it's in a .o file). The new build system does a little too much magic - compiling the module from source to .ko without giving me a chance to sneak in the binary code. How do I get it to link in the .o file, without making it look for the like-named .c file?
>
> Cheers,
>
> Robbert Haarman
I do not know if it will help You, but take a look at how makefile of new
nvidia driver is built... (patches from minion.de or newest driver from
nvidia.com)
Grzegorz Kulewski
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux 2.6 Build System and Binary Modules
2004-02-29 18:31 Linux 2.6 Build System and Binary Modules Robbert Haarman
2004-02-29 18:42 ` Grzegorz Kulewski
@ 2004-02-29 19:20 ` Larry Reaves
2004-02-29 19:32 ` Sam Ravnborg
2 siblings, 0 replies; 7+ messages in thread
From: Larry Reaves @ 2004-02-29 19:20 UTC (permalink / raw)
To: Robbert Haarman; +Cc: kernel mailing list
I am trying to do exactly the same thing... unfortunately I have not had
much success getting it to work. I have, however, solved your problem.
What I did was 'touch -B 9999999 priv_part.c' which creates an empty
file with a timestamp of the current time minus 9999999 seconds.
Because make will only recompile if the source is newer than the .o, it
will assume it is already compiled and it will just link it in. I am
new to kernel development, so I haven't made much progress beyond
getting the module to compile without errors. If you are able to get it
to work, please let me know.
On Sun, 2004-02-29 at 13:31, Robbert Haarman wrote:
> Hello list,
>
> Excuse me for not finding this if it has been asked before. Please Cc any answers, as I am not subscribed to this list.
>
> I am trying to port a driver for the Realtek 8180 wireless ehternet controller from 2.4 to 2.6. The module comes as a binary-only object file with some sources that can be adapted to fit the specific kernel. My problem is that I can't figure out how to get the 2.6 kernel to include the binary part (it's in a .o file). The new build system does a little too much magic - compiling the module from source to .ko without giving me a chance to sneak in the binary code. How do I get it to link in the .o file, without making it look for the like-named .c file?
>
> Cheers,
>
> Robbert Haarman
>
> ---
> "UNIX was not designed to stop you from doing stupid things, because that
> would also stop you from doing clever things."
> --Doug Gwyn
--
Larry Reaves <larry@moonshinecomputers.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux 2.6 Build System and Binary Modules
2004-02-29 18:42 ` Grzegorz Kulewski
@ 2004-02-29 19:20 ` Robbert Haarman
2004-02-29 19:38 ` Larry Reaves
0 siblings, 1 reply; 7+ messages in thread
From: Robbert Haarman @ 2004-02-29 19:20 UTC (permalink / raw)
To: Grzegorz Kulewski; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
On Sun, Feb 29, 2004 at 07:42:45PM +0100, Grzegorz Kulewski wrote:
> > How do I get it to link in the .o file, without making it look for the like-named .c file?
>
> I do not know if it will help You, but take a look at how makefile of new
> nvidia driver is built... (patches from minion.de or newest driver from
> nvidia.com)
Thanks, I got it now. Now just to see what I can do about missing __generic_copy_to_user and ..._from_user. :-)
---
"One of the common denominators I have found is that expectations rise above that which is expected."
-- George W. Bush
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux 2.6 Build System and Binary Modules
2004-02-29 18:31 Linux 2.6 Build System and Binary Modules Robbert Haarman
2004-02-29 18:42 ` Grzegorz Kulewski
2004-02-29 19:20 ` Larry Reaves
@ 2004-02-29 19:32 ` Sam Ravnborg
2004-03-01 18:01 ` Progress on RTL8180 Driver for Linux 2.6 Robbert Haarman
2 siblings, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2004-02-29 19:32 UTC (permalink / raw)
To: Robbert Haarman; +Cc: linux-kernel
On Sun, Feb 29, 2004 at 07:31:43PM +0100, Robbert Haarman wrote:
> Hello list,
>
> Excuse me for not finding this if it has been asked before. Please Cc any answers, as I am not subscribed to this list.
>
> I am trying to port a driver for the Realtek 8180 wireless ehternet controller from 2.4 to 2.6. The module comes as a binary-only object file with some sources that can be adapted to fit the specific kernel. My problem is that I can't figure out how to get the 2.6 kernel to include the binary part (it's in a .o file). The new build system does a little too much magic - compiling the module from source to .ko without giving me a chance to sneak in the binary code. How do I get it to link in the .o file, without making it look for the like-named .c file?
There is no good nor documented way to do it today.
But you can use:
$(obj)/module.o: ld_flags += binary.o
Assuming you are building a module, and 'module' is the name of the
resulting module.
For built-in you shall use:
$(obj)/built-in.o: ld_flags += binary.o
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux 2.6 Build System and Binary Modules
2004-02-29 19:20 ` Robbert Haarman
@ 2004-02-29 19:38 ` Larry Reaves
0 siblings, 0 replies; 7+ messages in thread
From: Larry Reaves @ 2004-02-29 19:38 UTC (permalink / raw)
To: Robbert Haarman; +Cc: Grzegorz Kulewski, kernel mailing list
That's were I'm stuck too...
On Sun, 2004-02-29 at 14:20, Robbert Haarman wrote:
> On Sun, Feb 29, 2004 at 07:42:45PM +0100, Grzegorz Kulewski wrote:
> > > How do I get it to link in the .o file, without making it look for the like-named .c file?
> >
> > I do not know if it will help You, but take a look at how makefile of new
> > nvidia driver is built... (patches from minion.de or newest driver from
> > nvidia.com)
>
> Thanks, I got it now. Now just to see what I can do about missing __generic_copy_to_user and ..._from_user. :-)
>
> ---
> "One of the common denominators I have found is that expectations rise above that which is expected."
> -- George W. Bush
--
Larry Reaves <larry@moonshinecomputers.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Progress on RTL8180 Driver for Linux 2.6
2004-02-29 19:32 ` Sam Ravnborg
@ 2004-03-01 18:01 ` Robbert Haarman
0 siblings, 0 replies; 7+ messages in thread
From: Robbert Haarman @ 2004-03-01 18:01 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
For all who have asked about my efforts to make the RTL8180 driver work on 2.6, and others who are interested, here's an update.
I've gotten the driver to build against the 2.6 kernel. The closed source part references __generic_copy_{from,to}_user, which seem to have been replaced by __copy_{to,from}_user_ll (see arch/i386/lib/usercopy.c from the kernel sources). I have written a compatibility file that wraps the new functions inside the old names. With that, the module loads, but then causes a kernel oops due to a null pointer dereference in the initialization code.
The sources I use can be obtained from my computer; point your browser at http://hal.shire.sytes.net:5800/~inglorion/software/#rtl_8180_driver and download the tarball from there.
Happy hacking,
Robbert Haarman
---
"For every complex problem there is an answer that is clear, simple, and wrong."
-- H.L. Mencken
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-01 18:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29 18:31 Linux 2.6 Build System and Binary Modules Robbert Haarman
2004-02-29 18:42 ` Grzegorz Kulewski
2004-02-29 19:20 ` Robbert Haarman
2004-02-29 19:38 ` Larry Reaves
2004-02-29 19:20 ` Larry Reaves
2004-02-29 19:32 ` Sam Ravnborg
2004-03-01 18:01 ` Progress on RTL8180 Driver for Linux 2.6 Robbert Haarman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®