Skip to contentSkip to conversation

Possible bug in firmware/Makefile

DISCUSSION Marek Vasut 1 participant 1 message Nov 26, 2013

lore
Share & tools
lore
#0 lore raw

Hello,

I am observing a possible bug when trying to build external firmware file into the kernel. Here are the steps to reproduce the problem I observe.

1) Retrieve Linux 3.13-rc1 (I can confirm this in 3.10.18 stable as well)
2) Clean up the source tree

$ git clean -fdx
3) Configure the kernel (minimal configuration is sufficient)
$ make allnoconfig
4) Produce a dummy firmware file to be built into the kernel
$ echo "hello" > /tmp/firmware.fw
5) Build the kernel (note: I tested this bug on ARCH=arm and ARCH=x86_64)
$ make CONFIG_EXTRA_FIRMWARE="firmware.fw" CONFIG_EXTRA_FIRMWARE_DIR="/tmp/"

What I observe is this output:

LD sound/built-in.o
make[1]: *** No rule to make target include/config/extra/firmware/dir.h', needed by firmware//tmp/firmware.fw.gen.S'. Stop.
make: *** [firmware] Error 2

Interestingly enough, if I place these same options into the kernel .config, using the commands like these below for example, the kernel builds correctly.

echo -e \
'CONFIG_EXTRA_FIRMWARE_DIR="/tmp/"\nCONFIG_EXTRA_FIRMWARE="firmware.fw"' \

Quoted 1 line
Quoted 1 line

.config

make oldconfig
make

Is this a known issue please? Is there a way to specify the extra firmware file to be built into the kernel on the kernel build command line please?

Thank you very much!

Best regards,
Marek Vasut