Possible bug in firmware/Makefile

From: Marek Vasut
Date: Tue Nov 26 2013 - 18:27:12 EST


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"' \
>> .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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/