Skip to contentSkip to conversation

remote debugging?

DISCUSSION Andreas Tobler 4 participants 6 messages Jan 6, 2000 – Jan 8, 2000

lore
Share & tools
lore
#0 lore raw

Hi,

I try to remote debugging a kernel.
Configuration as follows:

pm7200 Linux <------ serial cable------> PowerBook MacOS ZTerm

the physical Link is ok, when cat'ing a file to /dev/ttyS1 I get it on the ZTerm window.

But when I boot with BootX I add the kernel args 'console=/dev/ttyS1' in the corresponding field.

The first stage text I see on the pm7200, afterwards Tux comes up and no booting messages are seen either on the pm7200 (what I expect) nor on the ZTerm window. (what I don't expect).

The serial settings are as described in the xmon.txt 38400N81 The kernel is compiled with xmon included, the one I test boots and is a 2214pre18. It's only to find out how 'remote' works.

Any ideas/experiences?

Thanks in advance,

Andreas

Signature · 7 lines
| Andreas Tobler				
| CH-8004 Zuerich 							
| E-Mail:   [email protected]
-----------------------------------------------


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#1 lore raw

Andreas Tobler wrote:
[...]

Quoted 2 lines

The kernel is compiled with xmon included, the one I test boots and is a 2214pre18. It's only to find out how 'remote' works.

Once you have a kernel with xmon support, you can generate an NMI (command-power, I believe) and that drops you into xmon (assuming the machine is not too far gone). In addition, xmon will come up when a fatal exception occurs, or when you put a xmon(0) call into a function in the kernel.

When debugging an embedded system, I just put a bunch of xmon(0) calls at strategic locations, and when I got close to where the system was hanging, I poked around with xmon.

Paul Mackerras wrote some documentation for xmon that you may want to check out. It doesn't seem to be in Documentation/ but it's probably at linuxppc.cs.nmt.edu or something (search the mail archives -- it has been discussed before).

Signature · 5 lines
Charles Lepple
[email protected]


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#2 lore raw
Quoted 3 lines · Charles Lepple

Andreas Tobler wrote:
[...]

[...]

Quoted 4 lines

Paul Mackerras wrote some documentation for xmon that you may want to check out. It doesn't seem to be in Documentation/ but it's probably at linuxppc.cs.nmt.edu or something (search the mail archives -- it has been discussed before).

This docu I have.
Thanks for the answer. But my problem is much earlier I think.

I'd like to redirect the console output from the boot of my pm7200 to the serial port. This is what doesn't work.
Neither the printer nor the modem port.

When the system is up, I can check the physical connection which works.

Isn't it possible to get the boot output to the serial port written?

Andreas

Signature · 6 lines
| Andreas Tobler				
| CH-8004 Zuerich 							
| E-Mail:   [email protected]
-----------------------------------------------

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#3 lore raw
Quoted 13 lines · Andreas Tobler
Quoted 3 lines · Charles Lepple

Andreas Tobler wrote:
[...]

[...]

Quoted 4 lines

Paul Mackerras wrote some documentation for xmon that you may want to check out. It doesn't seem to be in Documentation/ but it's probably at linuxppc.cs.nmt.edu or something (search the mail archives -- it has been discussed before).

This docu I have.
Thanks for the answer. But my problem is much earlier I think.

Quoted 7 lines

I'd like to redirect the console output from the boot of my pm7200 to the serial port. This is what doesn't work.
Neither the printer nor the modem port.

When the system is up, I can check the physical connection which works.

Isn't it possible to get the boot output to the serial port written?

I had such a configuration a few days ago. 7200 -> ix86 with a usual modem cable.

You need a kernel with support for PowerMac serial port and console on serial port.
Then give the arguments like described in Documentation/serial-console.txt :

console=ttyS0,19200 and you will see an output on your console and the penguin on your screen. It should be possible to log both to serial and to the screen.

For a first test you should setup a serial login to check the settings in zterm. Add a line like this in your inittab:
t:23:respawn:/sbin/agetty -L -h 19200

The 23 mean the runlevels and might be different on a RedHat system. If you can login to your 7200 then the cable and the settings in zterm are ok. Somehow you always get a little garbage when you login from a Mac to another Mac. This does not occour from a ix86 machine, I don't know why.

Gruss Olaf

Signature · 6 lines
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#4 lore raw
Quoted 3 lines · Olaf Hering

console=ttyS0,19200 and you will see an output on your console and the penguin on your screen. It should be possible to log both to serial and to the screen.

That's `console=ttyS0 console=tty0' (or vice versa). The first one is used for single user/emergency shells.

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
In reply to Andreas Tobler
Quoted 8 lines · Andreas Tobler

I try to remote debugging a kernel.
Configuration as follows:

pm7200 Linux <------ serial cable------> PowerBook MacOS ZTerm

the physical Link is ok, when cat'ing a file to /dev/ttyS1 I get it on the ZTerm window.

Quoted 6 lines

But when I boot with BootX I add the kernel args 'console=/dev/ttyS1' in the corresponding field.

The first stage text I see on the pm7200, afterwards Tux comes up and no booting messages are seen either on the pm7200 (what I expect) nor on the ZTerm window. (what I don't expect).

And you did enable CONFIG_SERIAL_CONSOLE?

I'm not 100% sure that it works on PowerMac (don't have one), but at least CONFIG_SERIAL_CONSOLE is in the macserial code.

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/