All of lore.kernel.org
 help / color / mirror / Atom feed
* regarding kgdb in ppc
@ 2006-11-28 16:20 Anumolu Sudheer
  2006-11-30  4:33 ` Anumolu Sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Anumolu Sudheer @ 2006-11-28 16:20 UTC (permalink / raw)
  To: kernelnewbies; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 7241 bytes --]

Hello All
I am in process of learning kgdb and facing some problem with gdbserver. I
am not able to "configure and make"   the gdbserver .  Sorry fot the long
mail.

Did anyone tried to compile the KGDB with this powerpc-eabi ?? Please
help me in solving this.

Setup datails are below..
Host:  x86,  RHEL-2.6.9-34.EL
Target Linux- 2.6.16.2
Target Processor: AMCC440SPe
The kgdb version : linux-2.6.15.5-kgdb-2.4
GDB  version gdb-6.4-kgdb-2.4.tar.bz2
CrossCompiler - powerpc-eabi

I applied the patch to the kernel and cross compiled it.(modified to solve
the compilation errors  as is not supported readymade).

I used the steps given in "http://www.kegel.com/linux/gdbserver.txt " to
build the gdb.

I compiled the gdb for host with  following commands

#ls
gdb-6.4  gdb-6.4-kgdb-2.4.tar.bz2

#mkdir ppc440
#cd ppc440
#/bin/sh ../gdb-6.4/configure --target=powerpc-eabi
--with-solib-absolute-prefix=/opt/ppc440
#make
#cd ..

For gdbserver, if i give the "--target=powerpc-eabi" to "configure"
script,  it says the target
is not supported by gdbserver and if i give "--target=powerpc-linux",
it doesnt show any error
but its output doesn't look fine .  But when i do make. i get many
errors saying many files
are not found.  (Adding few required header files didnt help.)

I cross compiled the gdbserver with following commands:

[root@localhost gdb]# mkdir cross-ppc440
[root@localhost gdb]# ls
cross-ppc440  gdb-6.4  gdb-6.4-kgdb-2.4.tar.bz2  ppc440
[root@localhost

 gdb]# cd cross-ppc440/
[root@localhost cross-ppc440]#
[root@localhost cross-ppc440]# export CC=/usr/local/powerpc-eabi/bin/
[root@localhost cross-ppc440]# export CFLAGS="-mcpu=405 -D__PPC405__ -msim"


[root@localhost cross-ppc440]# export ac_cv_func_mmap_fixed_mapped=yes

[root@localhost cross-ppc440]# /bin/sh
../gdb-6.4/gdb/gdbserver/configure --target=powerpc-eabi --host=i386

configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for i386-gcc... /usr/local/powerpc-eabi/bin /powerpc-eabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc accepts -g...
yes
checking for /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc option to accept
ANSI C... none needed
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i386-pc-none
checking target system type... powerpc-unknown-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor...
/usr/local/powerpc-eabi/bin/powerpc-eabi-gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking sgtty.h usability... no
checking sgtty.h presence... no
checking for sgtty.h... no
checking termio.h usability... no
checking termio.h presence... no
checking for termio.h... no
checking termios.h usability... no
checking termios.h presence... no
checking for termios.h... no
checking sys/reg.h usability... no
checking sys/reg.h presence... no
checking for sys/reg.h... no
checking for string.h... (cached) yes
checking proc_service.h usability... no
checking proc_service.h presence... no
checking for proc_service.h... no
checking sys/procfs.h usability... no
checking sys/procfs.h presence... no
checking for sys/procfs.h... no
checking thread_db.h usability... no
checking thread_db.h presence... no
checking for thread_db.h... no
checking linux/elf.h usability... no
checking linux/elf.h presence... no
checking for linux/elf.h... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking whether strerror is declared... yes
checking for socklen_t... no
Error: target not supported by gdbserver.
[root@localhost cross-ppc440]#
[root@localhost cross-ppc440]# /bin/sh ../gdb-6.4/gdb/gdbserver/configure
--target=powerpc-linux --host=i386
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for i386-gcc... /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc accepts -g...
yes
checking for /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc option to accept
ANSI C... none needed
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i386-pc-none
checking target system type... powerpc-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor...
/usr/local/powerpc-eabi/bin/powerpc-eabi-gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking sgtty.h usability... no
checking sgtty.h presence... no
checking for sgtty.h... no
checking termio.h usability... no
checking termio.h presence... no
checking for termio.h... no
checking termios.h usability... no
checking termios.h presence... no
checking for termios.h... no
checking sys/reg.h usability... no
checking sys/reg.h presence... no
checking for sys/reg.h... no
checking for string.h... (cached) yes
checking proc_service.h usability... no
checking proc_service.h presence... no
checking for proc_service.h... no
checking sys/procfs.h usability... no
checking sys/procfs.h presence... no
checking for sys/procfs.h... no
checking thread_db.h usability... no
checking thread_db.h presence... no
checking for thread_db.h... no
checking linux/elf.h usability... no
checking linux/elf.h presence... no
checking for linux/elf.h... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking whether strerror is declared... yes
checking for socklen_t... no
checking for PTRACE_GETREGS... no
checking for PTRACE_GETFPXREGS... no
checking for libthread_db... no
configure: WARNING: Could not find libthread_db.
configure: WARNING: Disabling thread support in gdbserver.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing default commands
[root@localhost cross-ppc440]# ls
config.h  config.log  config.status  Makefile
[root@localhost cross-ppc440]#
[root@localhost cross-ppc440]#

Please let me know if any details required.

Thanks in advance
Sudheer

[-- Attachment #2: Type: text/html, Size: 8410 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-11-28 16:20 regarding kgdb in ppc Anumolu Sudheer
@ 2006-11-30  4:33 ` Anumolu Sudheer
       [not found]   ` <d16b1c80611300036x36ec0009r2eb20ebbc6966a97@mail.gmail.com>
  0 siblings, 1 reply; 15+ messages in thread
From: Anumolu Sudheer @ 2006-11-30  4:33 UTC (permalink / raw)
  To: kernelnewbies; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 8389 bytes --]

Hi All,
As i was not able to do  kgdb with  ppc as target, i decided to try first
with two x86 PCs. On the target system  after uncompressing the kernel i
could not see any statement like  "Waiting for connection from remote gdb".
I think this is to be done by gdbserver on the target.
I compiled the gdbserver but don't know how to use it here along with the
target kernel. Can anyone give some tips how to do it or if am missing
something .
I followed the docs - kgdb_docu_full-2.4.pdf and kgdbquickstart-2.4.pdf
Host:  x86,  RHEL-2.6.9-34.EL
Target Linux- 2.6.15.5 <http://2.6.16.2/>
The kgdb version : linux-2.6.15.5-kgdb-2.4

Please let me know if any other details required.


Thanks
Sudheer

On 11/28/06, Anumolu Sudheer <urwithsudheer@gmail.com> wrote:
>
> Hello All
> I am in process of learning kgdb and facing some problem with gdbserver. I
> am not able to "configure and make"   the gdbserver .  Sorry fot the long
> mail.
>
> Did anyone tried to compile the KGDB with this powerpc-eabi ?? Please help me in solving this.
>
> Setup datails are below..
> Host:  x86,  RHEL-2.6.9-34.EL
> Target Linux- 2.6.16.2
> Target Processor: AMCC440SPe
> The kgdb version : linux-2.6.15.5-kgdb-2.4
> GDB  version gdb-6.4-kgdb-2.4.tar.bz2
> CrossCompiler - powerpc-eabi
>
> I applied the patch to the kernel and cross compiled it.(modified to solve
> the compilation errors  as is not supported readymade).
>
> I used the steps given in "http://www.kegel.com/linux/gdbserver.txt " to
> build the gdb.
>
> I compiled the gdb for host with  following commands
>
> #ls
> gdb-6.4  gdb-6.4-kgdb-2.4.tar.bz2
>
> #mkdir ppc440
> #cd ppc440
> #/bin/sh ../gdb-6.4/configure --target=powerpc-eabi --with-solib-absolute-prefix=/opt/ppc440
> #make
> #cd ..
>
> For gdbserver, if i give the "--target=powerpc-eabi" to "configure" script,  it says the target
>
> is not supported by gdbserver and if i give "--target=powerpc-linux", it doesnt show any error
> but its output doesn't look fine .  But when i do make. i get many errors saying many files
> are not found.  (Adding few required header files didnt help.)
>
>
> I cross compiled the gdbserver with following commands:
>
> [root@localhost gdb]# mkdir cross-ppc440
> [root@localhost gdb]# ls
> cross-ppc440  gdb-6.4  gdb-6.4-kgdb-2.4.tar.bz2  ppc440
> [root@localhost
>
>
>  gdb]# cd cross-ppc440/
> [root@localhost cross-ppc440]#
> [root@localhost cross-ppc440]# export CC=/usr/local/powerpc-eabi/bin/
> [root@localhost cross-ppc440]# export CFLAGS="-mcpu=405 -D__PPC405__ -msim"
>
>
>
> [root@localhost cross-ppc440]# export ac_cv_func_mmap_fixed_mapped=yes
>
> [root@localhost cross-ppc440]# /bin/sh ../gdb-6.4/gdb/gdbserver/configure --target=powerpc-eabi --host=i386
>
> configure: WARNING: If you wanted to set the --build type, don't use
> --host.
>     If a cross compiler is detected then cross compile mode will be used.
> checking for i386-gcc... /usr/local/powerpc-eabi/bin /powerpc-eabi-gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... yes
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc accepts
> -g... yes
> checking for /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc option to accept
> ANSI C... none needed
> checking build system type... i686-pc-linux-gnulibc1
> checking host system type... i386-pc-none
> checking target system type... powerpc-unknown-eabi
> checking for a BSD-compatible install... /usr/bin/install -c
> checking how to run the C preprocessor...
> /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... no
> checking for strings.h... no
> checking for inttypes.h... no
> checking for stdint.h... no
> checking for unistd.h... yes
> checking sgtty.h usability... no
> checking sgtty.h presence... no
> checking for sgtty.h... no
> checking termio.h usability... no
> checking termio.h presence... no
> checking for termio.h... no
> checking termios.h usability... no
> checking termios.h presence... no
> checking for termios.h... no
> checking sys/reg.h usability... no
> checking sys/reg.h presence... no
> checking for sys/reg.h... no
> checking for string.h... (cached) yes
> checking proc_service.h usability... no
> checking proc_service.h presence... no
> checking for proc_service.h... no
> checking sys/procfs.h usability... no
> checking sys/procfs.h presence... no
> checking for sys/procfs.h... no
> checking thread_db.h usability... no
> checking thread_db.h presence... no
> checking for thread_db.h... no
> checking linux/elf.h usability... no
> checking linux/elf.h presence... no
> checking for linux/elf.h... no
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking whether strerror is declared... yes
> checking for socklen_t... no
> Error: target not supported by gdbserver.
> [root@localhost cross-ppc440]#
> [root@localhost cross-ppc440]# /bin/sh ../gdb-6.4/gdb/gdbserver/configure
> --target=powerpc-linux --host=i386
> configure: WARNING: If you wanted to set the --build type, don't use
> --host.
>     If a cross compiler is detected then cross compile mode will be used.
> checking for i386-gcc... /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... yes
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc accepts
> -g... yes
> checking for /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc option to accept
> ANSI C... none needed
> checking build system type... i686-pc-linux-gnulibc1
> checking host system type... i386-pc-none
> checking target system type... powerpc-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking how to run the C preprocessor...
> /usr/local/powerpc-eabi/bin/powerpc-eabi-gcc -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... no
> checking for strings.h... no
> checking for inttypes.h... no
> checking for stdint.h... no
> checking for unistd.h... yes
> checking sgtty.h usability... no
> checking sgtty.h presence... no
> checking for sgtty.h... no
> checking termio.h usability... no
> checking termio.h presence... no
> checking for termio.h... no
> checking termios.h usability... no
> checking termios.h presence... no
> checking for termios.h... no
> checking sys/reg.h usability... no
> checking sys/reg.h presence... no
> checking for sys/reg.h... no
> checking for string.h... (cached) yes
> checking proc_service.h usability... no
> checking proc_service.h presence... no
> checking for proc_service.h... no
> checking sys/procfs.h usability... no
> checking sys/procfs.h presence... no
> checking for sys/procfs.h... no
> checking thread_db.h usability... no
> checking thread_db.h presence... no
> checking for thread_db.h... no
> checking linux/elf.h usability... no
> checking linux/elf.h presence... no
> checking for linux/elf.h... no
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking whether strerror is declared... yes
> checking for socklen_t... no
> checking for PTRACE_GETREGS... no
> checking for PTRACE_GETFPXREGS... no
> checking for libthread_db... no
> configure: WARNING: Could not find libthread_db.
> configure: WARNING: Disabling thread support in gdbserver.
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating config.h
> config.status: executing default commands
> [root@localhost cross-ppc440]# ls
> config.h  config.log  config.status  Makefile
> [root@localhost cross-ppc440]#
> [root@localhost cross-ppc440]#
>
> Please let me know if any details required.
>
> Thanks in advance
> Sudheer
>

[-- Attachment #2: Type: text/html, Size: 9646 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
       [not found]               ` <12c9fc1a0612040805p64f23a7bj42fd27891294dfc2@mail.gmail.com>
@ 2006-12-24  8:20                 ` sudheer
  2006-12-27 14:18                   ` sudheer
  2006-12-29  0:34                   ` Reeve Yang
  0 siblings, 2 replies; 15+ messages in thread
From: sudheer @ 2006-12-24  8:20 UTC (permalink / raw)
  To: kernelnewbies; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

Hello All

> Hi Shakti
>
>     > Then executed the command mkinird and copied and added  initrd
>     in the
>     > grub.conf - situation is same.
>     > I changed the root parameter to LABEL=/ - situation is same.
>
>     Basically, block device, initrd support for ramdisk should be enabled:
>       CONFIG_BLK_DEV_RAM
>       CONFIG_BLK_DEV_INITRD
>
>     Double check your .config file.
>
>
> I have checked all the above and are enabled in the config.  I have 
> tried changing the kernel command line argumnets.
>
> I get the same error saying:  (All from init/main.c)
> ----
> unable to open an initial console 
> No init found.  Try passing init= option to kernel.
-----
I am able to debug the kernel on x86 systems. Thanks for all the support.

Now I am working with  kgdb on mpc8540 board.
target kernel version - linux-2.6.13
KGDB version - linux-2.6.13-kgdb-2.3

I am getting the following error:

root@localhost sudheer]# /opt/eldk-3.1.1/usr/bin/ppc_85xx-gdb vmlinux
GNU gdb Red Hat Linux (6.3.0.0-1.21_1rh)
...
This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux"...
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Ignoring packet error, continuing...

On the target side, i could see that the target kernel kgdb waiting for 
host communication.

On the target board with  kernel version - linux-2.6.13 , I could boot 
it only after applying the patches:
1. Gain_Phy_update
2.patch-2.6.14-rc5
3.Phy_Platform_Update
The patch-2.6.14-rc5  when applied , deleted the file  
arch/ppc/platforms/pcore.c and
pcore.h but the kernel boots well.

In the KGDB version - linux-2.6.13-kgdb-2.3
The ppc-lite.patch tries to modify the pcore.c which is not available.

I am not sure wether this affects the serial communication establishment.

Please help me to solve this.

Thanks
Sudheer







[-- Attachment #2: Type: text/html, Size: 2689 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-24  8:20                 ` sudheer
@ 2006-12-27 14:18                   ` sudheer
  2006-12-29  0:34                   ` Reeve Yang
  1 sibling, 0 replies; 15+ messages in thread
From: sudheer @ 2006-12-27 14:18 UTC (permalink / raw)
  To: sudheer; +Cc: linuxppc-embedded


Hello All
> I am able to debug the kernel on x86 systems. Thanks for all the support.
>
> Now I am working with  kgdb on mpc8540 board.
> target kernel version - linux-2.6.13
> KGDB version - linux-2.6.13-kgdb-2.3
>
> I am getting the following error:
>
> root@localhost sudheer]# /opt/eldk-3.1.1/usr/bin/ppc_85xx-gdb vmlinux
> GNU gdb Red Hat Linux (6.3.0.0-1.21_1rh)
> ...
> This GDB was configured as "--host=i386-redhat-linux 
> --target=ppc-linux"...
> (gdb) set remotebaud 115200
> (gdb) target remote /dev/ttyS0
> Remote debugging using /dev/ttyS0
> Ignoring packet error, continuing...
>
> On the target side, i could see that the target kernel kgdb waiting 
> for host communication.
>
> On the target board with  kernel version - linux-2.6.13 , I could boot 
> it only after applying the patches:
> 1. Gain_Phy_update
> 2.patch-2.6.14-rc5
> 3.Phy_Platform_Update
> The patch-2.6.14-rc5  when applied , deleted the file  
> arch/ppc/platforms/pcore.c and
> pcore.h but the kernel boots well.
>
> In the KGDB version - linux-2.6.13-kgdb-2.3
> The ppc-lite.patch tries to modify the pcore.c which is not available.
>
> I am not sure wether this affects the serial communication establishment.
>
> Please help me to solve this.
I am using the document kgdb_docu_full_2.4.pdf from  
http://kgdb.linsyssoft.com/docu.htm.
I have two issues before i look for serial communication establishment 
b'n host and target.

1.
In the document it is said that one serial port is enough on the the 
host and test machine. But in the below steps mentioned, the document 
uses 2 serial ports. I have only one serial port on either side, one on 
host and other on target board.

Can someone please clarify this.

Details are below:
In the document it is mentioned under the section "Prepare the kernel ",

step 3 :
[*] Simple selection of KGDB serial port
(115200) Debug serial port baud rate
(0) Serial port number for KGDB

step:6
kernel /boot/vmlinuz-2.6.13-kgdb ro root=/dev/hda1 kgdbwait 
kgdb8250=1,115200

In section: "Connecting to Debug Kernel"
step :1
$ stty ispeed 115200 ospeed 115200 < /dev/ttyS1

step:4
Connect to the test machine using gdb command "target"
(gdb) target remote /dev/ttyS0

2. And the other issue is:

When i select ttyS0 for kgdb , test kernel hangs before kgdb starts.
- - - - - - - - -
.
.
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
- - - - - - - - -
when is select ttyS1 for kgdb, test kernel boots upto kgdb and then 
kgdb  waits for remote connection.


Please help me in solving this.

Thanks
Sudheer

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-24  8:20                 ` sudheer
  2006-12-27 14:18                   ` sudheer
@ 2006-12-29  0:34                   ` Reeve Yang
  2006-12-29  1:02                     ` Vijay Sampath
  1 sibling, 1 reply; 15+ messages in thread
From: Reeve Yang @ 2006-12-29  0:34 UTC (permalink / raw)
  To: sudheer; +Cc: kernelnewbies, linuxppc-embedded

I'm facing the same problem for almost two weeks and still don't have
a clue. Please keep me in the thread. Thanks!

- Reeve

On 12/24/06, sudheer <urwithsudheer@gmail.com> wrote:
>
>  Hello All
>
>
> Hi Shakti
>
>
>
> > > Then executed the command mkinird and copied and added  initrd in the
> > > grub.conf - situation is same.
> > > I changed the root parameter to LABEL=/ - situation is same.
> >
> > Basically, block device, initrd support for ramdisk should be enabled:
> >   CONFIG_BLK_DEV_RAM
> >   CONFIG_BLK_DEV_INITRD
> >
> > Double check your .config file.
> >
>
>  I have checked all the above and are enabled in the config.  I have tried
> changing the kernel command line argumnets.
>
>  I get the same error saying:  (All from init/main.c)
>  ----
>  unable to open an initial console
>  No init found.  Try passing init= option to kernel.
>  -----
>  I am able to debug the kernel on x86 systems. Thanks for all the support.
>
>  Now I am working with  kgdb on mpc8540 board.
>  target kernel version - linux-2.6.13
>  KGDB version - linux-2.6.13-kgdb-2.3
>
>  I am getting the following error:
>
>  root@localhost sudheer]# /opt/eldk-3.1.1/usr/bin/ppc_85xx-gdb vmlinux
>  GNU gdb Red Hat Linux (6.3.0.0-1.21_1rh)
>  ...
>  This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux"...
>  (gdb) set remotebaud 115200
>  (gdb) target remote /dev/ttyS0
>  Remote debugging using /dev/ttyS0
>  Ignoring packet error, continuing...
>
>  On the target side, i could see that the target kernel kgdb waiting for
> host communication.
>
>  On the target board with  kernel version - linux-2.6.13 , I could boot it
> only after applying the patches:
>  1. Gain_Phy_update
>  2.patch-2.6.14-rc5
>  3.Phy_Platform_Update
>  The patch-2.6.14-rc5  when applied , deleted the file
> arch/ppc/platforms/pcore.c and
>  pcore.h but the kernel boots well.
>
>  In the KGDB version - linux-2.6.13-kgdb-2.3
>  The ppc-lite.patch tries to modify the pcore.c which is not available.
>
>  I am not sure wether this affects the serial communication establishment.
>
>  Please help me to solve this.
>
>  Thanks
>  Sudheer
>
>
>
>
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-29  0:34                   ` Reeve Yang
@ 2006-12-29  1:02                     ` Vijay Sampath
  2006-12-30 11:27                       ` sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Vijay Sampath @ 2006-12-29  1:02 UTC (permalink / raw)
  To: Reeve Yang; +Cc: kernelnewbies, linuxppc-embedded

> >  I have checked all the above and are enabled in the config.  I have tried
> > changing the kernel command line argumnets.
> >
> >  I get the same error saying:  (All from init/main.c)
> >  ----
> >  unable to open an initial console
> >  No init found.  Try passing init= option to kernel.

You need to pass init=/path/to/initprogram and console=ttySx,9600n81
or something similar. This will however only work if you have
configured your root filesystem correctly. This could be a ramdisk,
harddisk partition, flash or nfs. The method for doing each is
different.

> >  I am getting the following error:
> >
> >  root@localhost sudheer]# /opt/eldk-3.1.1/usr/bin/ppc_85xx-gdb vmlinux
> >  GNU gdb Red Hat Linux (6.3.0.0-1.21_1rh)
> >  ...
> >  This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux"...
> >  (gdb) set remotebaud 115200
> >  (gdb) target remote /dev/ttyS0
> >  Remote debugging using /dev/ttyS0
> >  Ignoring packet error, continuing...

This probably means that gdb on host could not communicate with the
gdb stub on target. To ensure target is running gdb stub, connect a
terminal program (example minicom on /dev/ttyS0) and ensure you are
getting output similar to this line: "$T0740:30300a00;01:c0621fb0;#45"

If you are getting this output, you should be able to close the
terminal program and connect gdb using the same serial port. If you
are not getting this output, then there could be many things wrong.
Did you try passing the kgdb=halt argument to the kernel.

Vijay

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-29  1:02                     ` Vijay Sampath
@ 2006-12-30 11:27                       ` sudheer
  2006-12-31  1:53                         ` Vijay Sampath
  0 siblings, 1 reply; 15+ messages in thread
From: sudheer @ 2006-12-30 11:27 UTC (permalink / raw)
  To: Vijay Sampath; +Cc: kernelnewbies, linuxppc-embedded

Vijay Sampath wrote:
>> >  I have checked all the above and are enabled in the config.  I 
>> have tried
>> > changing the kernel command line argumnets.
>> >
>> >  I get the same error saying:  (All from init/main.c)
>> >  ----
>> >  unable to open an initial console
>> >  No init found.  Try passing init= option to kernel.
>
> You need to pass init=/path/to/initprogram and console=ttySx,9600n81
> or something similar. This will however only work if you have
> configured your root filesystem correctly. This could be a ramdisk,
> harddisk partition, flash or nfs. The method for doing each is
> different.
>
>> >  I am getting the following error:
>> >
>> >  root@localhost sudheer]# /opt/eldk-3.1.1/usr/bin/ppc_85xx-gdb vmlinux
>> >  GNU gdb Red Hat Linux (6.3.0.0-1.21_1rh)
>> >  ...
>> >  This GDB was configured as "--host=i386-redhat-linux 
>> --target=ppc-linux"...
>> >  (gdb) set remotebaud 115200
>> >  (gdb) target remote /dev/ttyS0
>> >  Remote debugging using /dev/ttyS0
>> >  Ignoring packet error, continuing...
>
> This probably means that gdb on host could not communicate with the
> gdb stub on target. To ensure target is running gdb stub, connect a
> terminal program (example minicom on /dev/ttyS0) and ensure you are
> getting output similar to this line: "$T0740:30300a00;01:c0621fb0;#45"
>
> If you are getting this output, you should be able to close the
> terminal program and connect gdb using the same serial port. If you
> are not getting this output, then there could be many things wrong.
> Did you try passing the kgdb=halt argument to the kernel.
>
> Vijay
>
Vijay, Thanks  for the reply.
But before trying these options i want to clear one more issue.
While booting the kgdb kernel the kernel claims "kgdb initialisation 
failure." I have observed it very lately.

Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #2 Fri Dec 29 17:58:40 IST
2006
KGDB cannot initialize I/O yet.
Invalid syntax for option kgdb8250=
Malformed early option 'kgdb8250'
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/ram rw kgdbwait kgdb8250=0,115200
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)




I have changed the kgdb8250 arg to 1,0, but the result is same.
And ......
I have checked the serial cable NULL Mode connecting  x86 systems 
serially- with Cat and echo and this is fine.
When i try with Unpatched kernel on target and host(x86) - cat < 
/dev/ttyS0 doesnt wait  and returns to prompt.
I tried with 2.6.13 and 2.6.15.5 with resepective kgdb patches, but the 
result is same (kgdb Initialization failure). I am not sure where  am 
doing the mistake.
Please guide me in right way and also please let me know if any  more 
details are required.
Happy New Year in Advance.

Thanks
Sudheer

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-30 11:27                       ` sudheer
@ 2006-12-31  1:53                         ` Vijay Sampath
  2007-01-23  6:00                           ` sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Vijay Sampath @ 2006-12-31  1:53 UTC (permalink / raw)
  To: sudheer; +Cc: kernelnewbies, linuxppc-embedded

Sorry no idea. The configuration and options for kgdb are different in
my architecture. In make menuconfig, under "Kernel Hacking', I enable
kgdb and choose its serial port (ttyS0 or ttyS1). After this if I just
pass a string with "kgdb" in it in the commandline, it halts early on.
Looks like kgdb function is different in your architecture. You will
have to read the code that implements your kgdb setup. Clearly it is
not happy with the arguments you are passing it, as evident in the
output.

BTW I am using Linux kernel version 2.6.16 on a IBM405EP board. kgdb
breakpoint is setup in setup_arch() in arch/ppc/kernel/setup.c. Note I
also enabled CONFIG_WANT_EARLY_SERIAL in the processor configuration.
Not sure if this is important.

Vijay

On 12/30/06, sudheer <urwithsudheer@gmail.com> wrote:
> Vijay, Thanks  for the reply.
> But before trying these options i want to clear one more issue.
> While booting the kgdb kernel the kernel claims "kgdb initialisation
> failure." I have observed it very lately.
>
> Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
> Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #2 Fri Dec 29 17:58:40 IST
> 2006
> KGDB cannot initialize I/O yet.
> Invalid syntax for option kgdb8250=
> Malformed early option 'kgdb8250'
> Built 1 zonelists
> Kernel command line: console=ttyS0,115200 root=/dev/ram rw kgdbwait kgdb8250=0,115200
> OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
> PID hash table entries: 2048 (order: 11, 32768 bytes)
> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
>
>
>
>
> I have changed the kgdb8250 arg to 1,0, but the result is same.
> And ......
> I have checked the serial cable NULL Mode connecting  x86 systems
> serially- with Cat and echo and this is fine.
> When i try with Unpatched kernel on target and host(x86) - cat <
> /dev/ttyS0 doesnt wait  and returns to prompt.
> I tried with 2.6.13 and 2.6.15.5 with resepective kgdb patches, but the
> result is same (kgdb Initialization failure). I am not sure where  am
> doing the mistake.
> Please guide me in right way and also please let me know if any  more
> details are required.
> Happy New Year in Advance.
>
> Thanks
> Sudheer
>
>
>
>
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2006-12-31  1:53                         ` Vijay Sampath
@ 2007-01-23  6:00                           ` sudheer
  2007-01-23  8:49                             ` Vitaly Bordug
  0 siblings, 1 reply; 15+ messages in thread
From: sudheer @ 2007-01-23  6:00 UTC (permalink / raw)
  To: Vijay Sampath; +Cc: kernelnewbies, linuxppc-embedded

Vijay Sampath wrote:
> Sorry no idea. The configuration and options for kgdb are different in
> my architecture. In make menuconfig, under "Kernel Hacking', I enable
> kgdb and choose its serial port (ttyS0 or ttyS1). After this if I just
> pass a string with "kgdb" in it in the commandline, it halts early on.
> Looks like kgdb function is different in your architecture. You will
> have to read the code that implements your kgdb setup. Clearly it is
> not happy with the arguments you are passing it, as evident in the
> output.
>
> BTW I am using Linux kernel version 2.6.16 on a IBM405EP board. kgdb
> breakpoint is setup in setup_arch() in arch/ppc/kernel/setup.c. Note I
> also enabled CONFIG_WANT_EARLY_SERIAL in the processor configuration.
> Not sure if this is important.
>
In my setup i have one serial port on the target(MPC8540) and one on 
host(x86). The document(kgdb_docu_full-2.4.pdf) by default considers 
having two serial ports(two on target and two on host).

Can anyone plz guide me how to proceed when i have only one serial port . ?

I want to know the initilization steps for estrablishing the serial 
communication between kgdb(in target) and gdb on host. I tried one or 
two ways but couldnot succeed.

Thanks
Sudheer
> Vijay
>
> On 12/30/06, sudheer <urwithsudheer@gmail.com> wrote:
>> Vijay, Thanks  for the reply.
>> But before trying these options i want to clear one more issue.
>> While booting the kgdb kernel the kernel claims "kgdb initialisation
>> failure." I have observed it very lately.
>>
>> Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
>> Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #2 Fri Dec 
>> 29 17:58:40 IST
>> 2006
>> KGDB cannot initialize I/O yet.
>> Invalid syntax for option kgdb8250=
>> Malformed early option 'kgdb8250'
>> Built 1 zonelists
>> Kernel command line: console=ttyS0,115200 root=/dev/ram rw kgdbwait 
>> kgdb8250=0,115200
>> OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
>> PID hash table entries: 2048 (order: 11, 32768 bytes)
>> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
>>
>>
>>
>>
>> I have changed the kgdb8250 arg to 1,0, but the result is same.
>> And ......
>> I have checked the serial cable NULL Mode connecting  x86 systems
>> serially- with Cat and echo and this is fine.
>> When i try with Unpatched kernel on target and host(x86) - cat <
>> /dev/ttyS0 doesnt wait  and returns to prompt.
>> I tried with 2.6.13 and 2.6.15.5 with resepective kgdb patches, but the
>> result is same (kgdb Initialization failure). I am not sure where  am
>> doing the mistake.
>> Please guide me in right way and also please let me know if any  more
>> details are required.
>> Happy New Year in Advance.
>>
>> Thanks
>> Sudheer
>>
>>
>>
>>


>>
>>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-23  6:00                           ` sudheer
@ 2007-01-23  8:49                             ` Vitaly Bordug
  2007-01-23 14:47                               ` sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Vitaly Bordug @ 2007-01-23  8:49 UTC (permalink / raw)
  To: sudheer; +Cc: kernelnewbies, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 3649 bytes --]

On Tue, 23 Jan 2007 11:30:57 +0530
sudheer wrote:

> Vijay Sampath wrote:
> > Sorry no idea. The configuration and options for kgdb are different
> > in my architecture. In make menuconfig, under "Kernel Hacking', I
> > enable kgdb and choose its serial port (ttyS0 or ttyS1). After this
> > if I just pass a string with "kgdb" in it in the commandline, it
> > halts early on. Looks like kgdb function is different in your
> > architecture. You will have to read the code that implements your
> > kgdb setup. Clearly it is not happy with the arguments you are
> > passing it, as evident in the output.
> >
> > BTW I am using Linux kernel version 2.6.16 on a IBM405EP board. kgdb
> > breakpoint is setup in setup_arch() in arch/ppc/kernel/setup.c.
> > Note I also enabled CONFIG_WANT_EARLY_SERIAL in the processor
> > configuration. Not sure if this is important.
> >
> In my setup i have one serial port on the target(MPC8540) and one on 
> host(x86). The document(kgdb_docu_full-2.4.pdf) by default considers 
> having two serial ports(two on target and two on host).
> 

To be correct, usually one serial is for serial console, the other-for kgdb. Yet you can either disable serial console, or 
have its output into kgdb. host requires only one serial to be tied on ppc_85xx-gdb.
 
> Can anyone plz guide me how to proceed when i have only one serial
> port . ?
> 

having one serial is not a comfy case for serial kgdb.

> I want to know the initilization steps for estrablishing the serial 
> communication between kgdb(in target) and gdb on host. I tried one or 
> two ways but couldnot succeed.

I'd consider kgdboe - it works pretty well with 8540 gianfar (or at least used to work for me so tinkering might be trivial).

> 
> Thanks
> Sudheer
> > Vijay
> >
> > On 12/30/06, sudheer <urwithsudheer@gmail.com> wrote:
> >> Vijay, Thanks  for the reply.
> >> But before trying these options i want to clear one more issue.
> >> While booting the kgdb kernel the kernel claims "kgdb
> >> initialisation failure." I have observed it very lately.
> >>
> >> Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
> >> Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #2 Fri
> >> Dec 29 17:58:40 IST
> >> 2006
> >> KGDB cannot initialize I/O yet.
> >> Invalid syntax for option kgdb8250=
> >> Malformed early option 'kgdb8250'
> >> Built 1 zonelists
> >> Kernel command line: console=ttyS0,115200 root=/dev/ram rw
> >> kgdbwait kgdb8250=0,115200
> >> OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
> >> PID hash table entries: 2048 (order: 11, 32768 bytes)
> >> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> >>
> >>
> >>
> >>
> >> I have changed the kgdb8250 arg to 1,0, but the result is same.
> >> And ......
> >> I have checked the serial cable NULL Mode connecting  x86 systems
> >> serially- with Cat and echo and this is fine.
> >> When i try with Unpatched kernel on target and host(x86) - cat <
> >> /dev/ttyS0 doesnt wait  and returns to prompt.
> >> I tried with 2.6.13 and 2.6.15.5 with resepective kgdb patches,
> >> but the result is same (kgdb Initialization failure). I am not
> >> sure where  am doing the mistake.
> >> Please guide me in right way and also please let me know if any
> >> more details are required.
> >> Happy New Year in Advance.
> >>
> >> Thanks
> >> Sudheer
> >>
> >>
> >>
> >>
> 
> 
> >>
> >>
> >
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-23  8:49                             ` Vitaly Bordug
@ 2007-01-23 14:47                               ` sudheer
  2007-01-23 14:58                                 ` Sergei Shtylyov
  0 siblings, 1 reply; 15+ messages in thread
From: sudheer @ 2007-01-23 14:47 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: kernelnewbies, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 5008 bytes --]


>> In my setup i have one serial port on the target(MPC8540) and one on 
>> host(x86). The document(kgdb_docu_full-2.4.pdf) by default considers 
>> having two serial ports(two on target and two on host).
> To be correct, usually one serial is for serial console, the other-for kgdb. Yet you can either disable serial console, or 
> have its output into kgdb. host requires only one serial to be tied on ppc_85xx-gdb.
>
>   
>> Can anyone plz guide me how to proceed when i have only one serial
>> port . ?
> having one serial is not a comfy case for serial kgdb.
>
>   
>> I want to know the initilization steps for estrablishing the serial 
>> communication between kgdb(in target) and gdb on host. I tried one or 
>> two ways but couldnot succeed.
>>     
>
> I'd consider kgdboe - it works pretty well with 8540 gianfar (or at least used to work for me so tinkering might be trivial).
>   
I have tried with kgdboe. The kernel doesn't wait at any point of time 
and boots completely.

I gave the following bootargs:
console=ttyS0,115200 root=/dev/ram rw kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait

My Host IP is 192.168.3.14 and that of target's is 80

I could see the following failure comments while kernel booting.

kgdboe: eth0 doesn't support polling, aborting.
kgdboe: netpoll_setup failed kgdboe failed

NET: Registered protocol family 17
kgdb: Waiting for connection from remote gdb...
KGDB cannot initialize I/O yet.
RAMDISK: Compressed image found at block 0

Please help me in sorting out this issue and pl let if am wrong in giving the bootargs.

The whole dump of boot process is as below:

mpc8540ads_init(): exit
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
mpc8540ads_setup_arch()
arch: exit
openpic: enter
openpic: timer
openpic: external
openpic: spurious
openpic: exit

Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #43 Tue Jan 23 15:50:57
IST 2007
KGDB cannot initialize I/O yet.
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/ram rw
kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address 00:08:a1:84:ef:ca
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 255744k available (1596k kernel code, 376k data, 120k init, 0k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 1686k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xfdf04500 mem 0xfcffc500 (irq = 26) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xfdf04600 mem 0xfcffb600 (irq = 26) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8a
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
eth2: Gianfar Ethernet Controller Version 1.2, ff:f8:fe:ff:fb:ff
eth2: Running with NAPI enabled
eth2: 256/256 RX/TX BD ring size
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address 00:08:a1:84:ef:ca
kgdboe: eth0 doesn't support polling, aborting.
kgdboe: netpoll_setup failed kgdboe failed
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
kgdb: Waiting for connection from remote gdb...
KGDB cannot initialize I/O yet.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 120k init
/usr/sbin/xinetd: error while loading shared libraries: libcrypt.so.1: canno###
Application running ...


BusyBox v0.60.5 (2005.06.07-01:01+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# phy0:7: Link is Up - 100/Full

#


Thanks
Sudheer

[-- Attachment #2: Type: text/html, Size: 5821 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-23 14:47                               ` sudheer
@ 2007-01-23 14:58                                 ` Sergei Shtylyov
  2007-01-29 11:38                                   ` sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Sergei Shtylyov @ 2007-01-23 14:58 UTC (permalink / raw)
  To: sudheer; +Cc: kernelnewbies, linuxppc-embedded

Hello.

sudheer wrote:

>> I'd consider kgdboe - it works pretty well with 8540 gianfar (or at 
>> least used to work for me so tinkering might be trivial).

> I have tried with kgdboe. The kernel doesn't wait at any point of time 
> and boots completely.

> I gave the following bootargs:
> console=ttyS0,115200 root=/dev/ram rw 
> kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait

    You don't have to specify the remote MAC, IIUC.

> My Host IP is 192.168.3.14 and that of target's is 80

> The whole dump of boot process is as below:

[...]
> Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
> Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #43 Tue Jan 23 
> 15:50:57
> IST 2007
[...]
> kgdboe: local port 6443
> kgdboe: local IP 192.168.3.80
> kgdboe: interface eth0
> kgdboe: remote port 6442
> kgdboe: remote IP 192.168.3.14
> kgdboe: remote ethernet address 00:08:a1:84:ef:ca
> kgdboe: eth0 doesn't support polling, aborting.
> kgdboe: netpoll_setup failed kgdboe failed

    Have you backported the gianfar netpoll patch from 2.6.20-rc1?

> Thanks
> Sudheer

WBR, Sergei

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-23 14:58                                 ` Sergei Shtylyov
@ 2007-01-29 11:38                                   ` sudheer
  2007-01-29 13:00                                     ` Sergei Shtylyov
  0 siblings, 1 reply; 15+ messages in thread
From: sudheer @ 2007-01-29 11:38 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: kernelnewbies, linuxppc-embedded

Hello Sergie
Thanks for the reply.
>> I gave the following bootargs:
>> console=ttyS0,115200 root=/dev/ram rw 
>> kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait
>
>    You don't have to specify the remote MAC, IIUC.
When i dont give the mac address, the mac address all FFs(default) is 
considered. So am giving the mac address too, only then its working 
properly.

I have added few lines of code in driver/net/gianfar.c

void gfar_poll_gianfar(struct net_device *dev )
{
    disable_irq(dev->irq);
    gfar_interrupt(dev->irq, dev,  NULL);
    enable_irq(dev->irq);

}

Now am able to boot the target kernel without any error. kgdb waits for gdb connection.



>> kgdboe: local port 6443
>> kgdboe: local IP 192.168.3.80
>> kgdboe: interface eth0
>> kgdboe: remote port 6442
>> kgdboe: remote IP 192.168.3.14
>> kgdboe: remote ethernet address 00:08:a1:84:ef:ca
>> kgdboe: eth0 doesn't support polling, aborting.
>> kgdboe: netpoll_setup failed kgdboe failed
>
>    Have you backported the gianfar netpoll patch from 2.6.20-rc1?

I haven't backported the 2.6.20-rc1. As there are  many patches under that tree , i didnt try for it and could not know which one to add.
I could get only the below when googled.
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc1/2.6.20-rc1-mm1/

After booting the target kernel, it waits for the gdb connection.
At this point of time, i could not ping to the target kernel. The ping says unreachable.


On the host side :

[root@Sudheer linux-2.6.15.5]# powerpc-eabi-gdb ./vmlinux
GNU gdb 6.3
<gdb stuff>
(gdb) target remote udp:192.168.3.80:6443
warning: The remote protocol may be unreliable over UDP.
warning: Some events may be lost, rendering further debugging impossible.
Remote debugging using udp:192.168.3.80:6443
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Quit
(gdb) 

The complete dump on target side is as follows:


<tftp, booting >
mpc8540ads_init(): exit
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
mpc8540ads_setup_arch()
arch: exit
openpic: enter


Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #48 Mon Jan 29 14:02:38
IST 2007
KGDB cannot initialize I/O yet.
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/ram rw
kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address 00:08:a1:84:ef:ca
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 255744k available (1596k kernel code, 376k data, 120k init, 0k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 1682k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xfdf04500 mem 0xfcffc500 (irq = 26) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xfdf04600 mem 0xfcffb600 (irq = 26) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8a
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
eth2: Gianfar Ethernet Controller Version 1.2, 7f:68:36:82:b9:f7
eth2: Running with NAPI enabled
eth2: 256/256 RX/TX BD ring size
netconsole: not configured, aborting
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address 00:08:a1:84:ef:ca
kgdboe: device eth0 not up yet, forcing it
kgdboe: carrier detect appears untrustworthy, waiting 4 seconds
phy0:7: Link is Up - 100/Full
kgdboe: debugging over ethernet enabled
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
kgdb: Waiting for connection from remote gdb...
Waiting for connection from remote gdb...

>
>> Thanks
>> Sudheer
>
> WBR, Sergei
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-29 11:38                                   ` sudheer
@ 2007-01-29 13:00                                     ` Sergei Shtylyov
  2007-01-31  3:39                                       ` sudheer
  0 siblings, 1 reply; 15+ messages in thread
From: Sergei Shtylyov @ 2007-01-29 13:00 UTC (permalink / raw)
  To: sudheer; +Cc: kernelnewbies, linuxppc-embedded

Hello.

sudheer wrote:

>>> I gave the following bootargs:
>>> console=ttyS0,115200 root=/dev/ram rw 
>>> kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait

>>    You don't have to specify the remote MAC, IIUC.

> When i dont give the mac address, the mac address all FFs(default) is 
> considered. So am giving the mac address too, only then its working 
> properly.

    What, you don't have ARP on host?!

> I have added few lines of code in driver/net/gianfar.c

> void gfar_poll_gianfar(struct net_device *dev )
> {
>    disable_irq(dev->irq);
>    gfar_interrupt(dev->irq, dev,  NULL);
>    enable_irq(dev->irq);
> 
> }

    This isn't complete, please use the community patch.  Gianfar TSEC has 3 
interrupts and all of them must be disabled.

> Now am able to boot the target kernel without any error. kgdb waits for 
> gdb connection.

>>> kgdboe: local port 6443
>>> kgdboe: local IP 192.168.3.80
>>> kgdboe: interface eth0
>>> kgdboe: remote port 6442
>>> kgdboe: remote IP 192.168.3.14
>>> kgdboe: remote ethernet address 00:08:a1:84:ef:ca
>>> kgdboe: eth0 doesn't support polling, aborting.
>>> kgdboe: netpoll_setup failed kgdboe failed

>>    Have you backported the gianfar netpoll patch from 2.6.20-rc1?

> I haven't backported the 2.6.20-rc1. As there are  many patches under 
> that tree , i didnt try for it and could not know which one to add.

    You certainly didn't need to backport the whole 2.6.20-rc1, only a signle 
patch (-:

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=f2d71c2d800e68f158a5949e38b23f5140948548

WBR, Sergei

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: regarding kgdb in ppc
  2007-01-29 13:00                                     ` Sergei Shtylyov
@ 2007-01-31  3:39                                       ` sudheer
  0 siblings, 0 replies; 15+ messages in thread
From: sudheer @ 2007-01-31  3:39 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: kernelnewbies, linuxppc-embedded

Hello Sergei Shtylyov

It is working now. Thank you very much  for all the help and  support.
>
> sudheer wrote:
>
>>>> I gave the following bootargs:
>>>> console=ttyS0,115200 root=/dev/ram rw 
>>>> kgdboe=@192.168.3.80/,@192.168.3.14/00:08:A1:84:EF:CA kgdbwait
   I gave the bootargs
console=ttyS0,115200 root=/dev/ram rw 
kgdboe=@192.168.3.80/,@192.168.3.14/ kgdbwait

>
>
>>>    You don't have to specify the remote MAC, IIUC.
>
>> When i dont give the mac address, the mac address all FFs(default) is 
>> considered. So am giving the mac address too, only then its working 
>> properly.
>
>    What, you don't have ARP on host?!
I have added the patch and  the arp entry in the host for the target , 
only then the gdb and kgdb are communicating.

Even now it shows all FFs while booting but after booting i could bring 
up eth0 and ping.

<DUMP>

Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.15.5 (root@Sudheer) (gcc version 3.4.4) #54 Tue Jan 30 
15:30:07 IST 2007
KGDB cannot initialize I/O yet.
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/ram rw 
ramdisk_size=12288 kgdboe=@192.168.3.80/,@192.168.3.14/ kgdbwait
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address ff:ff:ff:ff:ff:ff
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 254976k available (1616k kernel code, 444k data, 120k init, 0k 
highmem)
Mount-cache hash table entries: 512
checking if image is initramfs...it isn't (no cpio magic); looks like an 
initrd
Freeing initrd memory: 2260k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xfdf04500 mem 0xfcffc500 (irq = 26) is 
a 16550A
serial8250.0: ttyS1 at MMIO map 0xfdf04600 mem 0xfcffb600 (irq = 26) is 
a 16550A
RAMDISK driver initialized: 16 RAM disks of 12288K size 1024 blocksize
loop: loaded (max 8 devices)
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8a
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 00:01:af:07:9b:8b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
eth2: Gianfar Ethernet Controller Version 1.2, 7f:78:36:82:b9:f7
eth2: Running with NAPI enabled
eth2: 256/256 RX/TX BD ring size
netconsole: not configured, aborting
kgdboe: local port 6443
kgdboe: local IP 192.168.3.80
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 192.168.3.14
kgdboe: remote ethernet address ff:ff:ff:ff:ff:ff
kgdboe: device eth0 not up yet, forcing it
kgdboe: carrier detect appears untrustworthy, waiting 4 seconds
phy0:7: Link is Up - 100/Full
kgdboe: debugging over ethernet enabled
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
kgdb: Waiting for connection from remote gdb...               <WAITS 
HERE FOR GDB>
RAMDISK: Compressed image found at block 0
EXT2-fs warning: maximal mount count reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 120k init
init started:  BusyBox v1.1.2 (2006.09.27-13:46+0000) multi-call binary
### Application running ...



Thanks
Sudheer

>
>> I have added few lines of code in driver/net/gianfar.c
>
>> void gfar_poll_gianfar(struct net_device *dev )
>> {
>>    disable_irq(dev->irq);
>>    gfar_interrupt(dev->irq, dev,  NULL);
>>    enable_irq(dev->irq);
>>
>> }
>
>    This isn't complete, please use the community patch.  Gianfar TSEC 
> has 3 interrupts and all of them must be disabled.
>
>> Now am able to boot the target kernel without any error. kgdb waits 
>> for gdb connection.
>
>>>> kgdboe: local port 6443
>>>> kgdboe: local IP 192.168.3.80
>>>> kgdboe: interface eth0
>>>> kgdboe: remote port 6442
>>>> kgdboe: remote IP 192.168.3.14
>>>> kgdboe: remote ethernet address 00:08:a1:84:ef:ca
>>>> kgdboe: eth0 doesn't support polling, aborting.
>>>> kgdboe: netpoll_setup failed kgdboe failed
>
>>>    Have you backported the gianfar netpoll patch from 2.6.20-rc1?
>
>> I haven't backported the 2.6.20-rc1. As there are  many patches under 
>> that tree , i didnt try for it and could not know which one to add.
>
>    You certainly didn't need to backport the whole 2.6.20-rc1, only a 
> signle patch (-:
>
> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=f2d71c2d800e68f158a5949e38b23f5140948548 
>
>
> WBR, Sergei
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-01-31  3:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-28 16:20 regarding kgdb in ppc Anumolu Sudheer
2006-11-30  4:33 ` Anumolu Sudheer
     [not found]   ` <d16b1c80611300036x36ec0009r2eb20ebbc6966a97@mail.gmail.com>
     [not found]     ` <12c9fc1a0611300924r406e95acie5c2053c1433ab33@mail.gmail.com>
     [not found]       ` <d16b1c80611301101n5f9ea44died47d2ff1bac4221@mail.gmail.com>
     [not found]         ` <12c9fc1a0611302029h36f29943s119f8ad70b95f2c4@mail.gmail.com>
     [not found]           ` <12c9fc1a0612010331p2c33c048j1af6006deda14abb@mail.gmail.com>
     [not found]             ` <d16b1c80612010540k7600f0e1n92fadd3d539d75bf@mail.gmail.com>
     [not found]               ` <12c9fc1a0612040805p64f23a7bj42fd27891294dfc2@mail.gmail.com>
2006-12-24  8:20                 ` sudheer
2006-12-27 14:18                   ` sudheer
2006-12-29  0:34                   ` Reeve Yang
2006-12-29  1:02                     ` Vijay Sampath
2006-12-30 11:27                       ` sudheer
2006-12-31  1:53                         ` Vijay Sampath
2007-01-23  6:00                           ` sudheer
2007-01-23  8:49                             ` Vitaly Bordug
2007-01-23 14:47                               ` sudheer
2007-01-23 14:58                                 ` Sergei Shtylyov
2007-01-29 11:38                                   ` sudheer
2007-01-29 13:00                                     ` Sergei Shtylyov
2007-01-31  3:39                                       ` sudheer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.