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) and I thought that maybe if I > edited preinit and put #!/bin/sh -x that I could turn on debugging and > see what the scripts were doing via the serial console. > > That didn't work so well. How you all debug startup scripts?
It depends on the error. If the problem is that preinit doesn't start at all, that usually indicates a syntax error or some such in the start up scripts, so on the host, I fire up dash, and do something like: for script in *; do . $script done in the build_dir/target.../root.../lib/preinit directory If there is a syntax error it will emit an error message and it can be fixed. Errors that prevent successful sourcing of files will cause preinit to die. > > I can't change preinit from the target can I? I tried but I guess it I was going to suggest using a 'pure' jffs image, but I realized that defeats the purpose of what you are trying to test. For a squashfs, the preinit runs from squashfs, not jffs (because mounting the jffs is part of the preinit functionality; probably the most important). > isn't using the one from /jffs and is using the one from /rom. I had > to rebuild the image to get my preinit changes to execute on startup. > Stefan had good suggestions for the rest. -- And that's my crabbing done for the day. Got it out of the way early, now I have the rest of the afternoon to sniff fragrant tea-roses or strangle cute bunnies or something. -- Michael Devore GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C http://gnupg.org The C Shore (Daniel Dickinson's Website) http://cshore.is-a-geek.com
signature.asc
Description: This is a digitally signed message part
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel