Author: wmb Date: Tue Feb 16 22:32:25 2010 New Revision: 1749 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1749
Log: OLPC XO-1.5 - graphical instructions for factory selftest steps.
Modified: cpu/x86/pc/olpc/via/drawboardtop.fth cpu/x86/pc/olpc/via/factory.fth cpu/x86/pc/olpc/via/fw.bth dev/hdaudio/test.fth dev/mmc/sdhci/selftest.fth
Modified: cpu/x86/pc/olpc/via/drawboardtop.fth ============================================================================== --- cpu/x86/pc/olpc/via/drawboardtop.fth Tue Feb 16 19:46:12 2010 (r1748) +++ cpu/x86/pc/olpc/via/drawboardtop.fth Tue Feb 16 22:32:25 2010 (r1749) @@ -1,3 +1,6 @@ +\ See license at end of file +purpose: Drawings of OLPC XO-1.5 board and components for test instructions + support-package: test-instructions
decimal @@ -99,7 +102,7 @@ : battery-conn 444 306 27 27 boxat 427 279 18 18 boxat -; +;
: led0 105 349 led-symbol ; : led1 131 349 led-symbol ; @@ -262,8 +265,10 @@ : camera-led 569 45 led-symbol ; : wlan-conn-top 144 82 90 27 boxat ; : wlan-card-top 152 7 75 75 boxat ; -: ext-sd-slot 497 360 81 9 boxat ; - +: ext-sd-slot-top 497 360 81 9 boxat ; +: ext-sd-card-top + 504 369 moveto 0 -75 rline 11 -11 rline 56 0 rline 0 86 rline -67 0 rline +; : draw-top ( -- ) basic-layout
@@ -295,7 +300,7 @@ camera-led wlan-conn-top wlan-card-top - ext-sd-slot + ext-sd-slot-top ;
: usb-key ( -- ) @@ -453,14 +458,30 @@
: connect-int-sd ( -- ) draw-board - " Power off and connect internal SD card to continue.." message + " Connect internal SD card to continue.." message ['] int-sd-card green-888 highlight -; +; +: connect-ext-sd ( -- ) + draw-top + " Connect external SD card to continue.." message + ['] ext-sd-card-top green-888 highlight +; + +: disconnect-int-sd ( -- ) + draw-board + " Disconnect internal SD card to continue.." message + ['] int-sd-card red-888 highlight +; +: disconnect-ext-sd ( -- ) + draw-top + " Disonnect external SD card to continue.." message + ['] ext-sd-card-top red-888 highlight +;
: open ( -- ok ) true ; : close ( -- ) ;
-end-package +end-support-package 0 value instructions-ih
: ($instructions) ( name$ -- ) @@ -478,3 +499,29 @@ ' (instructions-done) to instructions-done
: diag-mode ( -- ) true to diag-switch? ; + +hex + +\ LICENSE_BEGIN +\ Copyright (c) 2010 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/via/factory.fth ============================================================================== --- cpu/x86/pc/olpc/via/factory.fth Tue Feb 16 19:46:12 2010 (r1748) +++ cpu/x86/pc/olpc/via/factory.fth Tue Feb 16 22:32:25 2010 (r1749) @@ -109,7 +109,7 @@ \ begin d# 250 ms silent-probe-usb scanner? until " connect-scanner" $instructions begin instructions-idle d# 400 ms silent-probe-usb scanner? until - instructions-performed + instructions-done clear-drawing ?usb-keyboard then ; @@ -120,7 +120,7 @@ wired-lan? 0= if " connect-usb-ethernet" $instructions begin d# 400 ms instructions-idle silent-probe-usb wired-lan? until - instructions-performed + instructions-done clear-drawing then ; : usb-key? ( -- flag ) @@ -130,7 +130,7 @@ usb-key? 0= if " connect-usb-key" $instructions begin d# 400 ms instructions-idle silent-probe-usb usb-key? until - instructions-performed + instructions-done clear-drawing then ; : stall ( -- ) begin halt again ;
Modified: cpu/x86/pc/olpc/via/fw.bth ============================================================================== --- cpu/x86/pc/olpc/via/fw.bth Tue Feb 16 19:46:12 2010 (r1748) +++ cpu/x86/pc/olpc/via/fw.bth Tue Feb 16 22:32:25 2010 (r1749) @@ -352,6 +352,10 @@ fload ${BP}/cpu/x86/pc/olpc/gui.fth fload ${BP}/cpu/x86/pc/olpc/via/suspend.fth \ Suspend/resume setup
+fload ${BP}/cpu/x86/pc/olpc/strokes.fth +fload ${BP}/cpu/x86/pc/olpc/plot.fth +fload ${BP}/cpu/x86/pc/olpc/via/drawboardtop.fth + fload ${BP}/cpu/x86/pc/olpc/via/switches.fth \ Lid and ebook switches fload ${BP}/cpu/x86/pc/olpc/via/leds.fth \ LEDs fload ${BP}/cpu/x86/pc/olpc/via/factory.fth \ Manufacturing tools @@ -518,11 +522,6 @@ fload ${BP}/cpu/x86/pc/olpc/via/fsverify.fth devalias fsdisk int:0
-fload ${BP}/cpu/x86/pc/olpc/strokes.fth -fload ${BP}/cpu/x86/pc/olpc/plot.fth -fload ${BP}/cpu/x86/pc/olpc/via/drawboard.fth -fload ${BP}/cpu/x86/pc/olpc/via/drawboardtop.fth - fload ${BP}/ofw/inet/sntp.fth : olpc-ntp-servers ( -- ) " DHCP time 172.18.0.1 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org"
Modified: dev/hdaudio/test.fth ============================================================================== --- dev/hdaudio/test.fth Tue Feb 16 19:46:12 2010 (r1748) +++ dev/hdaudio/test.fth Tue Feb 16 22:32:25 2010 (r1749) @@ -15,14 +15,16 @@ ; : connect-headphones ( -- ) headphone-jack pin-sense? 0= if - ." Connect headphones to continue.. " - begin ?key-abort pin-sense? until cr + " connect-headphones" $instructions + begin ?key-abort instructions-idle pin-sense? until + instructions-done then ; : disconnect-headphones ( -- ) headphone-jack pin-sense? if - ." Disconnect headphones to continue.. " - begin ?key-abort pin-sense? 0= until cr + " disconnect-headphones" $instructions + begin ?key-abort instructions-idle pin-sense? 0= until + instructions-done then ; : speaker-test ( -- ) @@ -49,14 +51,16 @@
: connect-mic external-mic pin-sense? 0= if - ." Connect microphone to continue.. " - begin ?key-abort pin-sense? until cr + " connect-microphone" $instructions + begin ?key-abort instructions-idle pin-sense? until + instructions-done then ; : disconnect-mic ( -- ) external-mic pin-sense? if - ." Disconnect microphone to continue.. " - begin ?key-abort pin-sense? 0= until cr + " disconnect-microphone" $instructions + begin ?key-abort instructions-idle pin-sense? 0= until + instructions-done then ;
@@ -107,6 +111,7 @@ true to force-speakers? true to force-internal-mic? input-common-settings mono output-common-settings d# -9 set-volume + ." Testing internal speakers and microphone" cr " setup-case" test-common false to force-speakers? false to force-internal-mic? ; @@ -114,12 +119,14 @@ true to force-speakers? true to force-internal-mic? input-common-settings mono output-common-settings d# -23 set-volume \ -23 prevents obvious visible clipping + ." Testing internal speakers and microphone with fixture" cr " setup-fixture" test-common false to force-speakers? false to force-internal-mic? ; : test-with-loopback ( -- error? ) input-common-settings stereo output-common-settings d# -33 set-volume \ -23 prevents obvious visible clipping + ." Testing headphone and microphone jacks with loopback cable" cr " setup-loopback" test-common ;
@@ -147,15 +154,17 @@ ; : connect-loopback ( -- ) loopback-connected? 0= if - ." Connect loopback cable to continue.. " - begin ?key-abort loopback-connected? until cr + " connect-loopback" $instructions + begin ?key-abort instructions-idle loopback-connected? until + instructions-done then - d# 500 ms \ Time to make sure the plug is all the way in + d# 500 ms \ Delay to make sure the plug is all the way in ; : disconnect-loopback ( -- ) loopback-disconnected? 0= if - ." Disconnect loopback cable to continue.. " - begin ?key-abort loopback-disconnected? until cr + " disconnect-loopback" $instructions + begin ?key-abort instructions-idle loopback-disconnected? until + instructions-done then ; \ Returns failure by throwing
Modified: dev/mmc/sdhci/selftest.fth ============================================================================== --- dev/mmc/sdhci/selftest.fth Tue Feb 16 19:46:12 2010 (r1748) +++ dev/mmc/sdhci/selftest.fth Tue Feb 16 22:32:25 2010 (r1749) @@ -64,11 +64,14 @@ : wait-card? ( -- error? ) card-present? if false exit then diagnostic-mode? if - ." Please insert card in " .slot-name ." to continue test." cr + external? if " connect-ext-sd" else " connect-int-sd" then + $instructions begin d# 100 ms + instructions-idle test-abort? if ." Aborted" true exit then card-present? until + instructions-done ." Card insertion correctly detected." cr d# 200 ms \ Settling time false @@ -82,12 +85,15 @@ diagnostic-mode? 0= if false exit then external? 0= if false exit then
- ." Please remove card from " .slot-name ." to continue test." cr + external? if " disconnect-ext-sd" else " disconnect-int-sd" then + $instructions
begin d# 100 ms + instructions-idle test-abort? if ." Aborted" true exit then card-present? 0= until + instructions-done ." Card removal correctly detected." cr false ;
openfirmware@openfirmware.info