Changeset 3349


Ignore:
Timestamp:
Oct 3, 2012, 9:40:57 PM (3 years ago)
Author:
wmb
Message:

OLPC trac 12129 - Changed the search order for .zip bundles to look for the platform-specific suffix first, falling back to the generic name.

Location:
cpu
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/1.75/config.fth

    r3117 r3349  
    2727: compatible$   " olpc,xo-1.75"  ;
    2828: ec-platform$  ( -- adr len )  " 4"  ;
     29: bundle-suffix$  ( -- adr len )  " 4"  ;
    2930
    3031d#  9999 constant machine-type  \ Backwards compatibility with non-device-tree kernel
  • cpu/arm/olpc/3.0/config.fth

    r3117 r3349  
    2626: compatible$  " olpcxo-3.0"  ;
    2727: ec-platform$  ( -- adr len )  " 5"  ;
     28: bundle-suffix$  ( -- adr len )  " 3"  ;
    2829
    2930d# 10000 constant machine-type  \ Backwards compatibility with non-device-tree kernel
  • cpu/arm/olpc/4.0/config.fth

    r3308 r3349  
    2424: compatible$  " olpc,xo-cl4"  ;
    2525: ec-platform$  ( -- adr len )  " 7"  ;
     26: bundle-suffix$  ( -- adr len )  " 5"  ;
    2627
    2728d# 10001 constant machine-type  \ Backwards compatibility with non-device-tree kernel
  • cpu/arm/olpc/build-fw.fth

    r3324 r3349  
    669669fload ${BP}/cpu/x86/pc/olpc/guardrtc.fth
    670670fload ${BP}/cpu/x86/pc/olpc/security.fth
    671 [ifdef] olpc-cl4  4  [else]  2  [then]  to bundle-suffix
    672671
    673672stand-init: xid
  • cpu/arm/olpc/cl4/config.fth

    r3304 r3349  
    2323: compatible$  " olpc,xo-cl4"  ;
    2424: ec-platform$  ( -- adr len )  " 7"  ;
     25: bundle-suffix$  ( -- adr len )  " 4"  ;
    2526
    2627d# 10001 constant machine-type  \ Backwards compatibility with non-device-tree kernel
  • cpu/x86/pc/olpc/config.fth

    r3327 r3349  
    4141create machine-signature ," CL1"
    4242: signature$  machine-signature count  ;
     43: bundle-suffix$  ( -- adr len )  " 0"  ;
    4344
    4445fload ${BP}/cpu/x86/pc/olpc/addrs.fth
  • cpu/x86/pc/olpc/security.fth

    r3317 r3349  
    442442   " Trying " ?lease-debug  2dup ?lease-debug-cr
    443443;
    444 0 value bundle-suffix
    445 : bundle-present?  ( fn$ -- flag )
    446    fn-buf place
    447 
    448    \ unadorned names not supported from XO-4 onwards
    449    bundle-suffix 4 < if
    450       \ Try the unadorned name first
    451       bundle-name$  .trying
    452       ['] (boot-read) catch  0=  if  true exit  then   ( x x )
    453       2drop                                            ( )
    454    then
    455 
    456    \ Unadorned name not present; try again with architecture-dependent numeric suffix
    457    bundle-suffix push-decimal (.) pop-base   ( adr len )
    458    fn-buf $cat                               ( )
    459 
     444
     445: $try-name  ( basename$ suffix$ -- found? )
     446   2swap fn-buf place  fn-buf $cat
    460447   bundle-name$  .trying
    461    ['] (boot-read) catch  0=  if  true exit  then   ( x x )
    462    2drop                                            ( )
    463 
    464    false
     448   ['] (boot-read) catch  if  2drop false  else  true  then
     449;
     450
     451: bundle-present?  ( fn$ -- found? )
     452   \ Try first with architecture-dependent numeric suffix
     453   2dup bundle-suffix$ $try-name  if   ( fn$ )
     454      2drop true exit                  ( -- true )
     455   then                                ( fn$ )
     456
     457   \ Failing that, try the unadorned name
     458   " "  $try-name
    465459;
    466460
  • cpu/x86/pc/olpc/via/config.fth

    r3328 r3349  
    5353create machine-signature ," CL1"
    5454: signature$  machine-signature count  ;
     55: bundle-suffix$  ( -- adr len )  " 1"  ;
    5556
    5657fload ${BP}/cpu/x86/pc/olpc/via/addrs.fth
  • cpu/x86/pc/olpc/via/fw.bth

    r3194 r3349  
    432432fload ${BP}/cpu/x86/pc/olpc/guardrtc.fth
    433433fload ${BP}/cpu/x86/pc/olpc/security.fth
    434 1 to bundle-suffix
    435434fload ${BP}/cpu/x86/pc/olpc/xpsecure.fth
    436435fload ${BP}/ofw/gui/ofpong.fth
Note: See TracChangeset for help on using the changeset viewer.