KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

KernelNewbies:
  • FAQ
  • CompileVendorDriver

How do I compile a 3rd party device driver ?

As an example on how to compile a 3rd party device driver for the 2.6 kernel, lets look at how to compile the HWU54G Wireless driver for Fedora Core.

kernel-devel

First, you need to make sure you have the kernel-devel package for your kernel installed. If your kernel is up to date, simply doing a yum install kernel-devel should be enough. Verify that you have a kernel-devel package of the same version as your currently running kernel!

  # yum install kernel-devel
  # uname -a
  # rpm -q kernel-devel

If the versions of your currently running kernel and kernel-devel package do not match, you should probably upgrade the kernel and reboot into that new kernel.

Unpack and build driver

The vendor usually ships the driver in a .zip or .tar.gz format, or even has a .tar.gz with source code inside a .zip; anything is possible for packaging. In the case of the HWU54G driver, the zip file contains documentation and a tarball named ZD1211LnxDrv_2_0_0_0.tar.gz.

First, we unpack the driver.

  # mkdir zd
  # cd zd
  # tar xzf /path/to/wherever/you/put/ZD1211LnxDrv_2_0_0_0.tar.gz

This would be a good time to check if the driver tarball contains any additional documentation. If there is any, you should read it. This documentation usually tells you whether you need to download firmware, if you need to adjust any system scripts for this driver to work, specifics on how to build and install this driver, etc...

In the case of the HWU54G driver, the building and installing appears to be quite simple:

  # make
  # make install

Kernel upgrades

When you upgrade your kernel, you will need to recompile the driver for your new kernel. Simply repeat the build procedure above while running your new kernel. You need to be running your new kernel because the Makefile picks the kernel version to build against from the kernel version the system is running currently.

Driver specifics

If you run into other 3rd party drivers that need special instructions, feel free to add them here.


CategoryFAQ

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01