[yocto] how to build external firmware for kernel

Paul Eggleton paul.eggleton at linux.intel.com
Mon Aug 5 03:05:43 PDT 2013


Hi Lothar,

On Monday 05 August 2013 11:42:22 lothar at denx.de wrote:
> I have a linux kernel and a external firmware. Building manually,
> first I have to checkout and build the firmware "native" to obtain a
> firmware blob, then I need this firmware blob to build the kernel for
> the target.
> 
> So far I tried to do this in yocto with separate recipes: a
> firmware.bb and a mylinux.bb. In firmware.bb, I check out the firmware
> via git and let it run "make" on native (this is necessary, since the
> Makefile builds a tool which then automatically gets called inside the
> Makefile to create the firmware blob).
> 
> In the kernel recipe, I declare a DEPEND on firmware.bb. I set the
> .config options to load an extra firmware blob. But now, I have a
> problem: I need actually to have the firmware blob within the kernel's
> file hierarchy. Ideally I would copy/move it from the firmware's
> destination directory into the kernel's source directory.

Shouldn't firmware go into /lib/firmware?
 
> Questions:
> How can I achieve this kind of setup working out with yocto or
> bitbake, respectively? What might be the best approach in my situation?

You can get the kernel version name from ${STAGING_KERNEL_DIR}/kernel-
abiversion if that helps, but I wouldn't have thought you'd need it if the 
firmware is installed to /lib/firmware instead.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list