public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix booting some PPC32 machines
@ 2004-05-03 18:09 Tom Rini
  2004-05-04  0:34 ` Paul Mackerras
  2004-05-04  7:06 ` Olaf Hering
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Rini @ 2004-05-03 18:09 UTC (permalink / raw)
  To: Paul Mackerras, olh, Andrew Morton, Kernel Mailing List,
	Linus Torvalds

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-04 20:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-03 18:09 [PATCH] Fix booting some PPC32 machines Tom Rini
2004-05-04  0:34 ` Paul Mackerras
2004-05-04  1:52   ` Tom Rini
2004-05-04  7:06 ` Olaf Hering
2004-05-04 20:48   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox