mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: olh@suse.de, Andrew Morton <akpm@osdl.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] Fix booting some PPC32 machines
Date: Mon, 3 May 2004 18:52:18 -0700	[thread overview]
Message-ID: <20040504015217.GB6254@smtp.west.cox.net> (raw)
In-Reply-To: <16534.58651.788709.350751@cargo.ozlabs.ibm.com>

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/

  reply	other threads:[~2004-05-04  1:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-03 18:09 Tom Rini
2004-05-04  0:34 ` Paul Mackerras
2004-05-04  1:52   ` Tom Rini [this message]
2004-05-04  7:06 ` Olaf Hering
2004-05-04 20:48   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040504015217.GB6254@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olh@suse.de \
    --cc=paulus@samba.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®