[U-Boot] Debugging into the kernel from u-boot

Hi all-
I - more or less - successfully got U-Boot up and running on our custom designed board.
U-Boot leaves its premices in boot_jump_linux and this is the last I see on the console:
## Booting kernel from Legacy Image at 02000000 ... Image Name: Linux-2.6.29.6-rt23 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1830522 Bytes = 1.7 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 00400000 Booting using the fdt blob at 0x400000 Uncompressing Kernel Image ... OK ## Transferring control to Linux (at address 00000000)... Booting using OF flat tree...
When I halt the board using the BDI3000 debugger, I find the PC somewhere in 0xc000c96c in __delay. Accessing 0xc000.... makes no sense, as we don't even have mapped memory there.
Using HW breakpoints I can see the single instructions from 0x0 on, but I get no link to the source.
Where can I get a meaningful starting point in the kernel?
Why are all the symbols in vmlinux located at 0xc0... and how does the relocation take place? I saw some comment in arch/powerpc/kernel/setup_32.c but yet I have no clue where to start practically?
Any help would be appreciated!
Have a nice weekend! Matthias

Hi Matthias,
On Friday 30 April 2010 14:55:42 Dunda, Matthias wrote:
I - more or less - successfully got U-Boot up and running on our custom designed board.
U-Boot leaves its premices in boot_jump_linux and this is the last I see on the console:
## Booting kernel from Legacy Image at 02000000 ... Image Name: Linux-2.6.29.6-rt23 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1830522 Bytes = 1.7 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 00400000 Booting using the fdt blob at 0x400000 Uncompressing Kernel Image ... OK ## Transferring control to Linux (at address 00000000)... Booting using OF flat tree...
When I halt the board using the BDI3000 debugger, I find the PC somewhere in 0xc000c96c in __delay. Accessing 0xc000.... makes no sense, as we don't even have mapped memory there.
This address makes perfect sense. Linux maps physical address 0 to virtual address 0xc000000 on PowerPC.
Using HW breakpoints I can see the single instructions from 0x0 on, but I get no link to the source.
Where can I get a meaningful starting point in the kernel?
You have all the equipment you need. Use the BDI3000 to debug the Linux kernel.
Why are all the symbols in vmlinux located at 0xc0...
See above.
and how does the relocation take place? I saw some comment in arch/powerpc/kernel/setup_32.c but yet I have no clue where to start practically?
Any help would be appreciated!
I suggest you take a look at this link as well:
http://www.denx.de/wiki/view/DULG/LinuxPostMortemAnalysis
Hope this helps.
Cheers, Stefan
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
participants (2)
-
Dunda, Matthias
-
Stefan Roese