Skip to contentSkip to conversation

firmware build: Fix build failure when using CONFIG_EXTRA_FIRMWARE with seperate output dir.

PATCH New Martin Fuzzey 1 participant 1 message Dec 21, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware build: Fix build failure when using CONFIG_EXTRA_FIRMWARE with seperate output dir.

When building with a seperate output directory (O=) and
CONFIG_EXTRA_FIRMWARE the build failed with
firmware/3com/typhoon.bin.gen.S: Assembler messages:
firmware/3com/typhoon.bin.gen.S:5: Error: file not found: /home/linux_src/firmware/3com/typhoon.bin

Because the generated binary is in the $(objdir) but the generated .S file tries to reference it in the $(srcdir)

---
 firmware/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
firmware/Makefile +1 -1
index eeb1403..a47e499 100644
@@ -5,7 +5,7 @@
 # Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a
 # leading /, it's relative to $(srctree).
 fwdir := $(subst ",,$(CONFIG_EXTRA_FIRMWARE_DIR))
-fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))
+fwabs := $(addprefix $(objtree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))
 
 fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE))