Changeset 2869


Ignore:
Timestamp:
Feb 20, 2012, 8:21:56 AM (3 years ago)
Author:
quozl
Message:

OLPC fs-verify - split for use by factory scripts, trim some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/x86/pc/olpc/via/fsverify.fth

    r2508 r2869  
    88   get-hex# to #image-eblocks
    99   open-nand
    10    \   #image-eblocks  show-init
    1110   /nand-block /nand-page / to nand-pages/block
    1211;
    1312
    1413: zblocks-end:  ( -- )
    15    \ XXX could check that everything else is erased ...
    1614;
    1715
     
    2321
    2422: erase-all  ( -- )
    25    \ XXX probably should set a flag saying that unspecified blocks are expected to be ff
    2623;
    2724
    28 \ We simultaneously DMA one data buffer onto NAND while unpacking the
    29 \ next block of data into another. The buffers exchange roles after
    30 \ each block.
    3125load-base value data-buffer
    3226
     
    4943   safe-parse-word hex-decode            ( eblock# hashname$ [ hash$ ] err? )
    5044   " Malformed hash string" ?nand-abort  ( eblock# hashname$ hash$ )
    51                                        
     45
    5246   verify-hash                           ( eblock# okay? )
    53 \   if  show-written  else  show-bad  then   ( )
    5447   swap .d  if  (cr  else  cr  then
    5548;
     
    5750previous definitions
    5851
    59 : fs-verify  ( "devspec" -- )
    60    load-crypto  abort" Can't load hash routines"
     52: $fs-verify  ( file$ -- )
     53   load-crypto  abort" Can't load hash routines"  ( file$ )
    6154
    62    false to secure-fsupdate?
    63    safe-parse-word r/o open-file       ( fd )
    64    abort" Can't open file"             ( fd )
     55   false to secure-fsupdate?                      ( file$ )
     56   r/o open-file  abort" Can't open file"         ( fd )
    6557
    66    file @                              ( fd fd' )
    67    over file !  linefeed line-delimiter c!  ( fd fd' )
    68    file !                              ( fd )
     58   file @                                         ( fd fd' )
     59   over file !  linefeed line-delimiter c!        ( fd fd' )
     60   file !                                         ( fd )
    6961
    7062   t-hms(
    71    also fs-verify-commands   
    72    ['] include-file catch  ?dup  if    ( x error )
     63   also fs-verify-commands
     64   ['] include-file catch  ?dup  if               ( x error )
    7365      nip .error
    7466   then
     
    7870   )t-hms
    7971;
     72
     73: fs-verify  ( "devspec" -- )
     74   safe-parse-word $fs-verify
     75;
     76
    8077[then]
    8178
Note: See TracChangeset for help on using the changeset viewer.