Writing and compiling kernel modules

From: Gali Work (galinews_at_gmail.com)
Date: 07/12/05


Date: 12 Jul 2005 08:05:32 -0700

Hi All,

I'm trying to port a kernel module from solaris to HP-UX. At this
point, I'm testing on 11.11, but will try other systems when (if) I'm
successful.

I've downloaded the dummynet tree, and play with it now. 2 questions
come to mind:

1. Can I somehow use gcc to compile a kernel module/driver? All
refernces say I should use the HP ANSI-C compiler, but I wonder if
anybody has managed to use gcc. If so, what are the correct flags?

2. I need to write a "misc" module. All the examples I found are for
either a driver or a STREAMS module. Any ideas?

                                           
TIA,
Gali



Relevant Pages

  • cant install nvidia displa driver any more
    ... -> Cleaning kernel module build directory. ... Unable to build the NVIDIA kernel module. ... ERROR: Installation has failed. ... I did not update gcc though. ...
    (alt.os.linux.suse)
  • cant install nvidia displa driver any more
    ... -> Cleaning kernel module build directory. ... Unable to build the NVIDIA kernel module. ... ERROR: Installation has failed. ... I did not update gcc though. ...
    (alt.os.linux.suse)
  • Re: NVIDIA card & lenny
    ... We need to see the exact text; there is no point in wasting our time ... The compiler used to compile the kernel (gcc 4.1) does not exactly match ... Unable to load the kernel module 'nvidia.ko'. ...
    (Debian-User)
  • version magic in kernel module and gcc 4
    ... we've migrated from gcc 3.2.3 to gcc 4.0.2. ... So now I compile my kernel ... Unfortunately during loading my kernel module I'm ...
    (comp.os.linux.development.system)
  • Re: lenny: getting non-free nvidia drivers issue
    ... had problems building the kernel module for k7 because of a GPL-only ... I've had that problem before having on older version of gcc ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)