* Re: make -j12 all fails in uImage target
2005-02-06 22:53 ` Sam Ravnborg
@ 2005-02-06 23:43 ` Benjamin Herrenschmidt
2005-02-07 5:39 ` Sam Ravnborg
2005-02-06 23:50 ` Tom Rini
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2005-02-06 23:43 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Tom Rini, Olaf Hering, linuxppc-dev list
On Sun, 2005-02-06 at 23:53 +0100, Sam Ravnborg wrote:
> The problem is that the images/ sub directory is visited before the
> prerequisites are finished.
> I have no good way to debug this - I can see it based on the Makefile and
> the output Olaf included.
>
> Also the problem Olaf describe is just a cp of a half finished file.
We had a similar problem with paul recently where the build worked but
the resulting zImage contained a corrupted file as the
objcopy/gzip/whatever wasn't fully finished when the zImage file got
linked.
>
> So the fix is to let the images/ directory depends on the rest of the
> directories.
>
> Something like this may do the trick:
We should maybe also have an explicit dependency on vmlinux no ? Or is
this handled already for the boot dir as a whole ?
> $(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
> $(Q)$(MAKE) $(build)=$@
>
> And then delete the assignment of images to subdir-y
>
>
> Another solution would be to get rid on the images/ drectory and place
> outputfiles where they are being built.
>
> Sam
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: make -j12 all fails in uImage target
2005-02-06 22:53 ` Sam Ravnborg
2005-02-06 23:43 ` Benjamin Herrenschmidt
@ 2005-02-06 23:50 ` Tom Rini
2005-02-07 8:29 ` Olaf Hering
2005-05-25 21:34 ` Olaf Hering
3 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2005-02-06 23:50 UTC (permalink / raw)
To: Olaf Hering, linuxppc-dev, Sam Ravnborg
On Sun, Feb 06, 2005 at 11:53:23PM +0100, Sam Ravnborg wrote:
> On Sun, Feb 06, 2005 at 02:51:31PM -0700, Tom Rini wrote:
> > On Sun, Feb 06, 2005 at 01:40:14PM +0100, Olaf Hering wrote:
> > >
> > > this is what I got with 2.6.11rc3:
> > >
> > > make ARCH=ppc O=../O-2.6.11-rc3-b50-SMP -j12 all
> > > ...
> > > LD vmlinux
> > > SYSMAP System.map
> > > SYSMAP .tmp_System.map
> > > OBJCOPY arch/ppc/boot/images/vmlinux.bin
> > > HOSTCC arch/ppc/boot/utils/addnote
> > > HOSTCC arch/ppc/boot/utils/mknote
> > > HOSTCC arch/ppc/boot/utils/mkprep
> > > LD arch/ppc/boot/lib/built-in.o
> > > HOSTCC arch/ppc/boot/utils/hack-coff
> > > HOSTCC arch/ppc/boot/utils/mkbugboot
> > > OBJCOPY arch/ppc/boot/images/vmlinux.bin
> > > GZIP arch/ppc/boot/images/vmlinux.gz
> > > /bin/sh: line 1: arch/ppc/boot/images/vmlinux.bin: No such file or directory
> > > make[2]: *** [arch/ppc/boot/images/vmlinux.gz] Error 1
> > > make[1]: *** [uImage] Error 2
> > > make[1]: *** Waiting for unfinished jobs....
> > >
> > > also, one time that zImage.chrp was only 570K instead of the expected
> > > 1.4M, so netboot failed. But I got no build error.
> > > Any idea what dependency is missing?
> >
> > That is kinda odd. My thought is that arch/ppc/boot/ just isn't fully
> > safe for -j'ing. Sam, any ideas on how to debug this kinda problem?
>
> The problem is that the images/ sub directory is visited before the
> prerequisites are finished.
> I have no good way to debug this - I can see it based on the Makefile and
> the output Olaf included.
>
> Also the problem Olaf describe is just a cp of a half finished file.
>
>
> So the fix is to let the images/ directory depends on the rest of the
> directories.
>
> Something like this may do the trick:
>
> $(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
> $(Q)$(MAKE) $(build)=$@
>
> And then delete the assignment of images to subdir-y
>
>
> Another solution would be to get rid on the images/ drectory and place
> outputfiles where they are being built.
Hopefully the first works, since I really do like having all the various
images we create end up in one spot. :)
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: make -j12 all fails in uImage target
2005-02-06 22:53 ` Sam Ravnborg
2005-02-06 23:43 ` Benjamin Herrenschmidt
2005-02-06 23:50 ` Tom Rini
@ 2005-02-07 8:29 ` Olaf Hering
2005-02-16 15:54 ` Tom Rini
2005-05-25 21:34 ` Olaf Hering
3 siblings, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2005-02-07 8:29 UTC (permalink / raw)
To: Tom Rini, linuxppc-dev, Sam Ravnborg
On Sun, Feb 06, Sam Ravnborg wrote:
> Something like this may do the trick:
>
> $(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
> $(Q)$(MAKE) $(build)=$@
>
> And then delete the assignment of images to subdir-y
That still doesnt work right, I touched one .c file which lead to a new
vmlinux, now zImage.rs6k is too small:
diff -purNx tags ../linux-2.6.11-rc3.orig/arch/ppc/boot/Makefile ./arch/ppc/boot/Makefile
--- ../linux-2.6.11-rc3.orig/arch/ppc/boot/Makefile 2005-02-03 02:56:10.000000000 +0100
+++ ./arch/ppc/boot/Makefile 2005-02-07 09:24:38.713179331 +0100
@@ -17,8 +17,10 @@ BOOT_TARGETS = zImage zImage.initrd znet
bootdir-y := simple
bootdir-$(CONFIG_PPC_OF) += openfirmware
-subdir-y := lib common images
+subdir-y := lib common
subdir-$(CONFIG_PPC_OF) += of1275
+$(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
+ $(Q)$(MAKE) $(build)=$@
# for cleaning
subdir- += simple openfirmware
CHK include/linux/version.h
make[2]: `arch/ppc/kernel/asm-offsets.s' is up to date.
CHK include/asm-ppc/offsets.h
CHK usr/initramfs_list
CHK include/linux/compile.h
CC arch/ppc/platforms/chrp_nvram.o
LD arch/ppc/platforms/built-in.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/ppc/boot/images/vmlinux.bin
GZIP arch/ppc/boot/images/vmlinux.gz
AS arch/ppc/boot/simple/head.o
AS arch/ppc/boot/simple/relocate.o
CC arch/ppc/boot/simple/prepmap.o
GEN arch/ppc/boot/openfirmware/image.o
CC arch/ppc/boot/simple/misc.o
GEN arch/ppc/boot/images/miboot.image
COFF arch/ppc/boot/openfirmware/coffboot
ELF arch/ppc/boot/images/vmlinux.elf-pmac
CHRP arch/ppc/boot/images/zImage.chrp
CC arch/ppc/boot/simple/misc-prep.o
CC arch/ppc/boot/simple/mpc10x_memory.o
COFF arch/ppc/boot/images/vmlinux.coff
ADDNOTE arch/ppc/boot/images/zImage.chrp-rs6k
kernel: zImage is ready (arch/ppc/boot/images/vmlinux.coff)
...
../O-2.6.11-rc3-b50/arch/ppc/boot/images/:
total 6.2M
drwxr-xr-x 2 olaf users 496 2005-02-07 09:26 ./
drwxr-xr-x 9 olaf users 224 2005-02-07 09:25 ../
-rw-r--r-- 1 olaf users 256 2005-02-07 09:26 .uImage.cmd
-rw-r--r-- 1 olaf users 100 2005-02-07 09:26 .vmlinux.bin.cmd
-rw-r--r-- 1 olaf users 119 2005-02-07 09:26 .vmlinux.gz.cmd
-rw-r--r-- 1 olaf users 49K 2005-02-07 09:26 miboot.image
-rwxr-xr-x 1 olaf users 2.8M 2005-02-07 09:26 vmlinux.bin*
-rwxr-xr-x 1 olaf users 79K 2005-02-07 09:26 vmlinux.coff*
-rwxr-xr-x 1 olaf users 146K 2005-02-07 09:26 vmlinux.elf-pmac*
-rw-r--r-- 1 olaf users 1.3M 2005-02-07 09:26 vmlinux.gz
-rwxr-xr-x 1 olaf users 575K 2005-02-07 09:26 zImage.bugboot*
-rwxr-xr-x 1 olaf users 146K 2005-02-07 09:26 zImage.chrp*
-rw-r--r-- 1 olaf users 146K 2005-02-07 09:26 zImage.chrp-rs6k
-rwxr-xr-x 1 olaf users 639K 2005-02-07 09:26 zImage.elf*
lrwxrwxrwx 1 olaf users 12 2005-02-07 09:26 zImage.pmac -> vmlinux.coff*
-rwxr-xr-x 1 olaf users 576K 2005-02-07 09:26 zImage.prep*
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: make -j12 all fails in uImage target
2005-02-07 8:29 ` Olaf Hering
@ 2005-02-16 15:54 ` Tom Rini
0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2005-02-16 15:54 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Sam Ravnborg
On Mon, Feb 07, 2005 at 09:29:48AM +0100, Olaf Hering wrote:
> On Sun, Feb 06, Sam Ravnborg wrote:
>
> > Something like this may do the trick:
> >
> > $(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
> > $(Q)$(MAKE) $(build)=$@
> >
> > And then delete the assignment of images to subdir-y
>
> That still doesnt work right, I touched one .c file which lead to a new
> vmlinux, now zImage.rs6k is too small:
Is it possible that the dependency is being met by the file being there,
but not done? If so, would perhaps depending on System.map as well for
vmlinux.bin fix the problem?
This doesn't make sense to me, but taking a quick look over things,
zImage.chrp (/etc) do have dependncies on vmlinux.gz which has deps on
vmlinux.bin, which deps on vmlinux.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: make -j12 all fails in uImage target
2005-02-06 22:53 ` Sam Ravnborg
` (2 preceding siblings ...)
2005-02-07 8:29 ` Olaf Hering
@ 2005-05-25 21:34 ` Olaf Hering
3 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2005-05-25 21:34 UTC (permalink / raw)
To: Tom Rini, linuxppc-dev, Sam Ravnborg
On Sun, Feb 06, Sam Ravnborg wrote:
> On Sun, Feb 06, 2005 at 02:51:31PM -0700, Tom Rini wrote:
> > On Sun, Feb 06, 2005 at 01:40:14PM +0100, Olaf Hering wrote:
> > > GZIP arch/ppc/boot/images/vmlinux.gz
> > > /bin/sh: line 1: arch/ppc/boot/images/vmlinux.bin: No such file or directory
> > > make[2]: *** [arch/ppc/boot/images/vmlinux.gz] Error 1
> > > make[1]: *** [uImage] Error 2
> > > make[1]: *** Waiting for unfinished jobs....
> > >
> > > also, one time that zImage.chrp was only 570K instead of the expected
> > > 1.4M, so netboot failed. But I got no build error.
> > > Any idea what dependency is missing?
> >
> > That is kinda odd. My thought is that arch/ppc/boot/ just isn't fully
> > safe for -j'ing. Sam, any ideas on how to debug this kinda problem?
>
> The problem is that the images/ sub directory is visited before the
> prerequisites are finished.
> I have no good way to debug this - I can see it based on the Makefile and
> the output Olaf included.
>
> Also the problem Olaf describe is just a cp of a half finished file.
>
>
> So the fix is to let the images/ directory depends on the rest of the
> directories.
>
> Something like this may do the trick:
>
> $(obj)/images: $(addprefix $(obj)/,$(subdir-y) $(bootdir-y))
> $(Q)$(MAKE) $(build)=$@
>
> And then delete the assignment of images to subdir-y
>
>
> Another solution would be to get rid on the images/ drectory and place
> outputfiles where they are being built.
I did it this way:
...
AS arch/ppc/boot/common/util.o
CC arch/ppc/boot/of1275/write.o
AR arch/ppc/boot/common/lib.a
AR arch/ppc/boot/of1275/lib.a
`arch/ppc/boot/images/vmlinux.gz.27631' -> `arch/ppc/boot/images/vmlinux.gz'
AR arch/ppc/boot/lib/lib.a
UIMAGE arch/ppc/boot/images/uImage
"mkimage" command not found - U-Boot images will not be built
Image: arch/ppc/boot/images/uImage not made
`arch/ppc/boot/images/vmlinux.gz.27676' -> `arch/ppc/boot/images/vmlinux.gz'
CC arch/ppc/boot/openfirmware/dummy.o
AS arch/ppc/boot/simple/head.o
AS arch/ppc/boot/simple/relocate.o
...
Index: linux-2.6.12-rc5-olh/scripts/Makefile.lib
===================================================================
--- linux-2.6.12-rc5-olh.orig/scripts/Makefile.lib
+++ linux-2.6.12-rc5-olh/scripts/Makefile.lib
@@ -1,3 +1,4 @@
+# vim: syntax=sh
# ===========================================================================
# kbuild: Generic definitions
# ===========================================================================
@@ -177,7 +178,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS)
# ---------------------------------------------------------------------------
quiet_cmd_gzip = GZIP $@
-cmd_gzip = gzip -f -9 < $< > $@
+cmd_gzip = gzip -f -9 < $< > $@.$$$$ ; mv -v $@.$$$$ $@
# ===========================================================================
# Generic stuff
^ permalink raw reply [flat|nested] 12+ messages in thread