j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-05-06 11:34:47 +0200 (Sun, 06 May 2007) New Revision: 364
Added: cpu/x86/pc/olpc/countdwn.fth Modified: cpu/x86/pc/olpc/fw.bth Log: OLPC trac 1361 - make it harder to interrupt auto-boot from keyboard.
Added: cpu/x86/pc/olpc/countdwn.fth =================================================================== --- cpu/x86/pc/olpc/countdwn.fth (rev 0) +++ cpu/x86/pc/olpc/countdwn.fth 2007-05-06 09:34:47 UTC (rev 364) @@ -0,0 +1,66 @@ +\ See license at end of file +purpose: Check for auto-boot interruption + +\ This is similar to the ofw/core/countdwn.fth, except that you +\ have to use a specific key from the main keyboard, because +\ children tend to pound on the keyboard randomly. If you have +\ a serial console, you can still use any key, since only developers +\ have serial consoles. + +headerless +: show-countdown ( #seconds -- interrupted? ) + 1 swap do + i .d (cr + d# 10 0 do + d# 100 ms + + stdin @ if + console-key? if + console-key h# 1b = if + true unloop unloop exit + then + then + then +[ifdef] ukey + ukey? if + ukey drop + true unloop unloop exit + then +[then] + + loop + -1 +loop + space (cr + false +; +: (interrupt-auto-boot?) ( -- flag ) + 3 + ." Type the Esc key to interrupt automatic startup" cr + show-countdown +; +' (interrupt-auto-boot?) to interrupt-auto-boot? + +headers +\ LICENSE_BEGIN +\ Copyright (c) 2006 FirmWorks +\ +\ Permission is hereby granted, free of charge, to any person obtaining +\ a copy of this software and associated documentation files (the +\ "Software"), to deal in the Software without restriction, including +\ without limitation the rights to use, copy, modify, merge, publish, +\ distribute, sublicense, and/or sell copies of the Software, and to +\ permit persons to whom the Software is furnished to do so, subject to +\ the following conditions: +\ +\ The above copyright notice and this permission notice shall be +\ included in all copies or substantial portions of the Software. +\ +\ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +\ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +\ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +\ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +\ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +\ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +\ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +\ +\ LICENSE_END
Modified: cpu/x86/pc/olpc/fw.bth =================================================================== --- cpu/x86/pc/olpc/fw.bth 2007-05-06 03:34:19 UTC (rev 363) +++ cpu/x86/pc/olpc/fw.bth 2007-05-06 09:34:47 UTC (rev 364) @@ -260,8 +260,7 @@
fload ${BP}/cpu/x86/pc/olpc/micin.fth \ Microphone input AC/DC coupling
-fload ${BP}/ofw/core/countdwn.fth \ Startup countdown -patch 3 6 get-countdown +fload ${BP}/cpu/x86/pc/olpc/countdwn.fth \ Startup countdown
fload ${BP}/dev/scsi/probscsi.fth \ probe-scsi and probe-scsi-all