Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, The company I'm working for has been developing device drivers for the last 10 years. There is a need to port device drivers to linux for our customers. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2003
    Location
    Ottawa, Ontario, Canada
    Posts
    7

    Porting Resource Managers


    Hello,

    The company I'm working for has been developing device drivers for the last 10 years. There is a need to port device drivers to linux for our customers.

    I have a few items that I would ask the community to comment on.

    I was just going to setup a development machine using redhat 8. I used it to program a couple simple University assignments no problem. Is this the best distribution to develop on? What would be the most common distribution in the corporate world? Are there any compatibility issues amoung the different distributions excluding xWindow type applications?

    Where would be a good place to start reading up on modules, PCI bus access, DMA channels, etc...

    TIA

  2. #2
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    well, in all honesty it shouldn't matter which distribution you use, since you will probably end up replacing the distribution kernel with one you build from source. RedHat seems to be the most comercially common around here, but I can't talk for anywhere else. I think SuSE is more popular oversees. A good place to start reading up on DMAs and IRQs and stuff like that? There is a linux kernel hackers book somewhere in the wild, but it is a bit old (stuff happens too fast for publishers to keep up). Subscribe to LKML (look on kernel.org for more info), that would be the best bet.
    I respectfully decline the invitation to join your delusion.

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    A good way to learn is of course to look at the source of the existing drivers, or the driver skeletons. Most of it is very easy, but I can't speak for how much it resembles Windows driver development (since I've never done that on Windows).
    Anyway, many drivers are well commented, so it's a very cheap way to learn.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2003
    Location
    Ottawa, Ontario, Canada
    Posts
    7
    Quote Originally Posted by Dolda2000
    A good way to learn is of course to look at the source of the existing drivers, or the driver skeletons. Most of it is very easy, but I can't speak for how much it resembles Windows driver development (since I've never done that on Windows).
    Anyway, many drivers are well commented, so it's a very cheap way to learn.
    Great thanks for the replies.. I have to correct your windoze assumption. Our drivers are for QNX and unix based systems only.

  6. #5
    Just Joined!
    Join Date
    Apr 2003
    Location
    Ottawa, Ontario, Canada
    Posts
    7
    So we are all setup and are starting to work on the resman. When we try to insmod we get kernel version problems. It says that the code was compiled for kernel 2.4.9-9 and we are running 2.4.18-27. What do we need to do? Update the headers? Specify at compile time what version we are targeting?

    TIA,
    Paul

  7. #6
    Just Joined!
    Join Date
    Apr 2003
    Location
    Ottawa, Ontario, Canada
    Posts
    7
    Never mind, If I include the /usr/src/linux-2.4/include it is fixed.


    Now on to tainting the kernel :o

  8. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The target kernel version is determined in include/linux/module.h by this line:
    Code:
    static const char __module_kernel_version[] __attribute__((section(".modinfo"))) = "kernel_version=" UTS_RELEASE;
    UTS_RELEASE is fetched from include/linux/version.h.

    So, probably, you are compiling with the headers for the wrong kernel version. Do you have two different kernel sources installed? Check your -I directives for cpp.

  9. #8
    Just Joined!
    Join Date
    Apr 2003
    Location
    Ottawa, Ontario, Canada
    Posts
    7
    Quote Originally Posted by Dolda2000
    The target kernel version is determined in include/linux/module.h by this line:
    Code:
    static const char __module_kernel_version[] __attribute__((section(".modinfo"))) = "kernel_version=" UTS_RELEASE;
    UTS_RELEASE is fetched from include/linux/version.h.

    So, probably, you are compiling with the headers for the wrong kernel version. Do you have two different kernel sources installed? Check your -I directives for cpp.

    Yep that's it. I had updated the kernel using redhat up2date. The I directives are it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •