All of lore.kernel.org
 help / color / mirror / Atom feed
* firmware loading
@ 2009-07-02 13:32 Daniel Drake
  2009-07-02 14:08 ` Harald Hoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Drake @ 2009-07-02 13:32 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Hi,

Dracut seems to lack a mechanism for firmware loading i.e. it doesn't
install the udev rules or the firmware loading helper.

Is this planned?

I'd be happy to come up with a patch. Would it be sensible to add it to
95udev-rules?

Thanks,
Daniel


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Firmware loading
@ 2013-03-06 15:06 John Weber
  2013-03-06 21:18 ` Otavio Salvador
  2013-03-06 21:48 ` Eric Bénard
  0 siblings, 2 replies; 14+ messages in thread
From: John Weber @ 2013-03-06 15:06 UTC (permalink / raw)
  To: meta-freescale@yoctoproject.org, poky

I'm attempting to configure Linux to load firmware for a Broadcom SDIO Wifi chip 
(BCM4329) onto an i.MX6-based board.

Here is my main question - How is firmware supposed to be loaded within the 
paradigm of a Yocto/Poky-built system?  Any insight and guidance is appreciated.

What I've done so far, and what I've discovered:

I've incorporated the driver into the kernel (backported from an upstream kernel 
rev), and removed the staging drivers present in 3.0.35.  It is built-in at the 
moment (not a module) and this is the error that I'm getting when it times-out 
loading firmware:

brcmfmac: brcmf_sdbrcm_download_code_file: Fail to request firmware -2
brcmfmac: _brcmf_sdbrcm_download_firmware: dongle image file download failed
brcmfmac: brcmf_bus_start: brcmf_sdbrcm_bus_init failed -1

The error code indicates that it cannot load firmware because it can't find the 
firmware file.

I've taken care to put the firmware in /lib/firmware/brcm (2 files).  The driver 
hardcodes a relative path filename to the firmware files and I've made sure that 
they are the same.

I've researched the firmware request process for the kernel.  My understanding 
is that the process looks like this:
1) driver requests firmware file
2) kernel opens up a special set of files in sysfs (/sys/class/firmware/xxx 
where xxx is the device name)
3) kernel signals udev to load firmware, giving it the filename and the device name
4) udev, through its rules, locates the firmware file for the device and writes 
it to the special file in sysfs

So, here is where I'm starting to get confused.  The default udev rules that are 
created in /lib/udev/rules.d/50-udev-default.rules show the following rule for 
firmware:

SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware"

I'm guessing that this is for cases where the firmware file is built-in to the 
kernel image.  I can see the necessity for doing this in some cases, but that is 
not what I'm doing at the moment, I'm trying to load the firmware from a file in 
the filesystem.  That requires udev to run a program or script that will read 
the file and write it to the appropriate file in sysfs.

The files in the poky udev recipe offers a clue, but for some reason that I 
don't understand, this file does not make it into the filesystem:

poky/meta/recipes-core/udev/udev/udev.rules:

# Firmware Helper
ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware.sh"

This rule expects that there is a firmware helper script "firmware.sh" somewhere 
in the filesystem.  Other than this file, I can't file any reference to a 
"firmware.sh" file anywhere in the metadata, which could explain why this line 
doesn't make it into the installed filesystem.  I could only find references to 
files named this on the net.










^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-12  3:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 13:32 firmware loading Daniel Drake
2009-07-02 14:08 ` Harald Hoyer
  -- strict thread matches above, loose matches on Subject: below --
2013-03-06 15:06 Firmware loading John Weber
2013-03-06 21:18 ` Otavio Salvador
2013-03-06 21:50   ` John Weber
2013-03-06 21:48 ` Eric Bénard
2013-03-06 21:56   ` John Weber
2013-03-06 22:04     ` Eric Bénard
2013-03-07 16:21       ` John Weber
2013-03-07 17:50         ` John Weber
2013-03-08 12:15           ` Otavio Salvador
2013-03-08 15:35             ` John Weber
2013-03-08 17:36               ` Otavio Salvador
2013-03-12  3:53                 ` John Weber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.