I have begun doing work with OpenBIOS. I was wondering if it is
possible to compile OpenBIOS for PowerPC on Mac OS X? If not, what
Linux distro should I use? Any advice would really help.
Hi all,
So given that the Fcode evaluator is sorted for Solaris 10, I thought
I'd try my original Solaris 9 disk image again and was surprised to find
that it didn't boot.
Further investigation seems to show that strangely encoded device names
are being passed into cif-open which is failing:
: get-file ( 6000 ffe35870 27 )
00000000ffe36378: fname>devname$
3 > 2dup type /platform/OpenBiosTeam,OpenBIOS/ufsboot ok
3 > resume ok
( 6000 ffe35870 27 )
00000000ffe36378: fname>devname$ ( 6000 ffe35ee8 2f )
00000000ffe36380: ufs-fopen
3 > 2dup type cdrom:a,|platform|OpenBiosTeam,OpenBIOS|ufsboot ok
3 > resume ok
( 6000 ffe35ee8 2f )
00000000ffe36380: ufs-fopen
: ufs-fopen ( 6000 ffe35ee8 2f )
00000000ffe360e8: drop ( 6000 ffe35ee8 )
00000000ffe360f0: cif-open ( 6000 0 )
00000000ffe360f8: (semis)
: get-file ( 6000 ffe35870 17 )
00000000ffe36378: fname>devname$
3 > 2dup type /platform/sun4u/ufsboot ok
3 > resume ok
( 6000 ffe35870 17 )
00000000ffe36378: fname>devname$ ( 6000 ffe35ee8 1f )
00000000ffe36380: ufs-fopen
3 > 2dup type cdrom:a,|platform|sun4u|ufsboot ok
3 > resume ok
( 6000 ffe35ee8 1f )
00000000ffe36380: ufs-fopen
: ufs-fopen ( 6000 ffe35ee8 1f )
00000000ffe360e8: drop ( 6000 ffe35ee8 )
00000000ffe360f0: cif-open OFMEM: ofmem_claim_virt virt=ffffffffffffffff
size=0000000000000200 align=0000000000000001
( 6000 0 )
00000000ffe360f8: (semis)
It looks as if a special type of device-specifier is being passed into
cif-open consisting of a device and argument, a comma, then the actual
filename required with /s replaced by |s.
Is this some kind of special syntax that needs to be taught to the dev
word and/or cif-open words?
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
Hi folks,
I've been trying to use OpenBIOS with QEMU, and I've had trouble
getting it to boot any PowerPC-based OS discs (Linux, Mac OS X, etc).
OpenBIOS just doesn't seem to find anything bootable. If I try booting
QEMU with -nographic, I get this output (I get the same with a
self-built openbios-qemu.elf from the OpenBIOS SVN as well):
---- snip ----
>> =============================================================
>> OpenBIOS 1.0 [Apr 12 2009 00:55]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 128M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,970FX
Welcome to OpenBIOS v1.0 built on Apr 12 2009 00:55
>> ELF - yaboot_startup: Entering boot, no path
>> ELF - try_bootinfo: Trying hd:0,ppc\bootinfo.txt
>> ELF - try_bootinfo: Can't open hd:0,ppc\bootinfo.txt
>> ELF - try_path: Trying hd:2,\ofclient
>> ELF - try_path: Can't open hd:2,\ofclient
>> ELF - try_path: Trying hd:2,\yaboot conf=hd:2,\yaboot.conf
>> ELF - try_path: Can't open hd:2,\yaboot
>> *** Boot failure! No secondary bootloader specified ***
---- snip ----
Laurent Vivier suggested in this conversation in February
(http://lists.openbios.org/pipermail/openbios/2009-February/003476.html)
that there could be a bug in partition map decoding. Has such a bug
been confirmed? I was trying to find the bug myself (I am an
experienced C/C++ programmer), but the bug seems to be subtle, and my
lack of familiarity with the code base doesn't help much.
I've been trying to figure this out for 7 hours straight now... Any
advice or other help would be much appreciated!
- Steven
Meanwhile qemu-system-sparc is good enough to boot most Solaris
versions with OBP.
( http://tyom.blogspot.com/2009/12/solaris-under-qemu-how-to.html )
I'm trying to find out what is missing in OpenBIOS to do the same.
Currently the boot just hangs.
I did a wild guess:
$ strings sun4m/ufsboot
...
['] find-device catch if 2drop true else current-device device-end then swap l!
...
It looks like all the keywords are known to the OpenBIOS, but I can't
input the test string:
" /options" ['] find-device catch if 2drop true else current-device
device-end then swap l!
it is longer than 80 characters, and OpenBIOS lets me enter only the
part of the string up to "device-end t".
The questions are:
- is it just an interactive command line limitation, or an api limitation?
- where is it defined? I couldn't find anything useful with grep -r 80 .
- is there a forth debugger in OpenBIOS?
--
Regards,
Artyom Tarasenko
solaris/sparc under qemu progress: http://tyom.blogspot.com/
>> Is there a word that can tell me the name of the current word that is executing?
>>
>> I want something like this:
>>
>> : myword
>> obtainWord
>> ;
>>
>> obtainWord would somehow return "myword". Any tips would be great.
>
> No, I don't think this is really possible because of the way in which
> Forth works (at least I ended up using a different solution for the
> debugger anyway).
>
> Is there a reason that you're not using the in-built debugger for this?
> I'm fairly sure it would make your life much easier.
I'm making code that will associate a value with a function name and will store both in a table. Thank you Mark and Stefan for helping.
I am trying to make a word that does one thing at compile time, and does another thing at runtime. I think this is how you do it:
: myword
." one"
does> ." two"
cr ;
When I first use this word, I see "one". Then when I use this word again, I see "two", but it causes OpenBIOS to panic because of a segmentation violation at 3. Is this an OpenBIOS bug, or did I do something wrong?
Is there a word that can tell me the name of the current word that is executing?
I want something like this:
: myword
obtainWord
;
obtainWord would somehow return "myword". Any tips would be great.
Author: blueswirl
Date: Sun Mar 28 22:48:53 2010
New Revision: 718
URL: http://tracker.coreboot.org/trac/openbios/changeset/718
Log:
Add missing newline
Fixes build:
CC target/arch/sparc64/boot.o
In file included from ../arch/sparc64/boot.c:14:
../include/libopenbios/forth_load.h:22:28: error: no newline at end of file
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/include/libopenbios/forth_load.h
Modified: trunk/openbios-devel/include/libopenbios/forth_load.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/forth_load.h Sun Mar 28 22:18:30 2010 (r717)
+++ trunk/openbios-devel/include/libopenbios/forth_load.h Sun Mar 28 22:48:53 2010 (r718)
@@ -19,4 +19,4 @@
extern int forth_load(const char *filename);
-#endif /* _H_FORTHLOAD */
\ No newline at end of file
+#endif /* _H_FORTHLOAD */