Changeset 2153


Ignore:
Timestamp:
Jan 27, 2011, 12:13:35 AM (5 years ago)
Author:
quozl
Message:

Remove machine signature check as it serves no purpose ... flashing
wrong file is prevented by the changed crc-offset in addrs.fth. Move
unused check-firmware-image into [if].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dev/olpc/spiflash/spiui.fth

    r2015 r2153  
    4343\ Perform a series of sanity checks on the new firmware image.
    4444
    45 : check-firmware-image  ( adr len -- adr len )
    46    dup /flash <>  abort" Wrong image length"      ( adr len )
    47    2dup +  h# 40 -                                ( adr len signature-adr )
    48    dup " CL1" comp  abort" No firmware signature" ( adr len signature-adr )
    49    ." Firmware: " h# 10 type                      ( adr len )
    50    \ XXX add some more sanity checks
    51 ;
    52 
    5345[ifdef] load-base
    5446: flash-buf  load-base  ;
     
    7769
    7870   ." Got firmware version: "
    79    flash-buf h# f.ffc0 +  dup  h# 10  type cr  ( adr )
    80    " CL1" comp  abort" Wrong machine type"
     71   flash-buf h# f.ffc0 +  h# 10  type cr
    8172
    8273   ?crc
     
    281272: erase-firmware  ( -- )
    282273   h# 100000 /flash-block  do   (cr i .x  i flash-erase-block  /flash-block +loop  cr
     274;
     275
     276: check-firmware-image  ( adr len -- adr len )
     277   dup /flash <>  abort" Wrong image length"      ( adr len )
     278   2dup +  h# 40 -                                ( adr len signature-adr )
     279   dup " CL1" comp  abort" No firmware signature" ( adr len signature-adr )
     280   ." Firmware: " h# 10 type                      ( adr len )
     281   \ XXX add some more sanity checks
    283282;
    284283
Note: See TracChangeset for help on using the changeset viewer.