[openfirmware] [commit] r1975 - cpu/x86/pc/olpc/images cpu/x86/pc/olpc/via ofw/gui
repository service
svn at openfirmware.info
Wed Oct 13 01:07:52 CEST 2010
Author: wmb
Date: Wed Oct 13 01:07:52 2010
New Revision: 1975
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1975
Log:
OLPC XO-1.5 - Added menu for dual-booting, including changes in the menu code to support per-menu icon size and layout grid.
Added:
cpu/x86/pc/olpc/images/settings.565 (contents, props changed)
cpu/x86/pc/olpc/images/settings.bmp (contents, props changed)
cpu/x86/pc/olpc/images/tux.565 (contents, props changed)
cpu/x86/pc/olpc/images/tux.bmp (contents, props changed)
cpu/x86/pc/olpc/images/winlogo.565 (contents, props changed)
cpu/x86/pc/olpc/images/winlogo.bmp (contents, props changed)
Modified:
cpu/x86/pc/olpc/via/fw.bth
cpu/x86/pc/olpc/via/mfgtest.fth
cpu/x86/pc/olpc/via/olpc.bth
ofw/gui/iconmenu.fth
ofw/gui/insticon.fth
ofw/gui/menumisc.fth
Added: cpu/x86/pc/olpc/images/settings.565
==============================================================================
Binary file. No diff available.
Added: cpu/x86/pc/olpc/images/settings.bmp
==============================================================================
Binary file. No diff available.
Added: cpu/x86/pc/olpc/images/tux.565
==============================================================================
Binary file. No diff available.
Added: cpu/x86/pc/olpc/images/tux.bmp
==============================================================================
Binary file. No diff available.
Added: cpu/x86/pc/olpc/images/winlogo.565
==============================================================================
Binary file. No diff available.
Added: cpu/x86/pc/olpc/images/winlogo.bmp
==============================================================================
Binary file. No diff available.
Modified: cpu/x86/pc/olpc/via/fw.bth
==============================================================================
--- cpu/x86/pc/olpc/via/fw.bth Wed Oct 13 00:16:13 2010 (r1974)
+++ cpu/x86/pc/olpc/via/fw.bth Wed Oct 13 01:07:52 2010 (r1975)
@@ -309,7 +309,6 @@
fload ${BP}/ofw/gui/loadmenu.fth
patch merge-rect-565 merge-rect merge-cursor \ Hack since we do all our user-level graphics in 565
patch merge-rect-565 merge-rect merge-cursor \ Hack since we do all our user-level graphics in 565
-fload ${BP}/ofw/gui/insticon.fth
fload ${BP}/cpu/x86/pc/olpc/via/cstate.fth \ C-state tests
@@ -317,6 +316,7 @@
\ so exiting from emacs doesn't invoke the diag menu.
' quit to user-interface
fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth
+fload ${BP}/cpu/x86/pc/olpc/via/bootmenu.fth
: screen-#lines ( -- n )
screen-ih 0= if default-#lines exit then
@@ -645,6 +645,12 @@
;
[then]
+: ?boot-menu ( -- )
+ button-rotate game-key? if
+ protect-fw visible bootmenu
+ then
+;
+
: ?fs-update ( -- )
button-check button-x or button-o or button-square or ( mask )
game-key-mask = if protect-fw try-fs-update then
@@ -707,6 +713,8 @@
?usb-keyboard
auto-banner? if banner then
+ ?boot-menu
+
auto-boot
frozen? text-on? 0= and ( no-banner? )
Modified: cpu/x86/pc/olpc/via/mfgtest.fth
==============================================================================
--- cpu/x86/pc/olpc/via/mfgtest.fth Wed Oct 13 00:16:13 2010 (r1974)
+++ cpu/x86/pc/olpc/via/mfgtest.fth Wed Oct 13 01:07:52 2010 (r1975)
@@ -197,6 +197,12 @@
;
: full-menu ( -- )
+ d# 4 to rows
+ d# 5 to cols
+ d# 180 to sq-size
+ d# 128 to image-size
+ d# 128 to icon-size
+
olpc-menu-items
" Run all non-interactive tests. (Press a key between tests to stop.)"
Modified: cpu/x86/pc/olpc/via/olpc.bth
==============================================================================
--- cpu/x86/pc/olpc/via/olpc.bth Wed Oct 13 00:16:13 2010 (r1974)
+++ cpu/x86/pc/olpc/via/olpc.bth Wed Oct 13 01:07:52 2010 (r1975)
@@ -189,6 +189,10 @@
" ${BP}/cpu/x86/pc/olpc/via/build/nandblaster15_rx.bin" " nb15_rx" $add-deflated-dropin
" ${BP}/cpu/x86/pc/olpc/via/build/nandblaster_tx.bin" " nb_tx" $add-deflated-dropin
+ " ${BP}/cpu/x86/pc/olpc/images/winlogo.565" " winlogo.565" $add-deflated-dropin
+ " ${BP}/cpu/x86/pc/olpc/images/tux.565" " tux.565" $add-deflated-dropin
+ " ${BP}/cpu/x86/pc/olpc/images/settings.565" " settings.565" $add-deflated-dropin
+
.( Dropin top is ) ofd @ fsize .x cr
[ifdef] coreboot-loaded
Modified: ofw/gui/iconmenu.fth
==============================================================================
--- ofw/gui/iconmenu.fth Wed Oct 13 00:16:13 2010 (r1974)
+++ ofw/gui/iconmenu.fth Wed Oct 13 01:07:52 2010 (r1975)
@@ -38,10 +38,10 @@
headers
d# 32 value version-height
-4 constant rows
-5 constant cols
+4 value rows
+5 value cols
headerless
-rows cols * constant squares
+: squares rows cols * ;
d# 180 value sq-size
d# 128 value image-size \ on file
d# 128 value icon-size \ on screen
@@ -89,15 +89,14 @@
struct
/n field >icon
- /n field >pixels
/n field >function
/n field >border
2 /n * field >help \ Brief description
\ 32 field >label \ later...
dup constant /entry
squares * buffer: squarebuf
-icon-size dup * 2 * constant /icon
-image-size dup * 2 * 8 + constant /image
+: /icon icon-size dup * 2 * ;
+: /image image-size dup * 2 * 8 + ;
: sq ( sq - a ) sq? /entry * squarebuf + ;
@@ -231,26 +230,32 @@
then
;
-: load-icon ( sq -- )
- sq dup >pixels @ 0= if ( sq-adr )
- dup >icon @ count load-pixels ( sq-adr pix-adr )
- swap >pixels ! ( )
- else
- drop ( )
+: (icon>pixels) ( apf -- 'pixels )
+ ta1+ dup @ ?dup if ( 'icon 'pixels )
+ nip ( 'pixels )
+ else ( 'icon )
+ dup na1+ count load-pixels ( 'icon 'pixels )
+ tuck swap ! ( 'pixels )
then
;
+\ Defining word for icon images
+: icon: ( "name" "devicename" -- ) ( child: -- 'pixels )
+ create ['] (icon>pixels) token, 0 , parse-word ",
+;
+: icon>pixels ( icon-apf -- 'pixels ) dup token@ execute ;
+
: draw-sq ( sq -- )
- dup -1 = if exit then
- background over sq>xy sq-size dup fill-rectangle
- dup sq >border @ over draw-border
- dup sq >icon @ if
- dup load-icon
- dup sq >pixels @
- swap sq>xy sq-size icon-size - 2/ tuck + -rot + swap
- icon-size dup draw-rectangle
- lowlight \ draw border
- else
+ dup -1 = if exit then ( sq )
+ background over sq>xy sq-size dup fill-rectangle ( sq )
+ dup sq >border @ over draw-border ( sq )
+ dup sq >icon @ ?dup if ( sq 'icon )
+ icon>pixels ( sq 'pixels )
+ swap sq>xy sq-size icon-size - 2/ ( 'pixels x y size )
+ tuck + -rot + swap ( 'pixels x' y' )
+ icon-size dup draw-rectangle ( )
+ lowlight \ draw border ( )
+ else ( sq )
drop
then
;
@@ -281,7 +286,7 @@
;
: refresh ( - )
draw-background
- squares 0 do i draw-sq loop
+ squares 0 ?do i draw-sq loop
set-description-region
highlight describe
;
Modified: ofw/gui/insticon.fth
==============================================================================
--- ofw/gui/insticon.fth Wed Oct 13 00:16:13 2010 (r1974)
+++ ofw/gui/insticon.fth Wed Oct 13 01:07:52 2010 (r1975)
@@ -1,6 +1,8 @@
\ See license at end of file
purpose: Icon menu screen layout for Power Firmware demonstration version
+icon: exit.icon ${BP}/ofw/gui/exeunt.icx
+
\ fload ${BP}/ofw/gui/macosi.fth \ Boot/install MacOS items
\ fload ${BP}/ofw/gui/nti.fth \ Boot/install NT items
\ fload ${BP}/ofw/gui/aixi.fth \ Boot AIX item
Modified: ofw/gui/menumisc.fth
==============================================================================
--- ofw/gui/menumisc.fth Wed Oct 13 00:16:13 2010 (r1974)
+++ ofw/gui/menumisc.fth Wed Oct 13 01:07:52 2010 (r1975)
@@ -50,12 +50,6 @@
does> dup na1+ swap @ ( adr len )
;
-\ Defining word for icon images
-: icon: ( "name" "devicename" -- ) ( child: -- adr )
- create parse-word ",
-;
-
-icon: exit.icon ${BP}/ofw/gui/exeunt.icx
\ LICENSE_BEGIN
\ Copyright (c) 2006 FirmWorks
\
More information about the openfirmware
mailing list