It's a possible way, but it looks like a backdoor, and even you choose a complex input, one day the system will not start because the stuff linked to ttyS0 wrote exactly the good stuff, bad luck !! ;)
But it can be done if you know exactly what can't be wrote

On 3/3/06, Philip Trickett (List) <phil-ml@techworks.ie> wrote:
You could also make uboot respond to a certain combination of keys on
boot, so that you can get into it if needed.

E.g. qqqqq when the uboot prompt appears would get you into uboot, but a
single stray character would not stop the normal boot process.

Phil


On Thu, 2006-03-02 at 09:35 -0800, Craig Hughes wrote:
> You can do 2 things to make u-boot silent and not listen for a
> keypress on ttyS0:
>
>
> boot into u-boot, and interrupt by pressing a key
>
>
> GUM> set silent true
> GUM> set bootdelay 0
> GUM> saveenv
>
>
> Now, when you reboot, u-boot will start immediately (no wait for
> keypress) and be silent.
>
>
> You will see a little output when linux starts (while it's
> decompressing iirc) because the linux kernel has a hardcoded
> write-to-ttyS0 in there.  That line can be commented out in the linux
> source.  Actually, since nothing ever really goes wrong with the
> uncompressing part, I think I'll disabled that in the buildroot.
>
>
> In order to restore u-boot after making the above changes, there are 2
> options, one which I've tested, and one which is just theoretical (ie
> have JTAG on hand for the theoretical one).  The tested method is to
> use flash_unlock/flashcp under linux to flash a new u-boot.bin
> onto /dev/mtd0, which will restore the default u-boot environment
> settings.  The untested method which I think should work, is to use
> the stuff in the u-boot contrib folder, which includes a linux app
> which supposedly lets you reset u-boot environment vars from within
> linux.  You would use that tool to unset the "silent" variable (don't
> set it to empty, you have to unset it), and set bootdelay to number of
> seconds to pause.
>
>
> C
>
> On Mar 2, 2006, at 1:58 AM, Jérôme Multrier wrote:
>
> > Hello !
> > The problem I see using ttyS0 is that it is used by u-boot.
> > So if something is sent to the system at boot, it will go into
> > u-boot and prevents linux from starting (and can cause trouble)
> > If I remember, there is a way to prevent u-boot to wait 2 seconds
> > for something on ttyS0, but make shure to have JTAG to reset
> > u-boot !
> >
> > On 3/2/06, Craig Hughes <craig@gumstix.com> wrote:
> >         You can also log into the gumstix w/out having to reflash by
> >         modifying the u-boot "bootargs" variable to append
> >         "init=/bin/sh", eg:
> >
> >         GUM> set bootargs $bootargs init=/bin/sh
> >         GUM> bootd
> >         ...
> >         ...
> >
> >         Eventually it will boot into linux bypassing /sbin/init and
> >         just
> >         dropping you directly to a shell prompt from whence you can
> >         edit /etc/
> >         inittab and then reboot.
> >
> >         C
> >
> >         On Mar 1, 2006, at 4:06 PM, Paul Coldrey wrote:
> >
> >         > One last note is that if you forgot to fix the initab
> >         before
> >         > rebooting then all is not lost you can still restore a
> >         "working"
> >         > file system in the usual fashion using u-boot.
> >         >
> >         > Paul Coldrey wrote:
> >         >> Hi Leigh,
> >         >>
> >         >> If you edit /etc/inttab and comment out the line:
> >         >>
> >         >> ::respawn:/sbin/getty -L ttyS0 115200 vt100
> >         >>
> >         >> then that will stop the getty reclaiming the port when it
> >         notices
> >         >> that it is free (and it will stop you having a console
> >         when you
> >         >> boot as well - see note below). To make init re-read this
> >         config do:
> >         >>
> >         >> kill -HUP 1
> >         >>
> >         >> Then if you kill the job running /bin/getty (find the id
> >         with ps)
> >         >> then ttyS0 will be free for you to use.
> >         >>
> >         >> NOTE: if you don't uncomment the above line before reboot
> >         then you
> >         >> won't get a console to log in with so before
> >         experimenting you
> >         >> might want to make sure your Gumstix boots to a point
> >         where you
> >         >> can SSH in or otherwise, comment the line, run the kill
> >         -HUP and
> >         >> then uncomment it again so you don't get caught without a
> >         console.
> >         >>
> >         >> In theory you can automate the whole procedure moderately
> >         easily
> >         >> in code.
> >         >>
> >         >> Cheers,
> >         >>
> >         >> Paul.
> >         >>
> >         >>
> >         >> Leigh Wells wrote:
> >         >>>
> >         >>> Hi, all.
> >         >>>
> >         >>> I need to be able to grab the serial port that the
> >         console is on
> >         >>> by default (ttyS0). At some point in my program I need
> >         to do some
> >         >>> serial comm on ttyS0 (to a Windows box), and then I'd
> >         like to be
> >         >>> able to give it back to the console (in an ideal world).
> >         I
> >         >>> haven't found a good way to do this yet.
> >         >>>
> >         >>> I seem to be able to open the port and send data into
> >         the gumstix
> >         >>> (basix), but the console reacts as well. For example, if
> >         I open
> >         >>> the port within my program and then receive data that
> >         includes
> >         >>> 0x03, the console sees it as a CTRL-C and kills my app.
> >         >>>
> >         >>> All of the other uarts are used for other functions, so
> >         I need to
> >         >>> grab this one. Any ideas? I guess if all else fails, I
> >         would need
> >         >>> to permanently disable the console from grabbing the
> >         port at boot…
> >         >>> not exactly sure how to do that either.
> >         >>>
> >         >>> Thanks!
> >         >>>
> >         >>> Leigh Wells
> >         >>>
> >         >>>
> >         >>
> >         >>
> >         >
> >         >
> >         > --
> >         > Paul Coldrey
> >         > http://www.ensigma.com.au/
> >         >
> >         >
> >         >
> >         > -------------------------------------------------------
> >         > This SF.Net email is sponsored by xPML, a groundbreaking
> >         scripting
> >         > language
> >         > that extends applications into web and mobile media.
> >         Attend the
> >         > live webcast
> >         > and join the prime developer group breaking into this new
> >         coding
> >         > territory!
> >         > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid
> >         $1720&dat1642
> >         > _______________________________________________
> >         > gumstix-users mailing list
> >         > gumstix-users@lists.sourceforge.net
> >         >
> >         https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
> >
> >
> >         -------------------------------------------------------
> >         This SF.Net email is sponsored by xPML, a groundbreaking
> >         scripting language
> >         that extends applications into web and mobile media. Attend
> >         the live webcast
> >         and join the prime developer group breaking into this new
> >         coding territory!
> >         http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid
> >         $1720&dat1642
> >         _______________________________________________
> >         gumstix-users mailing list
> >         gumstix-users@lists.sourceforge.net
> >         https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
> >
> >
> > --
> > Jérôme Multrier
> > TinyCoach, un projet KaliBee
>
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users



--
Jérôme Multrier
TinyCoach, un projet KaliBee