Skip to content

Commit

Permalink
firmware: Create directories for external firmware
Browse files Browse the repository at this point in the history
Commit 5180d5f ("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-and-tested-by: Ronald Uitermark <[email protected]>
Reported-and-tested-by: Torsten Kaiser <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
michal42 committed Jul 9, 2014
1 parent c79624c commit dd5a675
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/%,%, \
Expand Down

0 comments on commit dd5a675

Please sign in to comment.