Messages in this thread Patch in this message |  | | | Date | Tue, 4 May 2004 22:01:22 +1000 | | From | Paul Mackerras <> | | Subject | [PATCH][PPC32] Updated boot fix |
| |
This patch fixes booting on some PPC32 machines, notably CHRP and powermac machines. This is a modified version of Tom Rini's patch that addresses the concerns I had with it.
The problem was that the linker script was getting included in the list of things that got put together to make some of the sorts of bootable images that we produce. This removes ld.script in cases where it wasn't appropriate and changes the rules in others so that although we have the dependency on ld.script, it doesn't get included in the list of things to link.
Please apply.
Thanks, Paul.
diff -urN linux-2.5/arch/ppc/boot/openfirmware/Makefile pmac-2.5/arch/ppc/boot/openfirmware/Makefile --- linux-2.5/arch/ppc/boot/openfirmware/Makefile 2004-04-28 07:31:34.000000000 +1000 +++ pmac-2.5/arch/ppc/boot/openfirmware/Makefile 2004-05-04 13:46:36.000000000 +1000 @@ -89,13 +89,14 @@ $(call if_changed_dep,as_o_S) quiet_cmd_gencoffb = COFF $@ - cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(filter-out FORCE,$^) && \ + cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \ $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) targets += coffboot -$(obj)/coffboot: $(COFFOBJS) $(obj)/image.o $(LIBS) FORCE +$(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(boot)/ld.script FORCE $(call if_changed,gencoffb) targets += coffboot.initrd -$(obj)/coffboot.initrd: $(COFFOBJS) $(obj)/image.initrd.o $(LIBS) FORCE +$(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \ + $(boot)/ld.script FORCE $(call if_changed,gencoffb) @@ -104,10 +105,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 +117,21 @@ $(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 $(boot)/ld.script $(call cmd,gen-elf-pmac) $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ $(LIBS) $(obj)/note $(boot)/ld.script $(call cmd,gen-elf-pmac) quiet_cmd_gen-chrp = CHRP $@ - cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $^ && \ + cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) -$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) $(boot)/ld.script +$(images)/zImage.chrp: $(obj)/image.o $(CHRPOBJS) $(LIBS) $(boot)/ld.script $(call cmd,gen-chrp) -$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) $(boot)/ld.script +$(images)/zImage.initrd.chrp: $(obj)/image.initrd.o $(CHRPOBJS) $(LIBS) \ + $(boot)/ld.script $(call cmd,gen-chrp) quiet_cmd_addnote = ADDNOTE $@ - 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/
|  |