Changeset 2873
- Timestamp:
- Feb 23, 2012 4:20:16 AM (15 months ago)
- File:
-
- 1 edited
-
cpu/x86/pc/olpc/via/fsverify.fth (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/x86/pc/olpc/via/fsverify.fth
r2869 r2873 1 1 \ Boot script for post-audit testing 2 2 [ifndef] fs-verify 3 false value fs-verify-quick? 3 4 vocabulary fs-verify-commands 4 5 also fs-verify-commands definitions 5 6 7 false value data? 6 8 : zblocks: ( "eblock-size" "#eblocks" ... -- ) 9 data? 0= " Not a zsp file" ?nand-abort 7 10 get-hex# to /nand-block 8 11 get-hex# to #image-eblocks … … 12 15 13 16 : zblocks-end: ( -- ) 17 false to data? 14 18 ; 15 19 16 20 \ This could be a no-op ... 17 21 : data: ( "filename" -- ) 22 true to data? 18 23 safe-parse-word fn-buf place 19 24 " ${DN}${PN}\${CN}${FN}" expand$ image-name-buf place … … 32 37 ; 33 38 39 : ?mismatch 40 cr 41 fs-verify-quick? " One block mismatch, remainder not checked" ?nand-abort 42 ; 43 34 44 : zblock: ( "eblock#" "comprlen" "hashname" "hash-of-128KiB" -- ) 35 45 get-hex# ( eblock# ) … … 45 55 46 56 verify-hash ( eblock# okay? ) 47 swap .d if (cr else crthen57 swap .d if (cr else ?mismatch then 48 58 ; 49 59 … … 62 72 t-hms( 63 73 also fs-verify-commands 64 ['] include-file catch ?dup if ( x error ) 65 nip .error 66 then 74 ['] include-file catch ( 0 | x error# ) 67 75 previous 68 76 show-done 69 77 close-nand-ihs 70 78 )t-hms 79 throw ( ) 71 80 ; 72 81 73 : fs-verify ( "devspec" -- ) 82 : fs-verify ( "fs.zsp" -- ) \ test blocks 83 false to fs-verify-quick? 84 safe-parse-word $fs-verify 85 ; 86 87 : fs-verify-quick ( "fs.zsp" -- ) \ test blocks until a mismatch 88 true to fs-verify-quick? 74 89 safe-parse-word $fs-verify 75 90 ;
Note: See TracChangeset
for help on using the changeset viewer.
