[openfirmware] r1644 - cpu/x86/pc/olpc/via

svn at openfirmware.info svn at openfirmware.info
Tue Jan 5 20:03:27 CET 2010


Author: pgf
Date: 2010-01-05 20:03:26 +0100 (Tue, 05 Jan 2010)
New Revision: 1644

Modified:
   cpu/x86/pc/olpc/via/assy.fth
   cpu/x86/pc/olpc/via/runin.fth
   cpu/x86/pc/olpc/via/smt.fth
Log:
updates/fixes to production bootfiles


Modified: cpu/x86/pc/olpc/via/assy.fth
===================================================================
--- cpu/x86/pc/olpc/via/assy.fth	2010-01-05 16:55:28 UTC (rev 1643)
+++ cpu/x86/pc/olpc/via/assy.fth	2010-01-05 19:03:26 UTC (rev 1644)
@@ -39,6 +39,7 @@
 
 : put-ka-tag  ( value$ key$ -- )
    2over  8 min  ka-dir$ " %s%s" sprintf  ( value$ key$ filename$ )
+   ." Fetching KA tag file " 2dup type cr ( value$ key$ filename$ )
    $read-file  if                     ( value$ key$ )
       ." ERROR: No KA tag file for " 2swap type cr  ( key$ )
       2drop                           ( )
@@ -162,6 +163,19 @@
    get-sn
 ;
 
+: safe-delete   ( $name -- )
+    2dup $file-exists?  if
+       2dup $delete
+    then
+;
+
+: $copy!  ( $src $dst -- )
+   2dup $file-exists?  if
+      2dup $delete
+   then
+   $copy1
+;
+
 0 0 2value response$
 
 : execute-downloads  ( adr len -- )
@@ -170,9 +184,12 @@
       ?remove-cr                  ( rem$ line$ )
       [char] : left-parse-string  ( rem$ value$ key$ )
       " Command" $=  if           ( rem$ value$ )
+         ." Will execute:" cr     ( rem$ value$ )
+         2dup type cr             ( rem$ value$ )
          evaluate                 ( rem$ )
+      else
+         2drop                    ( rem$ )
       then                        ( rem$ value$ )
-      2drop                       ( rem$ )
    repeat                         ( rem$ )
    2drop                          ( )
 ;
@@ -192,12 +209,15 @@
 ;
 
 : inject-tags  ( -- )
+
+   ." Merging new tags" cr
+
    get-mfg-data
 
    " TS"  ($delete-tag)
    " MS"  ($delete-tag)
    " BD"  ($delete-tag)
-   " NT"  ($delete-tag)
+   \ leave NT so we can use one tag throughout: " NT"  ($delete-tag)
 
    sn$          " SN"  put-tag
    fwver$       " BV"  put-tag
@@ -206,6 +226,8 @@
    mac$         " WM"  put-tag
    swdl-date$   " SD"  put-tag
 
+   ." Parsing tags" cr
+
    response$ parse-tags
 
    flash-write-enable
@@ -242,10 +264,12 @@
    ." Done" cr
 
    response$ execute-downloads
+
    inject-tags
 
    ." Powering off ..." d# 2000 ms
    power-off
 ;
 
+." Starting assembly phase" cr
 start-assy-test

Modified: cpu/x86/pc/olpc/via/runin.fth
===================================================================
--- cpu/x86/pc/olpc/via/runin.fth	2010-01-05 16:55:28 UTC (rev 1643)
+++ cpu/x86/pc/olpc/via/runin.fth	2010-01-05 19:03:26 UTC (rev 1644)
@@ -117,7 +117,7 @@
    begin halt again
 ;
 : handle-tag  ( value$ key$ -- )
-   2dup find-tag  if  ( value$ key$ old-value$ )       \ Tag already exists, check it
+   2dup ram-find-tag  if  ( value$ key$ old-value$ )       \ Tag already exists, check it
       2over " KA" $=  0=  if  ?-null  then   ( value$ key$ old-value$' )
       2>r 2over 2r@ $=  if                   ( value$ key$ r: old-value$' )
          2drop 2drop 2r> 2drop               ( )
@@ -161,7 +161,7 @@
    pop-base
 ;
 : make-md-tag  ( -- )
-   time&date  ( s m h d m y )  format-date  " MD" put-ascii-tag
+   time&date  ( s m h d m y )  format-date  " md" put-ascii-tag
 ;
 : inject-tags  ( -- )
    get-mfg-data
@@ -169,6 +169,7 @@
    " TS" ($delete-tag)
    " MS" ($delete-tag)
    " BD" ($delete-tag)
+   " NT" ($delete-tag)
    " MD" ($delete-tag)
    make-md-tag
 
@@ -265,7 +266,6 @@
    wait-scanner
    ?usb-keyboard
    wait-lan
-\   wait-usb-key
 ;             
 
 : my-cifs-connect  ( adr -- )
@@ -278,12 +278,26 @@
    2>r  2dup  2r>  $copy  $delete
 ;
 
+: $safe-delete   ( $name -- )
+    2dup $file-exists?  if
+       2dup $delete
+    then
+;
+
+: $copy!  ( $src $dst -- )
+   2dup $file-exists?  if
+      2dup $delete
+   then
+   $copy1
+;
+
+
 : finish-final-test  ( -- )
    wait-connections
 
    get-info
 
-\   verify-rtc-date
+   verify-rtc-date
 
    ." Getting final tags .. "
    cifs-connect final-tag-exchange \ Note: no disconnect...
@@ -295,10 +309,10 @@
    final-result cifs-disconnect
    ." Done" cr
 
-   " int:\runin\olpc.fth" $delete-all
+   \ need to delete target, due to #9957
+   " int:\runin\final.fth.sav" $safe-delete
 
-   \ Ultimately this should just be delete of runin\olpc.fth
-   " int:\runin\olpc.fth" " int:\runin\runin.sav" do-rename
+   " int:\runin\final.fth" " int:\runin\final.fth.sav" $rename
 ;
 
 \ Make the "wait for SD insertion" step highly visible 
@@ -318,7 +332,7 @@
 \ The operator can type this to reset the state to run
 \ the Linux-based runin tests again.
 : rerunin  ( -- )
-   " int:\runin\olpc.fth" $delete-all
+   " int:\runin\final.fth" $safe-delete
    fail-log-file$ fail-backup-file$ do-rename
 ;
 
@@ -364,4 +378,5 @@
  
 device-end
 
+." Starting final phase" cr
 after-runin

Modified: cpu/x86/pc/olpc/via/smt.fth
===================================================================
--- cpu/x86/pc/olpc/via/smt.fth	2010-01-05 16:55:28 UTC (rev 1643)
+++ cpu/x86/pc/olpc/via/smt.fth	2010-01-05 19:03:26 UTC (rev 1644)
@@ -111,10 +111,10 @@
    smt-filename$  open-temp-file
    pass?  if  " PASS"  else  " FAIL"  then  " RESULT="  put-key+value
    " PROCESS=FVT" put-key-line
-   " STATION="    put-key-line
-   " OPID="       put-key-line
-   " GUID="       put-key-line
-   board#$  " MB_NUM=" put-key+value
+   opid$            " OPID="    put-key+value
+   station#$        " STATION=" put-key+value
+   board#$          " MB_NUM="  put-key+value
+   \ " GUID="       put-key-line
    " Result" submit-file
 ;
 
@@ -180,8 +180,9 @@
 
    response$ write-new-tags               ( )
 
+   " EN"    " SS"  put-ascii-tag         ( )
+
 \   board#$  " B#"  put-ascii-tag         ( )
-\   " EN"    " SS"  put-ascii-tag         ( )
 \   " ASSY"  " TS"  put-ascii-tag         ( )
 \   " "(D3)" " SG"  ($add-tag)            ( )
 
@@ -263,4 +264,5 @@
 dend
 
 \ Automatically run the sequence
+." Starting SMT phase" cr
 start-smt-test




More information about the openfirmware mailing list