From: Tom Rini <trini@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>,
olh@suse.de, Andrew Morton <akpm@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] Fix booting some PPC32 machines
Date: Mon, 3 May 2004 11:09:45 -0700 [thread overview]
Message-ID: <20040503180945.GL26773@smtp.west.cox.net> (raw)
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.
===== arch/ppc/boot/openfirmware/Makefile 1.22 vs edited =====
--- 1.22/arch/ppc/boot/openfirmware/Makefile Thu Apr 1 08:16:57 2004
+++ edited/arch/ppc/boot/openfirmware/Makefile Mon May 3 10:24:35 2004
@@ -104,10 +104,10 @@
$(HACKCOFF) $@ && \
ln -sf $(notdir $@) $(images)/zImage$(initrd).pmac
-$(images)/vmlinux.coff: $(obj)/coffboot $(boot)/ld.script
+$(images)/vmlinux.coff: $(obj)/coffboot
$(call cmd,gen-coff)
-$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd $(boot)/ld.script
+$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd
$(call cmd,gen-coff)
quiet_cmd_gen-elf-pmac = ELF $@
@@ -116,19 +116,19 @@
$(OBJCOPY) $@ $@ --add-section=.note=$(obj)/note \
-R .comment $(del-ramdisk-sec)
-$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) $(obj)/note $(boot)/ld.script
+$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) $(obj)/note
$(call cmd,gen-elf-pmac)
$(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \
- $(LIBS) $(obj)/note $(boot)/ld.script
+ $(LIBS) $(obj)/note
$(call cmd,gen-elf-pmac)
quiet_cmd_gen-chrp = CHRP $@
cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $^ && \
$(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec)
-$(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)
quiet_cmd_addnote = ADDNOTE $@
@@ -153,13 +153,15 @@
$(images)/vmlinux.elf-pmac \
$(images)/zImage.chrp \
$(images)/zImage.chrp-rs6k \
- $(images)/miboot.image
+ $(images)/miboot.image \
+ $(boot)/ld.script
@echo ' kernel: $@ is ready ($<)'
zImage.initrd: $(images)/vmlinux.initrd.coff \
$(images)/vmlinux.initrd.elf-pmac \
$(images)/zImage.initrd.chrp \
$(images)/zImage.initrd.chrp-rs6k \
- $(images)/miboot.initrd.image
+ $(images)/miboot.initrd.image \
+ $(boot)/ld.script
@echo ' kernel: $@ is ready ($<)'
TFTPIMAGE := /tftpboot/zImage
--
Tom Rini
http://gate.crashing.org/~trini/
next reply other threads:[~2004-05-03 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-03 18:09 Tom Rini [this message]
2004-05-04 0:34 ` [PATCH] Fix booting some PPC32 machines Paul Mackerras
2004-05-04 1:52 ` Tom Rini
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=20040503180945.GL26773@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