Skip to contentSkip to conversation

PPC64 debugging symbols for boot wrapper

PATCH In review Paul Mackerras 2 participants 2 messages Mar 14, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PPC64 debugging symbols for boot wrapper

This patch is from Amos Waterland <[email protected]>.

It is really useful when debugging early boot on simulator to have debug symbols in the 32-bit code that uncompresses the kernel proper.

arch/ppc64/boot/Makefile +5 -0
diff -urN linux-2.5/arch/ppc64/boot/Makefile test/arch/ppc64/boot/Makefile
@@ -27,6 +27,11 @@
 BOOTLFLAGS	:= -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds
 OBJCOPYFLAGS    := contents,alloc,load,readonly,data
 
+ifdef CONFIG_DEBUG_INFO
+BOOTCFLAGS		+= -g
+BOOTAFLAGS		+= -g
+endif
+
 src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c div64.S
 src-boot := $(addprefix $(obj)/, $(src-boot))
 obj-boot := $(addsuffix .o, $(basename $(src-boot)))
#1 lore raw
Quoted 11 lines · Paul Mackerras

This patch is from Amos Waterland <[email protected]>.

It is really useful when debugging early boot on simulator to have debug symbols in the 32-bit code that uncompresses the kernel proper.

diff -urN linux-2.5/arch/ppc64/boot/Makefile test/arch/ppc64/boot/Makefile

arch/ppc64/boot/Makefile line 33

Quoted 7 lines
arch/ppc64/boot/Makefile +4 -0
@@ -27,6 +27,11 @@
 BOOTLFLAGS	:= -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds
 OBJCOPYFLAGS    := contents,alloc,load,readonly,data
 
+ifdef CONFIG_DEBUG_INFO
+BOOTCFLAGS		+= -g
+BOOTAFLAGS		+= -g
+endif

Please change it to use:
bootflags-y := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds bootflags-$(CONFIG_DEBUG_INFO) += -g

And same for BOOTAFLAGS.

Sam