Firmware breakage - Kernel

This is a discussion on Firmware breakage - 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 ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Firmware breakage

  1. Firmware breakage

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

  2. Re: Firmware breakage

    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


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: Firmware breakage

    On Tue, 22 Jul 2008 13:40:31 -0400
    David Woodhouse 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.



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: Firmware breakage

    On Tue, 2008-07-22 at 19:05 +0100, Alan Cox wrote:
    > On Tue, 22 Jul 2008 13:40:31 -0400
    > David Woodhouse 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

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: Firmware breakage

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

  6. Re: Firmware breakage

    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

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: Firmware breakage

    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


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: Firmware breakage

    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

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread