Author: wmb Date: 2007-10-02 01:10:06 +0200 (Tue, 02 Oct 2007) New Revision: 656
Added: cpu/x86/pc/olpc/images/bigdot.565 cpu/x86/pc/olpc/images/bigdot.bmp Modified: cpu/x86/pc/olpc/fw.bth cpu/x86/pc/olpc/gui.fth cpu/x86/pc/olpc/linux.fth cpu/x86/pc/olpc/loaddropins.fth cpu/x86/pc/olpc/security.fth ofw/fs/jffs2/jffs2.fth Log: More pretty boot. Freeze the screen during boot probing, only showing detailed progress if you press the check button.
Modified: cpu/x86/pc/olpc/fw.bth =================================================================== --- cpu/x86/pc/olpc/fw.bth 2007-09-30 18:03:33 UTC (rev 655) +++ cpu/x86/pc/olpc/fw.bth 2007-10-01 23:10:06 UTC (rev 656) @@ -300,10 +300,6 @@ probe-usb ;
-[ifdef] linux-support -fload ${BP}/cpu/x86/pc/olpc/linux.fth -[then] - fload ${BP}/ofw/gui/bmptools.fth fload ${BP}/dev/null.fth fload ${BP}/ofw/core/bailout.fth @@ -336,6 +332,7 @@ fload ${BP}/cpu/x86/pc/olpc/crypto.fth \ Cryptographic image validation fload ${BP}/cpu/x86/pc/olpc/lzip.fth \ Access zip images from memory fload ${BP}/cpu/x86/pc/olpc/gamekeys.fth +fload ${BP}/cpu/x86/pc/olpc/linux.fth fload ${BP}/cpu/x86/pc/olpc/security.fth fload ${BP}/cpu/x86/pc/olpc/setwp.fth fload ${BP}/ofw/gui/ofpong.fth @@ -349,6 +346,7 @@ ' olpc-power-off to power-off [then]
+ : dimmer ( -- ) screen-ih if " dimmer" screen-ih $call-method then ; : brighter ( -- ) screen-ih if " brighter" screen-ih $call-method then ;
@@ -493,13 +491,6 @@ then ;
-: go-hook-freeze - [ ' go-hook behavior compile, ] - 0 " set-source" $call-screen -; -: freeze ( -- ) ['] go-hook-freeze to go-hook ; -: unfreeze ( -- ) ['] usb-quiet to go-hook ; - : ?sound ( -- ) button-rotate game-key? 0= if sound then ;
Modified: cpu/x86/pc/olpc/gui.fth =================================================================== --- cpu/x86/pc/olpc/gui.fth 2007-09-30 18:03:33 UTC (rev 655) +++ cpu/x86/pc/olpc/gui.fth 2007-10-01 23:10:06 UTC (rev 656) @@ -389,6 +389,16 @@ ; ' (?show-device) to ?show-device
+: dcon-freeze ( -- ) 0 " set-source" $call-screen d# 30 ms ; +: dcon-unfreeze ( -- ) 1 " set-source" $call-screen d# 30 ms ; + +: go-hook-freeze + [ ' go-hook behavior compile, ] + 0 " set-source" $call-screen +; +: freeze ( -- ) ['] go-hook-freeze to go-hook ; +: unfreeze ( -- ) ['] usb-quiet to go-hook ; + \ LICENSE_BEGIN \ Copyright (c) 2006 FirmWorks \
Added: cpu/x86/pc/olpc/images/bigdot.565 =================================================================== (Binary files differ)
Property changes on: cpu/x86/pc/olpc/images/bigdot.565 ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream
Added: cpu/x86/pc/olpc/images/bigdot.bmp =================================================================== (Binary files differ)
Property changes on: cpu/x86/pc/olpc/images/bigdot.bmp ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream
Modified: cpu/x86/pc/olpc/linux.fth =================================================================== --- cpu/x86/pc/olpc/linux.fth 2007-09-30 18:03:33 UTC (rev 655) +++ cpu/x86/pc/olpc/linux.fth 2007-10-01 23:10:06 UTC (rev 656) @@ -263,7 +263,7 @@ ; ' ?memtest-elf-map-in is elf-map-in
-: memtest ( -- ) " rom:memtest" $boot ; +: memtest ( -- ) unfreeze " rom:memtest" $boot ;
: sym ( "name" -- adr ) parse-word $sym> 0= if err-sym-not-found throw then
Modified: cpu/x86/pc/olpc/loaddropins.fth =================================================================== --- cpu/x86/pc/olpc/loaddropins.fth 2007-09-30 18:03:33 UTC (rev 655) +++ cpu/x86/pc/olpc/loaddropins.fth 2007-10-01 23:10:06 UTC (rev 656) @@ -37,18 +37,10 @@ " ${BP}/cpu/x86/pc/olpc/images/minus.565" " minus.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/x.565" " x.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/sad.565" " sad.565" $add-deflated-dropin + " ${BP}/cpu/x86/pc/olpc/images/bigdot.565" " bigdot.565" $add-deflated-dropin
-\ " ${BP}/cpu/x86/pc/olpc/images/topkey.565" " topkey.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/dot0.565" " mark0.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/dot1.565" " mark1.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/dot2.565" " mark2.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/dot3.565" " mark3.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/lock2.565" " lock2.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/unlock2.565" " unlock2.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/check.565" " check.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/leasekey.565" " leasekey.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/xogray.565" " xogray.565" $add-deflated-dropin -\ " ${BP}/cpu/x86/pc/olpc/images/olpclogo.565" " olpc.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/laptop.565" " nand.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/laptop.565" " fastnand.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/ethernet.565" " ethernet.565" $add-deflated-dropin
Modified: cpu/x86/pc/olpc/security.fth =================================================================== --- cpu/x86/pc/olpc/security.fth 2007-09-30 18:03:33 UTC (rev 655) +++ cpu/x86/pc/olpc/security.fth 2007-10-01 23:10:06 UTC (rev 656) @@ -3,11 +3,6 @@
\ Specs at http://wiki.laptop.org/go/Firmware_Security
-: security-failure ( -- ) - ." Security failure" cr - d# 10000 ms power-off -; - : boot-device-list " disk sd nand" ;
true value debug-security? @@ -419,7 +414,12 @@ \ present) or "actos.zip" (the activation version of the OS).
: ?leased ( -- ) - lease-valid? if " run" else " act" then cn-buf place + " ak" find-tag if + 2drop " run" + else + lease-valid? if " run" else " act" then + then + cn-buf place ;
\ olpc-load-image is factor that is close the top level of the @@ -475,6 +475,27 @@ ;
0 0 2value base-xy +d# 410 d# 540 2constant progress-xy + +: ?unfreeze ( -- ) + game-key@ button-check and if dcon-unfreeze then +; + +: security-failure ( -- ) + ." Security failure" cr + get-msecs d# 10000 + begin ( limit ) + ?unfreeze + dup get-msecs - + 0< until drop + power-off +; + +: show-going ( -- ) + h# c0 h# c0 h# c0 rgb>565 progress-xy d# 500 d# 100 " fill-rectangle" $call-screen + d# 585 d# 613 to icon-xy " bigdot" show-icon + dcon-unfreeze +; + : show-check ( -- ) icon-xy base-xy to icon-xy " check" show-icon to icon-xy ; @@ -688,7 +709,11 @@
0 0 2value next-xy : load-from-list ( list$ -- devkey? ) + button-check game-key? 0= if dcon-freeze then + " dev /jffs2-file-system ' ?unfreeze to scan-callout dend" eval + begin dup while ( list$ ) + ?unfreeze bl left-parse-string ( list$ devname$ ) 2dup dn-buf place ( list$ devname$ )
@@ -707,7 +732,9 @@ load-from-device if 2drop ['] secure-load-ramdisk to load-ramdisk - " init-program" $find if execute go then + " init-program" $find if + execute show-going go + then show-x security-failure then @@ -723,6 +750,8 @@ : persistent-devkey? ( -- flag ) " dk" find-tag dup if nip nip then ;
: all-devices$ ( -- list$ ) " disk sd fastnand nand" ; + +d# 410 d# 540 2constant progress-xy : secure-startup ( -- ) ['] noop to ?show-device ['] noop to load-done @@ -731,7 +760,7 @@ set-alternate
d# 552 d# 383 to icon-xy " rom:xogray.565" $show-opaque - d# 410 d# 540 to icon-xy \ For boot progress reports + progress-xy to icon-xy \ For boot progress reports
button-check game-key? if text-on then ?toggle-secure
Modified: ofw/fs/jffs2/jffs2.fth =================================================================== --- ofw/fs/jffs2/jffs2.fth 2007-09-30 18:03:33 UTC (rev 655) +++ ofw/fs/jffs2/jffs2.fth 2007-10-01 23:10:06 UTC (rev 656) @@ -3,6 +3,8 @@
d# 20,000 constant max-inodes
+defer scan-callout ' noop to scan-callout + 0 value debug-scan? \ True to display progress reports
0 instance value block-buf \ Start address of working buffer @@ -727,6 +729,7 @@ inodes 'next-inode ! pages/chip 0 do i page>eblock to the-eblock# + i h# ff and 0= if scan-callout then i no-summary? if i possible-nodes? if i scan-raw-nodes then then