j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2008-01-07 10:10:33 +0100 (Mon, 07 Jan 2008) New Revision: 774
Modified: cpu/x86/pc/olpc/gamekeys.fth dev/olpc/cafenand/selftest.fth ofw/core/ofwcore.fth Log: OLPC trac 5853 - more improvements in selftest display: 1) Added the ability to pause the test-all progress by holding down the "rotate" game button 2) Noted in the nandflash test that a few bad blocks is normal
Modified: cpu/x86/pc/olpc/gamekeys.fth =================================================================== --- cpu/x86/pc/olpc/gamekeys.fth 2008-01-05 23:48:04 UTC (rev 773) +++ cpu/x86/pc/olpc/gamekeys.fth 2008-01-07 09:10:33 UTC (rev 774) @@ -44,3 +44,20 @@ then ; : game-key? ( mask -- flag ) game-key-mask and 0<> ; + +: (hold-message) ( ms -- ) + d# 100 / ( decisecs ) + begin dup while ( decisecs ) + dup d# 10 /mod swap if drop else (cr .d then ( decisecs ) + d# 100 ms ( decisecs ) + 1- ( decisecs ) + button-rotate game-key@ and if ( decisecs ) + (cr ." Release the game button to continue" + begin button-rotate game-key@ and while d# 100 ms repeat + (cr kill-line + drop exit + then + repeat + drop (cr kill-line +; +' (hold-message) to hold-message
Modified: dev/olpc/cafenand/selftest.fth =================================================================== --- dev/olpc/cafenand/selftest.fth 2008-01-05 23:48:04 UTC (rev 773) +++ dev/olpc/cafenand/selftest.fth 2008-01-07 09:10:33 UTC (rev 774) @@ -17,9 +17,10 @@
: #fixbbt++ ( -- ) #fixbbt 1+ to #fixbbt ; : .#fixbbt ( -- ) - (cr ." # bad blocks " - fixbbt? if ." marked" else ." found" then - ." = " #fixbbt .d cr + (cr + #fixbbt ?dup if .d else ." No " then + ." new bad blocks " + fixbbt? if ." marked" else ." found" then cr ; : record-err ( error? -- ) noop @@ -305,6 +306,7 @@ : selftest ( -- error? ) open 0= if true exit then get-msecs rn ! + ." Note: a few bad blocks is normal - these are already known:" cr show-bbt cr (selftest) close
Modified: ofw/core/ofwcore.fth =================================================================== --- ofw/core/ofwcore.fth 2008-01-05 23:48:04 UTC (rev 773) +++ ofw/core/ofwcore.fth 2008-01-07 09:10:33 UTC (rev 774) @@ -3193,6 +3193,9 @@ ['] do-method? scan-subtree ;
+defer hold-message +' ms to hold-message + : most-tests ( -- ) method-name 2@ current-device (search-wordlist) if ( xt )
@@ -3212,19 +3215,20 @@ execute-phandle-method if ( result ) ?dup if red-letters - ??cr ." Selftest failed. Return code = " .d cr cr - d# 10000 ms + ??cr ." Selftest failed. Return code = " .d cr black-letters + d# 10000 hold-message else green-letters - ." Okay" cr cr d# 3000 ms + ." Okay" cr black-letters + d# 2000 hold-message then else red-letters ." Selftest failed due to abort" cr - d# 10000 ms black-letters + d# 10000 hold-message then then ( ) ;