• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Downloading firmware
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Downloading firmware


  • Subject: Re: Downloading firmware
  • From: Quinn <email@hidden>
  • Date: Tue, 1 Feb 2005 06:54:07 +0000

At 21:22 -0500 19/1/05, Daniel Sumorok wrote:
	I am looking into writing a driver for a network device that needs
firmware downloaded to it.  Is there a way to embed a binary file into a
.kext file so that it can be loaded into memory by an IONetworkController
object?

The simplest way to do this is to convert the firmware binary to a C (static unsigned char) array definition, and link that directly into your KEXT.


However, if the firmware is large I strongly recommend that you modify this approach to avoid holding the firmware in kernel memory (which is permanently wired). In that case you'd want to use a two KEXT approach. The first KEXT contains your original driver. If it discovers that the firmware needs updating, it publishes a nub into the I/O Registry. Your second KEXT matches against that nub. When the nub is created, your second KEXT is loaded, with your first KEXT as its provider. The second KEXT contains the firmware, and can use the services of the first KEXT to download it. Once it's done it unloads itself (typically by calling terminate on the provider).

This is a relatively well known technique in I/O Kit circles, although I don't have a handy reference for an example or documentation. You might try posting on one of the more I/O Kit specific lists (darwin-drivers?).

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Mail Settings
  • Next by Date: Re: Sending data with CFSocket
  • Previous by thread: Re: Mail Settings
  • Next by thread: Re: Sending data with CFSocket
  • Index(es):
    • Date
    • Thread