Author: quozl Date: Fri Nov 25 05:16:14 2011 New Revision: 2703 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2703
Log: OLPC XO-1 XO-1.5 XO-1.75 - show progress bar during automatic OpenFirmware reflashing, two dots per flash block, show not enough power icon ... on XO-1 only the dots are shown because of a smaller icon collection. Tested on XO-1, XO-1.5, XO-1.75.
Modified: cpu/x86/pc/olpc/security.fth dev/olpc/spiflash/spiui.fth
Modified: cpu/x86/pc/olpc/security.fth ============================================================================== --- cpu/x86/pc/olpc/security.fth Thu Nov 24 07:38:35 2011 (r2702) +++ cpu/x86/pc/olpc/security.fth Fri Nov 25 05:16:14 2011 (r2703) @@ -994,6 +994,7 @@ ['] ?enough-power catch ?dup if visible red-letters + show-no-power ." Unsafe to update firmware now - " .error ." Continuing with old firmware" cr black-letters @@ -1004,6 +1005,7 @@
ec-indexed-io-off? if visible + show-reflash ." Restarting to enable SPI FLASH writing." cr d# 3000 ms ec-ixio-reboot @@ -1013,6 +1015,8 @@ \ Latch alternate? flag for next startup alternate? if [char] A h# 82 cmos! then
+ show-reflash + ['] show-reflash-dot to spi-progress reflash \ Should power-off and reboot show-x " Reflash returned, unexpectedly" .security-failure
Modified: dev/olpc/spiflash/spiui.fth ============================================================================== --- dev/olpc/spiflash/spiui.fth Thu Nov 24 07:38:35 2011 (r2702) +++ dev/olpc/spiflash/spiui.fth Fri Nov 25 05:16:14 2011 (r2703) @@ -8,6 +8,8 @@
h# 4000 constant /chunk \ Convenient sized piece for progress reports
+defer spi-progress ' drop to spi-progress ( n -- ) + : write-flash-range ( adr end-offset start-offset -- ) ." Writing" cr ?do ( adr ) @@ -24,6 +26,7 @@ i flash-erase-block dup /flash-block i flash-write ( adr ) then + i 5 rshift dup spi-progress h# 400 + spi-progress ( adr ) /flash-block + ( adr' ) /flash-block +loop ( adr ) cr drop ( )
openfirmware@openfirmware.info