2014-06-18 08:46:39

by Ronald

[permalink] [raw]
Subject: Regression: firmware: Simplify directory creation + b43 = fails to build

Dear kernel developers,

Latest git HEAD (from Torvalds):

CC drivers/base/firmware_class.o
LD drivers/base/built-in.o
MK_FW firmware/b43/ucode5.fw.gen.S
/bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
(file or directory does not exist, it should not have the .gen.S
suffix)
/bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
... snip ...
/bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
firmware/Makefile:185: recept voor doel 'firmware/b43/ucode5.fw.gen.S'
is mislukt
make[1]: *** [firmware/b43/ucode5.fw.gen.S] Fout 1
Makefile:893: recept voor doel 'firmware' is mislukt
make: *** [firmware] Fout 2
make: *** Wachten op onvoltooide taken...

==> git revert 5180d5f
[bleed 55a169f] Revert "firmware: Simplify directory creation"
2 files changed, 38 insertions(+), 16 deletions(-)
09:57 ronald@Charlie /usr/src/linux :)
==> time make -j2
... snip ...
LD drivers/base/built-in.o
MKDIR firmware/b43/
MK_FW firmware/b43/ucode5.fw.gen.S
MK_FW firmware/b43/b0g0initvals5.fw.gen.S
MK_FW firmware/b43/b0g0bsinitvals5.fw.gen.S
MK_FW firmware/b43/pcm5.fw.gen.S
AS firmware/b43/ucode5.fw.gen.o
AS firmware/b43/b0g0initvals5.fw.gen.o
AS firmware/b43/b0g0bsinitvals5.fw.gen.o
AS firmware/b43/pcm5.fw.gen.o
LD firmware/built-in.o

If you require more info, please let me know.


2014-06-18 14:34:03

by Michal Marek

[permalink] [raw]
Subject: Re: Regression: firmware: Simplify directory creation + b43 = fails to build

Dne 18.6.2014 10:46, Ronald napsal(a):
> Dear kernel developers,
>
> Latest git HEAD (from Torvalds):
>
> CC drivers/base/firmware_class.o
> LD drivers/base/built-in.o
> MK_FW firmware/b43/ucode5.fw.gen.S
> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
> (file or directory does not exist, it should not have the .gen.S
> suffix)
> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
> ... snip ...
> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
> firmware/Makefile:185: recept voor doel 'firmware/b43/ucode5.fw.gen.S'
> is mislukt
> make[1]: *** [firmware/b43/ucode5.fw.gen.S] Fout 1
> Makefile:893: recept voor doel 'firmware' is mislukt
> make: *** [firmware] Fout 2
> make: *** Wachten op onvoltooide taken...

Where does firmware/b43 come from?

Thanks,
Michal

2014-06-18 16:25:09

by Ronald

[permalink] [raw]
Subject: Re: Regression: firmware: Simplify directory creation + b43 = fails to build

>From my .config

==> cat /usr/src/config | grep -i b43
CONFIG_EXTRA_FIRMWARE="b43/ucode5.fw b43/b0g0initvals5.fw
b43/b0g0bsinitvals5.fw b43/pcm5.fw"
... snip ...

2014-06-18 16:33 GMT+02:00 Michal Marek <[email protected]>:
> Dne 18.6.2014 10:46, Ronald napsal(a):
>> Dear kernel developers,
>>
>> Latest git HEAD (from Torvalds):
>>
>> CC drivers/base/firmware_class.o
>> LD drivers/base/built-in.o
>> MK_FW firmware/b43/ucode5.fw.gen.S
>> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
>> (file or directory does not exist, it should not have the .gen.S
>> suffix)
>> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
>> ... snip ...
>> /bin/sh: firmware/b43/ucode5.fw.gen.S: Bestand of map bestaat niet
>> firmware/Makefile:185: recept voor doel 'firmware/b43/ucode5.fw.gen.S'
>> is mislukt
>> make[1]: *** [firmware/b43/ucode5.fw.gen.S] Fout 1
>> Makefile:893: recept voor doel 'firmware' is mislukt
>> make: *** [firmware] Fout 2
>> make: *** Wachten op onvoltooide taken...
>
> Where does firmware/b43 come from?
>
> Thanks,
> Michal
>

2014-07-07 19:02:13

by Torsten Kaiser

[permalink] [raw]
Subject: Re: Regression: firmware: Simplify directory creation + b43 = fails to build

On Wed, Jun 18, 2014 at 6:25 PM, Ronald <[email protected]> wrote:
> From my .config
>
> ==> cat /usr/src/config | grep -i b43
> CONFIG_EXTRA_FIRMWARE="b43/ucode5.fw b43/b0g0initvals5.fw
> b43/b0g0bsinitvals5.fw b43/pcm5.fw"
> ... snip ...

That might be rather later, but I seem to have the same problem:
CHK kernel/config_data.h
MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
firmware/Makefile:185: recipe for target
'firmware/amd-ucode/microcode_amd.bin.gen.S' failed
make[1]: *** [firmware/amd-ucode/microcode_amd.bin.gen.S] Error 1
Makefile:896: recipe for target 'firmware' failed
make: *** [firmware] Error 2

The directory firmware/amd-ucode does not exist in the kernel source
tree, but my .config seems to need it:
CONFIG_EXTRA_FIRMWARE="radeon/R700_rlc.bin radeon/RV710_uvd.bin
radeon/RV730_smc.bin amd-ucode/microcode_amd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

Just doing a "mkdir firmware/amd-ucode" lets the build continue and I
get a working 3.16 kernel.

With 3.15 and earlier I never had a problem with this, but 3.16-rc4
just failed with above message.

Do you need my full .config or any other information about my system?
I would be happy to provide that and/or test a patch.

Thanks for looking into this!

Torsten

2014-07-08 12:09:32

by Michal Marek

[permalink] [raw]
Subject: Re: Regression: firmware: Simplify directory creation + b43 = fails to build

On 2014-07-07 21:02, Torsten Kaiser wrote:
> On Wed, Jun 18, 2014 at 6:25 PM, Ronald <[email protected]> wrote:
>> From my .config
>>
>> ==> cat /usr/src/config | grep -i b43
>> CONFIG_EXTRA_FIRMWARE="b43/ucode5.fw b43/b0g0initvals5.fw
>> b43/b0g0bsinitvals5.fw b43/pcm5.fw"
>> ... snip ...
>
> That might be rather later, but I seem to have the same problem:
> CHK kernel/config_data.h
> MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
> /bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
> [...]
> The directory firmware/amd-ucode does not exist in the kernel source
> tree, but my .config seems to need it:
> CONFIG_EXTRA_FIRMWARE="radeon/R700_rlc.bin radeon/RV710_uvd.bin
> radeon/RV730_smc.bin amd-ucode/microcode_amd.bin"
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
>
> Just doing a "mkdir firmware/amd-ucode" lets the build continue and I
> get a working 3.16 kernel.
>
> With 3.15 and earlier I never had a problem with this, but 3.16-rc4
> just failed with above message.
>
> Do you need my full .config or any other information about my system?

That's not needed, I can reproduce the failure now as well.

Michal

2014-07-08 12:47:31

by Michal Marek

[permalink] [raw]
Subject: [PATCH] firmware: Create directories for external firmware

Commit 5180d5f4 ("firmware: Simplify directory creation") broke
including firmware specified in CONFIG_EXTRA_FIRMWARE:

MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
/bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
...
firmware/Makefile:185: recipe for target
'firmware/amd-ucode/microcode_amd.bin.gen.S' failed

It works with O= builds, because the directory is created by
Makefile.build. Create the directory in firmware/Makefile in non-O
builds.

Reported-by: Ronald <[email protected]>
Reported-by: Torsten Kaiser <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
---

Can you try this patch?

Ronald, can you tell me your full name for the Reported-by: line?

Thanks.
---

firmware/Makefile | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/firmware/Makefile b/firmware/Makefile
index 5747417..0862d34 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -219,6 +219,12 @@ $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep)
obj-y += $(patsubst %,%.gen.o, $(fw-external-y))
obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o, $(fw-shipped-y))

+ifeq ($(KBUILD_SRC),)
+# Makefile.build only creates subdirectories for O= builds, but external
+# firmware might live outside the kernel source tree
+_dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))), $(shell [ -d $(d) ] || mkdir -p $(d)))
+endif
+
# Remove .S files and binaries created from ihex
# (during 'make clean' .config isn't included so they're all in $(fw-shipped-))
targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
--
1.8.4.5

2014-07-08 15:19:48

by Ronald

[permalink] [raw]
Subject: Re: [PATCH] firmware: Create directories for external firmware

2014-07-08 17:18 GMT+02:00 Ronald <[email protected]>:
> My full name is 'Ronald Uitermark'.
>
> I will try this patch tonight.
>
>
> 2014-07-08 14:47 GMT+02:00 Michal Marek <[email protected]>:
>
>> Commit 5180d5f4 ("firmware: Simplify directory creation") broke
>> including firmware specified in CONFIG_EXTRA_FIRMWARE:
>>
>> MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
>> /bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or
>> directory
>> ...
>> firmware/Makefile:185: recipe for target
>> 'firmware/amd-ucode/microcode_amd.bin.gen.S' failed
>>
>> It works with O= builds, because the directory is created by
>> Makefile.build. Create the directory in firmware/Makefile in non-O
>> builds.
>>
>> Reported-by: Ronald <[email protected]>
>> Reported-by: Torsten Kaiser <[email protected]>
>> Signed-off-by: Michal Marek <[email protected]>
>> ---
>>
>> Can you try this patch?
>>
>> Ronald, can you tell me your full name for the Reported-by: line?
>>
>> Thanks.
>> ---
>>
>> firmware/Makefile | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/firmware/Makefile b/firmware/Makefile
>> index 5747417..0862d34 100644
>> --- a/firmware/Makefile
>> +++ b/firmware/Makefile
>> @@ -219,6 +219,12 @@ $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep)
>> obj-y += $(patsubst %,%.gen.o,
>> $(fw-external-y))
>> obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o,
>> $(fw-shipped-y))
>>
>> +ifeq ($(KBUILD_SRC),)
>> +# Makefile.build only creates subdirectories for O= builds, but external
>> +# firmware might live outside the kernel source tree
>> +_dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))),
>> $(shell [ -d $(d) ] || mkdir -p $(d)))
>> +endif
>> +
>> # Remove .S files and binaries created from ihex
>> # (during 'make clean' .config isn't included so they're all in
>> $(fw-shipped-))
>> targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
>> --
>> 1.8.4.5
>>
>

(resend for flat text mode, sorry for the dupe which included top posting)

My full name is 'Ronald Uitermark'.

I will try this patch tonight.

2014-07-08 16:29:44

by Ronald

[permalink] [raw]
Subject: Re: [PATCH] firmware: Create directories for external firmware

>> 2014-07-08 14:47 GMT+02:00 Michal Marek <[email protected]>:
>>
>>> Commit 5180d5f4 ("firmware: Simplify directory creation") broke
>>> including firmware specified in CONFIG_EXTRA_FIRMWARE:
>>>
>>> MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
>>> /bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or
>>> directory
>>> ...
>>> firmware/Makefile:185: recipe for target
>>> 'firmware/amd-ucode/microcode_amd.bin.gen.S' failed
>>>
>>> It works with O= builds, because the directory is created by
>>> Makefile.build. Create the directory in firmware/Makefile in non-O
>>> builds.
>>>
>>> Reported-by: Ronald <[email protected]>
>>> Reported-by: Torsten Kaiser <[email protected]>
>>> Signed-off-by: Michal Marek <[email protected]>
>>> ---
>>>
>>> Can you try this patch?
>>>
>>> Ronald, can you tell me your full name for the Reported-by: line?
>>>
>>> Thanks.
>>> ---
>>>
>>> firmware/Makefile | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/firmware/Makefile b/firmware/Makefile
>>> index 5747417..0862d34 100644
>>> --- a/firmware/Makefile
>>> +++ b/firmware/Makefile
>>> @@ -219,6 +219,12 @@ $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep)
>>> obj-y += $(patsubst %,%.gen.o,
>>> $(fw-external-y))
>>> obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o,
>>> $(fw-shipped-y))
>>>
>>> +ifeq ($(KBUILD_SRC),)
>>> +# Makefile.build only creates subdirectories for O= builds, but external
>>> +# firmware might live outside the kernel source tree
>>> +_dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))),
>>> $(shell [ -d $(d) ] || mkdir -p $(d)))
>>> +endif
>>> +
>>> # Remove .S files and binaries created from ihex
>>> # (during 'make clean' .config isn't included so they're all in
>>> $(fw-shipped-))
>>> targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
>>> --
>>> 1.8.4.5

I can confirm that this patch on top of current HEAD fixes the issue.
Thanks a ton!

2014-07-08 18:03:05

by Torsten Kaiser

[permalink] [raw]
Subject: Re: [PATCH] firmware: Create directories for external firmware

On Tue, Jul 8, 2014 at 2:47 PM, Michal Marek <[email protected]> wrote:
> Commit 5180d5f4 ("firmware: Simplify directory creation") broke
> including firmware specified in CONFIG_EXTRA_FIRMWARE:
>
> MK_FW firmware/amd-ucode/microcode_amd.bin.gen.S
> /bin/sh: firmware/amd-ucode/microcode_amd.bin.gen.S: No such file or directory
> ...
> firmware/Makefile:185: recipe for target
> 'firmware/amd-ucode/microcode_amd.bin.gen.S' failed
>
> It works with O= builds, because the directory is created by
> Makefile.build. Create the directory in firmware/Makefile in non-O
> builds.
>
> Reported-by: Ronald <[email protected]>
> Reported-by: Torsten Kaiser <[email protected]>
> Signed-off-by: Michal Marek <[email protected]>
> ---
>
> Can you try this patch?

Works fine for me.

Thanks for the quick patch!

Torsten

> Ronald, can you tell me your full name for the Reported-by: line?
>
> Thanks.
> ---
>
> firmware/Makefile | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/firmware/Makefile b/firmware/Makefile
> index 5747417..0862d34 100644
> --- a/firmware/Makefile
> +++ b/firmware/Makefile
> @@ -219,6 +219,12 @@ $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep)
> obj-y += $(patsubst %,%.gen.o, $(fw-external-y))
> obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o, $(fw-shipped-y))
>
> +ifeq ($(KBUILD_SRC),)
> +# Makefile.build only creates subdirectories for O= builds, but external
> +# firmware might live outside the kernel source tree
> +_dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))), $(shell [ -d $(d) ] || mkdir -p $(d)))
> +endif
> +
> # Remove .S files and binaries created from ihex
> # (during 'make clean' .config isn't included so they're all in $(fw-shipped-))
> targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
> --
> 1.8.4.5
>