mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Firmware breakage
@ 2008-07-22 16:34 Alan Cox
  2008-07-22 17:40 ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-07-22 16:34 UTC (permalink / raw)
  To: David Woodhouse, linux-kernel

If you crossbuild x86-32 on x86-64 and then attempt to do the install on
an x86-32 box the install now breaks. This used to work until the
firmware changes. Now you get

/bin/sh: scripts/basic/fixdep: cannot execute binary file

Fixdep should be built for the target platform surely ?

Alan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 16:34 Firmware breakage Alan Cox
@ 2008-07-22 17:40 ` David Woodhouse
  2008-07-22 18:05   ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2008-07-22 17:40 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, sam

On Tue, 2008-07-22 at 17:34 +0100, Alan Cox wrote:
> If you crossbuild x86-32 on x86-64 and then attempt to do the install on
> an x86-32 box the install now breaks. This used to work until the
> firmware changes. Now you get
> 
> /bin/sh: scripts/basic/fixdep: cannot execute binary file
> 
> Fixdep should be built for the target platform surely ?

Er, I haven't knowingly touched anything involving fixdep. Can you show
me exactly what you did? I'll try to reproduce and understand what's
happening.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 17:40 ` David Woodhouse
@ 2008-07-22 18:05   ` Alan Cox
  2008-07-22 18:31     ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-07-22 18:05 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel, sam

On Tue, 22 Jul 2008 13:40:31 -0400
David Woodhouse <dwmw2@infradead.org> wrote:

> On Tue, 2008-07-22 at 17:34 +0100, Alan Cox wrote:
> > If you crossbuild x86-32 on x86-64 and then attempt to do the install on
> > an x86-32 box the install now breaks. This used to work until the
> > firmware changes. Now you get
> > 
> > /bin/sh: scripts/basic/fixdep: cannot execute binary file
> > 
> > Fixdep should be built for the target platform surely ?
> 
> Er, I haven't knowingly touched anything involving fixdep. Can you show
> me exactly what you did? I'll try to reproduce and understand what's
> happening.

Build on a 64bit box with ARCH=i386
NFS mount on a 32bit box
make modules_install on 32bit box

It used to work nicely, as of the firmware changes it doesn't. Not sure
what the trigger is here yet.

If I hand rebuild fixdep as a 32bit binary the rest runs through fine.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 18:31     ` David Woodhouse
@ 2008-07-22 18:19       ` Alan Cox
  2008-07-22 18:43         ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-07-22 18:19 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel, sam

> I was planning to build the firmware binaries as part of 'make modules'
> anyway, because Rafael had related problems (not being able to write to
> the NFS-exported kernel tree at all).

Yes I just hit that problem too.

Alan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 18:05   ` Alan Cox
@ 2008-07-22 18:31     ` David Woodhouse
  2008-07-22 18:19       ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2008-07-22 18:31 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, sam

On Tue, 2008-07-22 at 19:05 +0100, Alan Cox wrote:
> On Tue, 22 Jul 2008 13:40:31 -0400
> David Woodhouse <dwmw2@infradead.org> wrote:
> 
> > On Tue, 2008-07-22 at 17:34 +0100, Alan Cox wrote:
> > > If you crossbuild x86-32 on x86-64 and then attempt to do the install on
> > > an x86-32 box the install now breaks. This used to work until the
> > > firmware changes. Now you get
> > > 
> > > /bin/sh: scripts/basic/fixdep: cannot execute binary file
> > > 
> > > Fixdep should be built for the target platform surely ?
> > 
> > Er, I haven't knowingly touched anything involving fixdep. Can you show
> > me exactly what you did? I'll try to reproduce and understand what's
> > happening.
> 
> Build on a 64bit box with ARCH=i386
> NFS mount on a 32bit box
> make modules_install on 32bit box
> 
> It used to work nicely, as of the firmware changes it doesn't. Not sure
> what the trigger is here yet.

Hm, I think it's because we're not building the firmware binaries until
modules_install time, and only _then_ do we want to build the ihex2fw
tool.

If you run 'make modules_install INSTALL_MOD_PATH=/tmp/foo' on the
x86_64 host first, does that fix it?

I was planning to build the firmware binaries as part of 'make modules'
anyway, because Rafael had related problems (not being able to write to
the NFS-exported kernel tree at all).

-- 
dwmw2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 18:19       ` Alan Cox
@ 2008-07-22 18:43         ` David Woodhouse
  2008-07-22 18:51           ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2008-07-22 18:43 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, sam, Rafael J. Wysocki

On Tue, 2008-07-22 at 19:19 +0100, Alan Cox wrote:
> > I was planning to build the firmware binaries as part of 'make modules'
> > anyway, because Rafael had related problems (not being able to write to
> > the NFS-exported kernel tree at all).
> 
> Yes I just hit that problem too.

I'm testing this now...

diff --git a/Makefile b/Makefile
index 6192922..3b43ddb 100644
--- a/Makefile
+++ b/Makefile
@@ -1061,6 +1061,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
 	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
 	@echo '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
 
 
 # Target to prepare building external modules
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index c972c0f..e1b3159 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -17,14 +17,15 @@ include $(srctree)/$(obj)/Makefile
 
 include scripts/Makefile.host
 
-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-m))
-
+mod-fw := $(fw-shipped-m)
 # If CONFIG_FIRMWARE_IN_KERNEL isn't set, then install the 
 # firmware for in-kernel drivers too.
 ifndef CONFIG_FIRMWARE_IN_KERNEL
-mod-fw += $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-y))
+mod-fw += $(fw-shipped-y)
 endif
 
+installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
+
 installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
 installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
 
@@ -49,7 +50,8 @@ PHONY +=  __fw_install __fw_modinst FORCE
 .PHONY: $(PHONY)
 
 __fw_install: $(installed-fw)
-__fw_modinst: $(mod-fw)
+__fw_modinst: $(installed-mod-fw)
+__fw_modbuild: $(mod-fw)
 
 FORCE:
 

-- 
dwmw2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 18:43         ` David Woodhouse
@ 2008-07-22 18:51           ` David Woodhouse
  2008-07-23 16:44             ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2008-07-22 18:51 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, sam, Rafael J. Wysocki

On Tue, 2008-07-22 at 14:43 -0400, David Woodhouse wrote:
> I'm testing this now...

This one stands a better chance of working. Does it work for both of
you?

diff --git a/Makefile b/Makefile
index 6192922..3b43ddb 100644
--- a/Makefile
+++ b/Makefile
@@ -1061,6 +1061,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
 	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
 	@echo '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
 
 
 # Target to prepare building external modules
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index c972c0f..f63a663 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -17,14 +17,15 @@ include $(srctree)/$(obj)/Makefile
 
 include scripts/Makefile.host
 
-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-m))
-
+mod-fw := $(fw-shipped-m)
 # If CONFIG_FIRMWARE_IN_KERNEL isn't set, then install the 
 # firmware for in-kernel drivers too.
 ifndef CONFIG_FIRMWARE_IN_KERNEL
-mod-fw += $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-y))
+mod-fw += $(fw-shipped-y)
 endif
 
+installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
+
 installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
 installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
 
@@ -49,7 +50,8 @@ PHONY +=  __fw_install __fw_modinst FORCE
 .PHONY: $(PHONY)
 
 __fw_install: $(installed-fw)
-__fw_modinst: $(mod-fw)
+__fw_modinst: $(installed-mod-fw)
+__fw_modbuild: $(addprefix $(obj)/,$(mod-fw))
 
 FORCE:
 

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firmware breakage
  2008-07-22 18:51           ` David Woodhouse
@ 2008-07-23 16:44             ` David Woodhouse
  0 siblings, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2008-07-23 16:44 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, sam, Rafael J. Wysocki

On Tue, 2008-07-22 at 14:51 -0400, David Woodhouse wrote:
> This one stands a better chance of working. Does it work for both of
> you?

If so, I'll sign off on it and send it to Linus...

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-23 16:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-22 16:34 Firmware breakage Alan Cox
2008-07-22 17:40 ` David Woodhouse
2008-07-22 18:05   ` Alan Cox
2008-07-22 18:31     ` David Woodhouse
2008-07-22 18:19       ` Alan Cox
2008-07-22 18:43         ` David Woodhouse
2008-07-22 18:51           ` David Woodhouse
2008-07-23 16:44             ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®