| 1 |
\ OLPC XO boot script |
| 2 |
|
| 3 |
: check-ofw-version ( -- ) |
| 4 |
" /" find-device " compatible" get-property |
| 5 |
abort" No compatible property on /" ( -- compatible$ ) |
| 6 |
|
| 7 |
\ Good compatible strings |
| 8 |
" mrvl,mmp2" 2over sindex -1 <> if 2drop exit then |
| 9 |
" marvell,mmp3" 2over sindex -1 <> if 2drop exit then |
| 10 |
|
| 11 |
\ Try to be helpful |
| 12 |
cr |
| 13 |
" olpc,xo-1.75" 2swap sindex -1 <> if |
| 14 |
." Firmware Q4E00 or newer is needed to boot a Devicetree enabled kernel." cr |
| 15 |
cr |
| 16 |
." One way to update is to copy http://dev.laptop.org/~quozl/q4e00ja.rom" cr |
| 17 |
." to a FAT partition on a USB flash stick and run ""flash u:\q4e00ja.rom""" cr |
| 18 |
" show-sad" eval |
| 19 |
else |
| 20 |
." This hardware or firmware revision is not supported. Sorry." cr |
| 21 |
then |
| 22 |
cr |
| 23 |
." Aborting boot." cr |
| 24 |
abort |
| 25 |
; |
| 26 |
|
| 27 |
: set-model |
| 28 |
\ Make sure the model is sensible -- flash-kernel relies on this. |
| 29 |
" model" delete-property |
| 30 |
" OLPC XO-1.75" " model" string-property |
| 31 |
; |
| 32 |
|
| 33 |
visible unfreeze |
| 34 |
check-ofw-version |
| 35 |
set-model |
| 36 |
|
| 37 |
" last:\@@KERNEL@@" to boot-device |
| 38 |
" last:\@@INITRD@@" to ramdisk |
| 39 |
" @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ @@LINUX_KERNEL_CMDLINE@@" to boot-file |
| 40 |
|
| 41 |
boot |