From b45b3d7dcbed3d636d85cff7657e19419f388de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 23 Jun 2008 13:32:28 +0000 Subject: [PATCH] - move prg ldscript where it belongs. - added rule for boot .prg, no need to do it by hand :) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26099 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/atari_m68k/Jamfile | 40 +++++++++++++++++++ src/system/boot/platform/atari_m68k/shell.S | 4 +- .../m68k/boot_prg_atari_m68k.ld} | 0 3 files changed, 42 insertions(+), 2 deletions(-) rename src/system/{boot/platform/atari_m68k/prg.ld => ldscripts/m68k/boot_prg_atari_m68k.ld} (100%) diff --git a/src/system/boot/platform/atari_m68k/Jamfile b/src/system/boot/platform/atari_m68k/Jamfile index 3bb4b895bc..a1e33aa7a9 100644 --- a/src/system/boot/platform/atari_m68k/Jamfile +++ b/src/system/boot/platform/atari_m68k/Jamfile @@ -59,6 +59,46 @@ KernelMergeObject boot_platform_atari_m68k.o : boot_platform_atari_m68k_other.o ; +# AUTO folder PRG target + +# based on KernelLd +rule AtariBootPrgLd +{ + # AtariBootPrgLd : : : ; + + LINK on $(1) = $(TARGET_LD) ; + + LINKFLAGS on $(1) = $(4) ; + if $(3) { LINKFLAGS on $(1) += --script=$(3) ; } + + # Remove any preset LINKLIBS + LINKLIBS on $(1) = ; + + # TODO: Do we really want to invoke SetupKernel here? The objects should + # have been compiled with KernelObjects anyway, so we're doing that twice. + SetupKernel $(2) ; + + # Show that we depend on the libraries we need + LocalClean clean : $(1) ; + LocalDepends all : $(1) ; + Depends $(1) : $(2) ; + + MakeLocateDebug $(1) ; + +} + +actions AtariBootPrgLd +{ + $(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ; +} + +AtariBootPrgLd haiku.prg : + boot_loader_$(TARGET_BOOT_PLATFORM) + : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_prg_$(TARGET_BOOT_PLATFORM).ld + : -Bstatic +; + + SEARCH on [ FGristFiles text_menu.cpp ] = [ FDirName $(HAIKU_TOP) src system boot platform generic ] ; diff --git a/src/system/boot/platform/atari_m68k/shell.S b/src/system/boot/platform/atari_m68k/shell.S index d809fcce90..be3b861e4a 100644 --- a/src/system/boot/platform/atari_m68k/shell.S +++ b/src/system/boot/platform/atari_m68k/shell.S @@ -25,7 +25,7 @@ * dd if=generated/objects/haiku/m68k/release/system/boot/zbeos of=~/floppy.img bs=512 count=20 conv=notrunc * src/system/boot/platform/atari_m68k/fixup_tos_floppy_chksum ~/floppy.img * generate .prg: - * generated.m68k/cross-tools/bin/m68k-unknown-haiku-ld -o haiku.prg -T src/system/boot/platform/atari_m68k/prg.ld generated/objects/haiku/m68k/release/system/boot/boot_loader_atari_m68k + * generated.m68k/cross-tools/bin/m68k-unknown-haiku-ld -o haiku.prg -T src/system/ldscripts/m68k/boot_prg_atari_m68k.ld generated/objects/haiku/m68k/release/system/boot/boot_loader_atari_m68k */ #include "atari_memory_map.h" @@ -248,7 +248,7 @@ nextsect: copysect_loop: move.l (%a0)+,(%a1)+ dbf %d1,copysect_loop - bsr putx + //bsr putx dbf %d0,nextsect lea msg_j1,%a0 diff --git a/src/system/boot/platform/atari_m68k/prg.ld b/src/system/ldscripts/m68k/boot_prg_atari_m68k.ld similarity index 100% rename from src/system/boot/platform/atari_m68k/prg.ld rename to src/system/ldscripts/m68k/boot_prg_atari_m68k.ld