Author: wmb
Date: Mon Nov 15 22:21:13 2010
New Revision: 2023
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2023
Log:
OLPC XO-1.75 - implemented expand-rect to eliminate compile-time warning.
Modified:
ofw/gui/iconmenu.fth
Modified: ofw/gui/iconmenu.fth
==============================================================================
--- ofw/gui/iconmenu.fth Sat Nov 13 00:57:55 2010 (r2022)
+++ ofw/gui/iconmenu.fth Mon Nov 15 22:21:13 2010 (r2023)
@@ -177,6 +177,30 @@
c;
[then]
+[ifdef] arm-assembler
+code expand-rect ( src dst w h --- )
+ mov r0,tos \ r0: Height of source image in pixels
+ ldmia sp!,{r1,r2,r3,tos} \ r1: Width of source, r2: dst address, r3: src address
+ begin
+ add r5,r3,r1,lsl #2 \ End address for this line
+ begin
+ ldrh r4,[r3] \ Get pixel value
+ inc r3,#2 \ Increment src
+ strh r4,[r2] \ Write pixel to dst
+ strh r4,[r2,#2] \ Duplicate pixel on this line
+ inc r2,#256 \ Next destination line
+ strh r4,[r2] \ Write pixel to next line
+ strh r4,[r2,#2] \ Duplicate pixel on next line
+ dec r2,#256 \ Back to original destination line
+ inc r2,#4 \ Next destination pixel
+ cmp r3,r5 \ End?
+ = until
+ inc r2,#256 \ Skip the next output line - already written
+ decs r0,#1
+ 0= until
+c;
+[then]
+
: expand-icon ( adr - eadr )
/icon alloc-mem tuck ( eadr adr eadr )
dup /icon 0 fill \ temp - clear old data
Hello Gleb,
Am 01.11.2010 um 15:15 schrieb Gleb Natapov:
> I tried to compile openfirmware for qemu like described here
> http://www.openfirmware.info/Building_OFW_for_QEMU. But after running
> make in cpu/x86/pc/emu/build on 64bit host I get linkage error:
> ld -T inflate.ld inflate.lo -o inflate.o
> ld: i386 architecture of input file `inflate.lo' is incompatible
> with i386:x86-64 output
>
> After applying this patch:
> Index: cpu/x86/Linux/Makefile
> ===================================================================
> --- cpu/x86/Linux/Makefile (revision 1996)
> +++ cpu/x86/Linux/Makefile (working copy)
> @@ -34,7 +34,7 @@
> ${CC} -c -m32 -Wall -fno-stack-protector -ffreestanding -
> D_FORTIFY_SOURCE=0 -DNEED_BCOPY -O3 -fpic $< -o $@
>
> inflate.o: inflate.lo
> - ${LD} -T inflate.ld $< -o $@
> + ${LD} -melf_i386 -T inflate.ld $< -o $@
Can't say much about OFW but since no one has replied yet: maybe try
specifying OUTPUT_FORMAT(elf_i386) in inflate.ld or check where LD
gets defined? Not sure if this code is supposed to build for both
architectures or just 32-bit x86.
You may find better answers on the openfirmware list (cc'ed):
http://www.openfirmware.info/mailman/listinfo/openfirmware
Andreas
>
> ../build/inflate.bin: inflate.o
> objcopy -O binary $< $@
>
> ====
> compilation goes a little bit further but now it stops with:
> ./build emuofw.rom
> --- Rebuilding ohci.fc
> --- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../ohci.bth
>
> ${BP}/dev/usb2/hcd/ohci/ohci.fth:25: my-w@ ?
>
> don't know much forth so just commented every line that gave me an
> error:
>
> Index: dev/usb2/hcd/ohci/ohci.fth
> ===================================================================
> --- dev/usb2/hcd/ohci/ohci.fth (revision 1996)
> +++ dev/usb2/hcd/ohci/ohci.fth (working copy)
> @@ -22,12 +22,12 @@
> 0 value ohci-reg
>
> : map-regs ( -- )
> - 4 my-w@ h# 16 or 4 my-w!
> - 0 0 my-space h# 0200.0010 + 1000 map-in to ohci-reg
> +\ 4 my-w@ h# 16 or 4 my-w!
> +\ 0 0 my-space h# 0200.0010 + 1000 map-in to ohci-reg
> ;
>
> : unmap-regs ( -- )
> - ohci-reg 1000 map-out 0 to ohci-reg
> +\ ohci-reg 1000 map-out 0 to ohci-reg
> ;
>
> : ohci-reg@ ( idx -- data ) ohci-reg + rl@ ;
> ========
> After that compilation finally succeeded.
>
> Produced rom image runs fine on qemu, but fails on qemu-kvm with
> error:
> BUG: kvm_dirty_pages_log_change: invalid parameters
> 0000000010000000-0000000010ffffff
>
> Looking into it it seams like openfirmware configure cirrus
> framebuffer to be
> at address 0x10000000, but later it configures nic memory BAR with the
> same address (during device enumeration perhaps). Later it
> deconfigures
> nic again. Qemu somehow handles this fine, but qemu-kvm doesn't. This
> shouldn't work on real HW too FWIW.
>
> --
> Gleb.
>
> --
> OpenBIOS http://openbios.org/
> Mailinglist: http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you
Author: quozl
Date: Thu Nov 11 06:07:25 2010
New Revision: 2017
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2017
Log:
review, fix trailing blanks, change CUSTOMER to SHIP tag
Modified:
cpu/x86/pc/olpc/via/mfgtests.txt
Modified: cpu/x86/pc/olpc/via/mfgtests.txt
==============================================================================
--- cpu/x86/pc/olpc/via/mfgtests.txt Sat Nov 6 00:04:42 2010 (r2016)
+++ cpu/x86/pc/olpc/via/mfgtests.txt Thu Nov 11 06:07:25 2010 (r2017)
@@ -45,7 +45,7 @@
it performs tag exchange with the "MS" server and rewrites the tags to
the value the server specified (examples below).
-=== ASSY state ===
+=== ASSY state ===
Entry condition:
@@ -54,7 +54,7 @@
BD=u:\boot\olpc.fth net
The booted (from the net, using TFTP etc) script does the tag
-exchange, runs any "Command:" pseudo-tags, and rewrites the tags.
+exchange, runs any "Command:" pseudo-tags, and rewrites the tags.
The next state is RUNIN.
The response includes one or more "Command:<Forth_commands>" lines.
@@ -109,7 +109,7 @@
Tell operator to move to the download station and insert USB LAN
wait-lan
wait-scanner
- tag exchange with server
+ tag exchange with server
barcode scan of serial number to verify that the board and case are still paired
the filename used in the tag exchange is based on the SN, despite
the additional cross-checking that would be available if it were
@@ -141,7 +141,7 @@
* Once the machine leaves the factory, it does not contain any
information about factory server names or their credentials.
- (The tags containing that information are deleted for CUSTOMER
+ (The tags containing that information are deleted for SHIP
state, and the Linux-based runin scripts contain no hardcoded
factory server identification.)