direct-io.hg

changeset 15485:bb02de55017b

[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@watson.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Sat Jun 02 22:01:45 2007 -0400 (2007-06-02)
parents 089696e0c603
children dca7528ef9f1
files xen/arch/powerpc/Makefile
line diff
     1.1 --- a/xen/arch/powerpc/Makefile	Thu May 17 11:42:46 2007 +0100
     1.2 +++ b/xen/arch/powerpc/Makefile	Sat Jun 02 22:01:45 2007 -0400
     1.3 @@ -63,12 +63,19 @@ CFLAGS += $(PPC_C_WARNINGS)
     1.4  # objects into a single ELF segment and to not link in any additional
     1.5  # objects that gcc would normally like to
     1.6  #
     1.7 -OMAGIC = -nodefaultlibs -nostartfiles
     1.8 +OMAGIC = -nodefaultlibs -nostartfiles -Wl,--omagic
     1.9  
    1.10  firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
    1.11  	$(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
    1.12  
    1.13 -firmware_image.bin: firmware
    1.14 +#
    1.15 +# Link firmware again but this time at the place we expect to load it.
    1.16 +# This makes debugging _way_ easier.
    1.17 +#
    1.18 +firmware.dbg: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
    1.19 +	$(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x2000000 $^ -o $@
    1.20 +
    1.21 +firmware_image.bin: firmware firmware.dbg
    1.22  	$(CROSS_COMPILE)objcopy --output-target=binary $< $@
    1.23  
    1.24  #
    1.25 @@ -139,5 +146,6 @@ dom0.bin: $(DOM0_IMAGE)
    1.26  
    1.27  clean::
    1.28  	$(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean
    1.29 -	rm -f firmware firmware_image.bin dom0.bin .xen-syms xen-syms.S \
    1.30 +	rm -f firmware firmware.dbg firmware_image.bin \
    1.31 +		dom0.bin .xen-syms xen-syms.S \
    1.32  		xen.lds asm-offsets.s cmdline.dep