WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Build firmware as single s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][XEN] Build firmware as single section and also build a debuggable image.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jul 2007 04:20:07 -0700
Delivery-date: Mon, 09 Jul 2007 04:18:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Date 1180836105 14400
# Node ID bb02de55017ba1f9eb255330c1f75c15c99f467f
# Parent  089696e0c60379e2bb9cfcc988d35aa1bdc261de
[POWERPC][XEN] Build firmware as single section and also build a debuggable 
image.

- Uses --omagic to make sure that firmware is a singel image
- Link and extra firmware image that is starts where we expect to
  load, this allows gdb to work on the image.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/powerpc/Makefile |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff -r 089696e0c603 -r bb02de55017b xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Thu May 17 11:42:46 2007 +0100
+++ b/xen/arch/powerpc/Makefile Sat Jun 02 22:01:45 2007 -0400
@@ -63,12 +63,19 @@ CFLAGS += $(PPC_C_WARNINGS)
 # objects into a single ELF segment and to not link in any additional
 # objects that gcc would normally like to
 #
-OMAGIC = -nodefaultlibs -nostartfiles
+OMAGIC = -nodefaultlibs -nostartfiles -Wl,--omagic
 
 firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
        $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
 
-firmware_image.bin: firmware
+#
+# Link firmware again but this time at the place we expect to load it.
+# This makes debugging _way_ easier.
+#
+firmware.dbg: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
+       $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x2000000 $^ -o $@
+
+firmware_image.bin: firmware firmware.dbg
        $(CROSS_COMPILE)objcopy --output-target=binary $< $@
 
 #
@@ -139,5 +146,6 @@ dom0.bin: $(DOM0_IMAGE)
 
 clean::
        $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean
-       rm -f firmware firmware_image.bin dom0.bin .xen-syms xen-syms.S \
+       rm -f firmware firmware.dbg firmware_image.bin \
+               dom0.bin .xen-syms xen-syms.S \
                xen.lds asm-offsets.s cmdline.dep

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [POWERPC][XEN] Build firmware as single section and also build a debuggable image., Xen patchbot-unstable <=