Re: [Bug #11355] Regression in 2.6.27-rc2 when cross-building the kernel

From

David Woodhouse <>

Date

Mon, 01 Sep 2008 10:35:20 +0100

On Sun, 2008-08-24 at 23:34 +0200, Rafael J. Wysocki wrote:> On Saturday, 23 of August 2008, Rafael J. Wysocki wrote:> > This message has been generated automatically as a part of a report> > of recent regressions.> > > > The following bug entry is on the current list of known regressions> > from 2.6.26. Please verify if it still should be listed and let me know> > (either way).> > > > > > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11355> > Subject : Regression in 2.6.27-rc2 when cross-building the kernel> > Submitter : Larry Finger <Larry.Finger@lwfinger.net>> > Date : 2008-08-16 2:38 (8 days old)> > References : http://marc.info/?l=linux-kernel&m=121885432118368&w=4> > As I wrote in the Bugzilla, I'm seeing a related problem.> > Namely, I build kernels on one box, with 'make O=<target>', then I mount> <target> on another one over NFS, 'cd' to it and try to install the kernel> modules with 'make modules_install'. This results in 'HOSTCC firmware/ihex2fw'> and 'fatal error: ...: Read-only file system'. It's readily reproducible.> > Commenting out line 1130 of Makefile> ("$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst")> obviously helps, so it looks like Makefile.fwinst needs fixing.

+# Don't depend on ihex2fw if we're installing and it already exists.+# Putting it after | in the dependencies doesn't seem sufficient when+# we're installing after a cross-compile, because ihex2fw has dependencies+# on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and +# thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree+# is exported read-only for someone to run 'make install'.+ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw)+ihex2fw_dep :=+else+ihex2fw_dep := $(obj)/ihex2fw+endif++ # .HEX is also Intel HEX, but where the offset and length in each record # is actually meaningful, because the firmware has to be loaded in a certain # order rather than as a single binary blob. Thus, we convert them into our # more compact binary representation of ihex records (<linux/ihex.h>)-$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)+$(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) $(call cmd,ihex2fw)