Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
faq:drivers [2010/02/13 12:00]
stefanha
faq:drivers [2010/02/13 12:19]
stefanha
Line 1: Line 1:
 ===== Driver FAQ ===== ===== Driver FAQ =====
  
-=== How do I check if a network card is supported? ===+==== How do I check if a network card is supported? ​====
  
 When a PCI network card is detected, its PCI ID is used to identify it and choose an appropriate driver. ​ Each network card driver has a list of PCI IDs it supports. When a PCI network card is detected, its PCI ID is used to identify it and choose an appropriate driver. ​ Each network card driver has a list of PCI IDs it supports.
Line 16: Line 16:
   PCI_ROM(0x10ec,​ 0x8139, "​rtl8139",​ "​Realtek 8139", 0),   PCI_ROM(0x10ec,​ 0x8139, "​rtl8139",​ "​Realtek 8139", 0),
  
-=== What if there is no driver for my network card? ===+==== What if there is no driver for my network card? ====
  
 If there is no native gPXE driver for a network card, there are two choices: If there is no native gPXE driver for a network card, there are two choices:
Line 26: Line 26:
 There are developers in the community who do paid driver development work and can help you add support for new network cards. ​ Ask on the mailing list. There are developers in the community who do paid driver development work and can help you add support for new network cards. ​ Ask on the mailing list.
  
-=== Can open source Linux or BSD drivers be used with gPXE? ===+==== Can open source Linux or BSD drivers be used with gPXE? ====
  
 No.  Although the gPXE driver API is similar to the Linux API, drivers are not compatible at the source or binary level. ​ Open source drivers can be ported to gPXE or used as a starting point for developing gPXE drivers. ​ This is especially useful for network cards where no datasheet is available from the vendor. No.  Although the gPXE driver API is similar to the Linux API, drivers are not compatible at the source or binary level. ​ Open source drivers can be ported to gPXE or used as a starting point for developing gPXE drivers. ​ This is especially useful for network cards where no datasheet is available from the vendor.
  
-=== How can I use the UNDI driver if there is no native driver? ===+==== Where do I start with developing a new driver? ==== 
 + 
 +You must be able to program in C.  Device driver development knowledge on other platforms is useful but not required. 
 + 
 +[[http://​etherboot.org/​wiki/​soc/​2008/​mdeck/​notes/​gpxe_driver_api|Michael Decker'​s gPXE driver API documentation]] shows the interface that a driver must implement. 
 + 
 +Study the code in ''​gpxe/​src/​drivers/​net''​. ​ The ''​rtl8139''​ and ''​r8169''​ drivers are good examples. ​ Note that some drivers are not written for the gPXE API but use a wrapper for the legacy Etherboot API instead. ​ New drivers should use the gPXE API. 
 + 
 +[[http://​lwn.net/​Kernel/​LDD3/​|Linux Device Drivers]] is a good reference for understanding Linux drivers and learning general driver development concepts. 
 + 
 +==== How can I use the UNDI driver if there is no native driver? ​====
  
 The UNDI driver is a generic driver that works on network cards that have a vendor UNDI ROM.  The ROM contains driver code that is supposed to conform to the PXE/UNDI specification. ​ gPXE can load the UNDI driver and use it instead of a native driver. The UNDI driver is a generic driver that works on network cards that have a vendor UNDI ROM.  The ROM contains driver code that is supposed to conform to the PXE/UNDI specification. ​ gPXE can load the UNDI driver and use it instead of a native driver.
Line 38: Line 48:
   - All-driver (''​gpxe''​) or ''​undi''​ images can load the UNDI for PCI network cards. ​ The network boot ROM must be enabled in the BIOS in order for the UNDI ROM to be visible to gPXE.  Note that only the first network card is supported with UNDI since multiple instances of UNDI is unreliable and cannot be supported.   - All-driver (''​gpxe''​) or ''​undi''​ images can load the UNDI for PCI network cards. ​ The network boot ROM must be enabled in the BIOS in order for the UNDI ROM to be visible to gPXE.  Note that only the first network card is supported with UNDI since multiple instances of UNDI is unreliable and cannot be supported.
  
-=== Why write native drivers if UNDI works with every network card? ===+==== Why write native drivers if UNDI works with every network card? ====
  
   - gPXE is an open source PXE stack and provides UNDI services. ​ gPXE cannot be used as an option ROM without a native driver.   - gPXE is an open source PXE stack and provides UNDI services. ​ gPXE cannot be used as an option ROM without a native driver.

QR Code
QR Code faq:drivers (generated for current page)