Hello All,
I am new to debugging linux kernel. I have an mpc8540 based board with BDI2000. Now I am trying to debug Linux kernel.u-boot is the bootloader.The steps I followed listed below.The problem I am facing is
when I put break point at start_kernel address got from System.map, use bootm with address where the uncompressed kernel downloaded
(bootm 0x200000, here I am not using the ramdisk) , booting the kernel is not stopping. I mean it should stop at start_kernel function as I put break point using BDI.Instead it is booting and trying to mount file system and kernel panic is coming.
Could any one help in this regard
Regards
Jhoney.
/*********These steps were taken from the manual ******************/
1.) Connect the BDI2000 to the Target
2.) Power up the BDI2000 first and start a telnet session, let it load the config file, when it says waiting for
target VCC
3.) Power up the Target
4.) At this point the default behavior is Reset Halt, which means the target will not be running. Put ?i? at
the BDI prompt, to make sure the target is not running then
5.) Type in "go" at the BDI prompt and watch your target boot up thru its serial monitor.
6.) If you use UBOOT to load the Linux Kernel then do so now, other wise skip this step. Load the
smaller vmlinux (without the ?-g? option) into PPCBoot/UBoot using the TFTP command but do not
start booting Linux.
7.) Type in "halt" at the BDI prompt and set the Breakpoint at start_kernel using ?bi?.
8.) If you haven?t loaded the Linux kernel thru UBOOT, then you can load it now using the ?load?
command from the BDI, otherwise skip this step.
9.) Issue a "go" to give control back to the target.
10.) If you loaded Linux from the BDI Linux is already booting up on your target otherwise you now have
control back on PPCBoot/UBoot, use bootm and boot up Linux.
11.) After a few seconds the BDI prompt should read "target has entered debug mode", enter "i" at the BDI
prompt and confirm that you have stopped at start_kernel. Use ?ci? and clear the breakpoint.
12.) Use a few "ti" commands from the BDI prompt to confirm that you can step thru the target, the BDI
prompt will tell you that it is stepping.
13.) On the host platform, start GDB with the larger vmlinux file that has symbols (the ??g? option added
to the make file) and connect to the target using ?target remote?, perform a few steps using "stepi" in
the GDB prompt, you should see a step occur in the BDI Prompt. Also perform a "list" command in
the GDB prompt and make sure GDB knows where it is.
14.) Finally, set your own break points in GDB and see if it the BDI2000 hits the breakpoints.