Messages in this thread | | | Date | Mon, 3 May 2004 18:52:18 -0700 | From | Tom Rini <> | Subject | Re: [PATCH] Fix booting some PPC32 machines |
| |
On Tue, May 04, 2004 at 10:34:35AM +1000, Paul Mackerras wrote:
> Tom Rini writes: > > > Hello. The following patch fixes booting on some PPC32 machines with > > OpenFirmware, when booted without the aid of an additional bootloader. > > The problem is that the linker script for the 'zImage' type targets was > > put into the list of dependancies which objcopy would parse as a list of > > files to copy into the resulting image. The fix is to make the phony > > zImage targets depend on the linker script. > > I don't like this part of the fix: > > > $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ > > - $(LIBS) $(obj)/note $(boot)/ld.script > > + $(LIBS) $(obj)/note > > $(call cmd,gen-elf-pmac) > > because the linking process (gen-elf-pmac) really does depend on > ld.script. Since gen-elf-pmac uses $<, not $^, it should be OK with > the ld.script in the dependencies. Did you verify that there was a > problem with this rule or did you just rip out all of the ld.script > dependencies?
I did just remove all of the previous dependancies and place them on the zImage target (we don't mention that you can do 'make arch/ppc/boot/images/foo.image, and I don't know if that would work, so I don't think that'd be a problem).
> Similarly we need the ld.script dependency in here: > > > -$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) $(boot)/ld.script > > +$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) > > $(call cmd,gen-chrp) > > -$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) $(boot)/ld.script > > +$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) > > $(call cmd,gen-chrp) > > Here, gen-chrp does have a problem because it uses $^, but it looks to > me that with a minor change it could just use $< and avoid the > problem.
IIRC, changing to $< means we have to compilcate the rules a bit more, or thinking a bit harder, re-arrange the dependancies s.t. $(obj)/image*.o is first, and gen-chrp (and gen-pmac) both know to use $(CHRPOBJS) and $(LIBS).
-- Tom Rini http://gate.crashing.org/~trini/ - 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/
| |