Author: quozl Date: Wed Feb 15 09:04:02 2012 New Revision: 2866 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2866
Log: OLPC XO-1 - add diagnostics menu, #11622
Added: cpu/x86/pc/olpc/testicons.bth cpu/x86/pc/olpc/testitems.fth Modified: cpu/x86/pc/olpc/devices.fth cpu/x86/pc/olpc/fw.bth cpu/x86/pc/olpc/loaddropins.fth cpu/x86/pc/olpc/olpc.bth
Modified: cpu/x86/pc/olpc/devices.fth ============================================================================== --- cpu/x86/pc/olpc/devices.fth Wed Feb 15 01:29:24 2012 (r2865) +++ cpu/x86/pc/olpc/devices.fth Wed Feb 15 09:04:02 2012 (r2866) @@ -100,7 +100,7 @@ 0 0 " 10000" " /flash" begin-package " dropins" device-name
- h# c0000 constant /device + h# f0000 constant /device fload ${BP}/dev/subrange.fth end-package
Modified: cpu/x86/pc/olpc/fw.bth ============================================================================== --- cpu/x86/pc/olpc/fw.bth Wed Feb 15 01:29:24 2012 (r2865) +++ cpu/x86/pc/olpc/fw.bth Wed Feb 15 09:04:02 2012 (r2866) @@ -304,9 +304,12 @@ : .clock ( -- ) time&date .date space .time ." UTC" cr ; -fload ${BP}/cpu/x86/pc/olpc/banner.fth
+fload ${BP}/cpu/x86/pc/olpc/banner.fth fload ${BP}/ofw/gui/loadmenu.fth +fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth +fload ${BP}/cpu/x86/pc/olpc/testitems.fth + false value smt-test? false value final-test? fload ${BP}/cpu/x86/pc/olpc/disptest.fth \ fload ${BP}/ofw/gui/insticon.fth @@ -559,7 +562,7 @@ : ?diags ( -- ) rocker-left game-key? if protect-fw - text-on " test-all" ['] eval guarded + text-on ['] gamekey-auto-menu guarded ." Tests complete - powering off" cr d# 5000 ms power-off then ; @@ -656,11 +659,6 @@
fload ${BP}/cpu/x86/pc/olpc/diskspeed.fth \ Mass storage speed test
-\ #10778 disable menu -warning @ warning off -: menu ; -warning ! - \ This helps with TeraTerm, which sends ESC-O as the arrow key prefix also hidden also keys-forth definitions warning @ warning off
Modified: cpu/x86/pc/olpc/loaddropins.fth ============================================================================== --- cpu/x86/pc/olpc/loaddropins.fth Wed Feb 15 01:29:24 2012 (r2865) +++ cpu/x86/pc/olpc/loaddropins.fth Wed Feb 15 09:04:02 2012 (r2866) @@ -49,7 +49,6 @@ " ${BP}/cpu/x86/pc/olpc/images/wireless.565" " wlan.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/xo.565" " xo.565" $add-deflated-dropin " ${BP}/cpu/x86/pc/olpc/images/sd.565" " ext.565" $add-deflated-dropin - " ${BP}/cpu/x86/pc/olpc/images/spi.565" " spi.565" $add-deflated-dropin
" ${BP}/ofw/termemu/15x30pc.psf" " font" $add-deflated-dropin [ifdef] use-ega
Modified: cpu/x86/pc/olpc/olpc.bth ============================================================================== --- cpu/x86/pc/olpc/olpc.bth Wed Feb 15 01:29:24 2012 (r2865) +++ cpu/x86/pc/olpc/olpc.bth Wed Feb 15 09:04:02 2012 (r2866) @@ -30,6 +30,7 @@ in: ${BP}/dev/pci/build/pcibridg.fc in: ${BP}/cpu/x86/pc/olpc/build/dsdt.aml in: ${BP}/cpu/x86/pc/olpc/build/mcastnand.bin +in: testicons.bin
build-now
@@ -54,6 +55,10 @@ ?do h# ff ofd @ fputc loop ;
+\ Tell the dropin manager to skip the area reserved for manufacturing data +h# e0000 to reserved-start +h# f0000 to reserved-end + .( --- Saving as ) " ${FW_VERSION}.rom" expand$ 2dup lower ( adr len ) 2dup type cr ( adr len ) @@ -81,6 +86,22 @@ \ " ${BP}/cpu/x86/pc/olpc/build/multicast-nand/mcastnand.elf" " mcastnand" $add-deflated-dropin \ " ${BP}/cpu/x86/pc/olpc/build/blaster.bin" " blaster" $add-deflated-dropin \ " ${BP}/cpu/x86/pc/olpc/build/cloner.bin" " cloner" $add-deflated-dropin + " testicons/play.565" " play.565" $add-deflated-dropin + " testicons/quit.565" " quit.565" $add-deflated-dropin + " testicons/cpu.565" " cpu.565" $add-deflated-dropin + " testicons/spi.565" " spi.565" $add-deflated-dropin + " testicons/ram.565" " ram.565" $add-deflated-dropin + " testicons/sdcard.565" " sdcard.565" $add-deflated-dropin + " testicons/keyboard.565" " keyboard.565" $add-deflated-dropin + " testicons/display.565" " display.565" $add-deflated-dropin + " testicons/touchpad.565" " touchpad.565" $add-deflated-dropin + " testicons/audio.565" " audio.565" $add-deflated-dropin + " testicons/usb.565" " usb.565" $add-deflated-dropin + " testicons/battery.565" " battery.565" $add-deflated-dropin + " testicons/camera.565" " camera.565" $add-deflated-dropin + " testicons/wifi.565" " wifi.565" $add-deflated-dropin + " testicons/clock.565" " clock.565" $add-deflated-dropin + " testicons/timer.565" " timer.565" $add-deflated-dropin
/rom h# 400 - pad-file \ rmstart image must start 0x400 from end " rmstart.img" $add-file
Added: cpu/x86/pc/olpc/testicons.bth ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ cpu/x86/pc/olpc/testicons.bth Wed Feb 15 09:04:02 2012 (r2866) @@ -0,0 +1,11 @@ +purpose: Expand the test icons + +command: &builder &this +build-now + +" tar xfz ../via/testicons.tgz" expand$ $sh + +\ This forces the creation of a .log file, so we don't re-fetch +writing testicons.version +" 1" ofd @ fputs +ofd @ fclose
Added: cpu/x86/pc/olpc/testitems.fth ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ cpu/x86/pc/olpc/testitems.fth Wed Feb 15 09:04:02 2012 (r2866) @@ -0,0 +1,83 @@ +purpose: Platform-specific layout of diagnostic GUI menu items + +d# 5 to #mfgcols +d# 4 to #mfgrows + +icon: cpu.icon rom:cpu.565 +icon: spi.icon rom:spi.565 +icon: ram.icon rom:ram.565 +icon: sdcard.icon rom:sdcard.565 +icon: usb.icon rom:usb.565 +icon: battery.icon rom:battery.565 +icon: camera.icon rom:camera.565 +icon: wifi.icon rom:wifi.565 +icon: audio.icon rom:audio.565 +icon: touchpad.icon rom:touchpad.565 +icon: display.icon rom:display.565 +icon: keyboard.icon rom:keyboard.565 +icon: timer.icon rom:timer.565 +icon: clock.icon rom:clock.565 + +: cpu-item ( -- ) " /cpu" mfg-test-dev ; +: battery-item ( -- ) " /battery" mfg-test-dev ; +: spiflash-item ( -- ) " /flash" mfg-test-dev ; +: memory-item ( -- ) " /memory" mfg-test-dev ; +: usb-item ( -- ) " /usb" mfg-test-dev ; +: ext-sd-item ( -- ) " ext:0" mfg-test-dev ; +: rtc-item ( -- ) " /rtc" mfg-test-dev ; +: display-item ( -- ) " /display" mfg-test-dev ; +: audio-item ( -- ) " /audio" mfg-test-dev ; +: camera-item ( -- ) " /camera" mfg-test-dev ; +: wlan-item ( -- ) " /wlan" mfg-test-dev ; +: timer-item ( -- ) " /timer" mfg-test-dev ; +: touchpad-item ( -- ) " /8042/mouse" mfg-test-dev ; +: keyboard-item ( -- ) " /8042/keyboard" mfg-test-dev ; + +: olpc-test-menu-items ( -- ) + 0 to #mfgtests + 1 0 set-row-col + + " CPU" + ['] cpu-item cpu.icon add-icon + + " SPI Flash: Contains EC code, firmware, manufacturing data." + ['] spiflash-item spi.icon add-icon + + " RAM chips" + ['] memory-item ram.icon add-icon + + " Plug-in SD card" + ['] ext-sd-item sdcard.icon add-icon + + " Wireless LAN" + ['] wlan-item wifi.icon add-icon + + " Display" + ['] display-item display.icon add-icon + + " Camera" + ['] camera-item camera.icon add-icon + + " Audio: Speaker and microphone" + ['] audio-item audio.icon add-icon + + " Battery" + ['] battery-item battery.icon add-icon + + " RTC (Real-Time Clock)" + ['] rtc-item clock.icon add-icon + + " USB ports" + ['] usb-item usb.icon add-icon + + \ These are last because they require user participation. + \ The earlier tests are all included in automatic batch-mode. + + " Keyboard" + ['] keyboard-item keyboard.icon add-icon + + " Touchpad" + ['] touchpad-item touchpad.icon add-icon + +; +' olpc-test-menu-items to test-menu-items