Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-25 Thread RHS Linux User
Hi, I often use a simple bit-bang function at some high buad rate and one gpio pin. I hook a serial terminal to it. Depending on CPU speed, etc. interrupts may have to be disabled during the time the character is actually being sent. One character at 115,200 is 0.1ms so unless the CPU is very

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-25 Thread Brian Hutchinson
On Thu, Mar 25, 2010 at 5:18 AM, RHS Linux User x...@nei.mv.com wrote: Hi,   I often use a simple bit-bang function at some high buad rate and one gpio pin. I hook a serial terminal to it. Depending on CPU speed, etc. interrupts may have to be disabled during the time the character is

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-24 Thread Ferenc Wagner
Daniel Dickinson csh...@csolve.net writes: You won't see anything from preinit with set -x because when preinit is first called there is no stdin/stdout. One of the things preinit does is attach itself to a terminal, if there is one (otherwise it just connects to a pseudo-terminal) Would

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-23 Thread Brian Hutchinson
Thanks to everyone for the great suggestions! Since I'm new at going this deep into shell debugging (and almost never on a embedded target) I'll have to check out each of these suggestions as I've never heard of some of them. Is it possible to start preinit with -x and redirect the output to the

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-23 Thread Weedy
On Tue, Mar 23, 2010 at 9:04 AM, Brian Hutchinson b.hutch...@gmail.com wrote: Thanks to everyone for the great suggestions! Since I'm new at going this deep into shell debugging (and almost never on a embedded target) I'll have to check out each of these suggestions as I've never heard of

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-23 Thread Daniel Dickinson
On Tue, 2010-03-23 at 09:04 -0400, Brian Hutchinson wrote: Thanks to everyone for the great suggestions! Since I'm new at going this deep into shell debugging (and almost never on a embedded target) I'll have to check out each of these suggestions as I've never heard of some of them. Is

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-23 Thread Brian Hutchinson
You won't see anything from preinit with set -x because when preinit is first called there is no stdin/stdout. Ah, I didn't think of that! I didn't think about running wireshark to capture the script output ... I'll have to look into that.  I'm well versed in wireshark. What is this

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-22 Thread Stefan Monnier
I've never needed to really get into the startup scripts much but now I need to try and understand how the mini_fo union gets set up so I'm trying to learn the startup scripts like preinit. When I ad to fiddle with this part of the code, I'd add some echo blabla /tmp/mydebug in those

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-22 Thread Daniel Dickinson
On Sun, 2010-03-21 at 20:41 -0400, Brian Hutchinson wrote: Hi, I've never needed to really get into the startup scripts much but now I need to try and understand how the mini_fo union gets set up so I'm trying to learn the startup scripts like preinit. I'm using a Pronghorn SBC (ixp-42xx)

Re: [OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-22 Thread Daniel Dickinson
On Mon, 2010-03-22 at 12:24 -0400, Stefan Monnier wrote: Another option might be to send that debug output to the network as is done in preinit_net_echo and read it via tcpdump. You can also use socat to receive the udp broadcasts without exiting after the first one. -- And that's my

[OpenWrt-Devel] Howto debug init scripts like preinit?

2010-03-21 Thread Brian Hutchinson
Hi, I've never needed to really get into the startup scripts much but now I need to try and understand how the mini_fo union gets set up so I'm trying to learn the startup scripts like preinit. I'm using a Pronghorn SBC (ixp-42xx) and I thought that maybe if I edited preinit and put #!/bin/sh -x