[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Build firmware as single section and also build a debuggable image.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.