Question on busybox and loading firmware?

Michael Conrad mconrad at intellitree.com
Mon Sep 22 16:32:34 UTC 2014


On 9/22/2014 10:27 AM, Michael D. Setzer II wrote:
> On 22 Sep 2014 at 10:32, Gustavo Zacarias wrote:
>> On 09/22/2014 09:56 AM, Michael D. Setzer II wrote:
>>> Was already able to find the firmware since it was included with the installation
>>> of the fedora 20 on the notebook. Issue is that I placed the firmware files into the
>>>   /lib/firmware directory, but on booting from my project kernel it seems to try and
>>> load firmware during the kernel loading before the ramdisk.lzma is loaded. The
>>> kernel is built with the option to not include firmware, since I don't know what if
>>> any firmware will be needed by end users.  This seems to have worked with
>>> bnx2  and bnx2x firmware that another end user needed.
>>>
>>> But the booting showed the messages before the ramdisk.lzma is
>>> recognized, and then shows messages with =-12, and =-2. Didn't save the
>>> output since this was a ram only load. Was thinking that mdev -s might cause
>>> it to load firmware. Kernel contains most disk and ethernet devices included.
>> Hi.
>> Make the driver a module instead of built into the kernel.
>> The driver might initialize before the kernel/userland has
>> access/mounted a root filesystem and that's what happens.
> Thanks for the reply. Problem is that iso has the option of select 7 different
> kernels, so if I changed it to using moduals I would have to include them for
> multiple kernels and also come up with a script to load the moduals. Right
> now everything works by having the kernels handle the hardware.

I think the "right way" to handle that is to have each kernel look for a 
different /lib/modules/* directory.  You shouldn't need a special script 
to load modules because the kernel should report them to mdev and it 
should "just work".  But I understand wanting to have a static kernel 
for simplicity.

Anyway, when the kernel tries to load firmware, you should get a 
60-second timeout before it gives up.  If you have more than 60 seconds 
between when the module gets initialized and when your filesystem gets 
mounted, then that could be the problem.  There are past messages on 
this list that show how to get better logging of what the kernel is 
asking from mdev, which might help you find the problem.

What I have done for my static kernels is to include the firmware into 
the compiled kernel.  This is best when you know that the kernel will 
always need the firmware.  (but if you are doing this for lots optional 
hardware, you can end up with a very large kernel, which is worse than 
needing to load firmware from the filesystem) Don't remember offhand, 
but there is a kernel config where you tell it the directory of the 
firmware, and tell it what filenames to include, and then those files 
get sucked in when you compile the kernel and are automatically 
available at boot.

Hope that helps,
-Mike


More information about the busybox mailing list