Hi guys,
I just tried to build the current SVN checkout (852) and apparently something tried to boot from CD-ROM which fails when I use the -kernel option.
agraf@lychee:/home/agraf/release/qemu> ./ppc64-softmmu/qemu-system-ppc64 -kernel /home/agraf/release/kvm/vmlinux -initrd /boot/initrd -append "console=ttyPZ0 root=/dev/hda3" -nographic -snapshot /SLES11/debian_lenny_powerpc_small.qcow -L ~/ppc64/bios -enable-kvm -m 512 Could not open option rom 'vgabios.bin': No such file or directory
…
[View More]Could not open option rom 'pxe-ne2k_pci.bin': No such file or directory
C>> annot manage 'OHCI USB controller' PCI device type 'usb':
>> 106b 3f (c 3 10)
>> =============================================================
>> OpenBIOS 1.0 [Aug 17 2010 14:41]
>> Configuration device id QEMU version 1 machine id 3
>> CPUs: 1
>> Memory: 512M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,970FX
Welcome to OpenBIOS v1.0 built on Aug 17 2010 14:41
Trying cd:,\\:tbxi...
Trying cd:,\ppc\bootinfo.txt...
[bctrl in enter_forth jumps to address 0]
If additionally I pass in a CD-ROM image, everything is fine:
agraf@lychee:/home/agraf/release/qemu> ./ppc64-softmmu/qemu-system-ppc64 -kernel /home/agraf/release/kvm/vmlinux -initrd /boot/initrd -append "console=ttyPZ0 root=/dev/hda3" -nographic -snapshot /SLES11/debian_lenny_powerpc_small.qcow -L ~/ppc64/bios -enable-kvm -m 512 -cdrom /SLES11/debian_etch_powerpc_small.qcow
Could not open option rom 'vgabios.bin': No such file or directory
Could not open option rom 'pxe-ne2k_pci.bin': No such file or directory
C>> annot manage 'OHCI USB controller' PCI device type 'usb':
>> 106b 3f (c 3 10)
>> =============================================================
>> OpenBIOS 1.0 [Aug 17 2010 14:41]
>> Configuration device id QEMU version 1 machine id 3
>> CPUs: 1
>> Memory: 512M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,970FX
Welcome to OpenBIOS v1.0 built on Aug 17 2010 14:41
Trying cd:,\\:tbxi...
Trying cd:,\ppc\bootinfo.txt...
>> [ppc] Kernel already loaded (0x01000000 + 0x00d3574c) (initrd 0x02800000 + 0x005d5ea6)
>> [ppc] Kernel command line: console=ttyPZ0 root=/dev/hda3
OF stdout device is: /pci@f0000000/mac-io@e/escc@13000/ch-b@13000
Preparing to boot Linux version 2.6.35-38620-g0195a22-dirty (agraf@lychee) (gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) ) #338 SMP Tue Aug 17 14:00:18 CEST 2010
[...]
Does anyone have an idea what's going on?
Alex
[View Less]
Author: mcayland
Date: Sat Aug 21 12:21:01 2010
New Revision: 854
URL: http://tracker.coreboot.org/trac/openbios/changeset/854
Log:
Alter (encode-bootpath) so that it processes a string on the stack rather than using the parse buffer directly. This enables us
to ensure that execution of any platform-specific boot code can occur before the main "load & go" boot, even if they invoke
Forth commands that alter the parse buffer.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.…
[View More]co.uk>
Modified:
trunk/openbios-devel/forth/admin/userboot.fs
trunk/openbios-devel/forth/debugging/client.fs
Modified: trunk/openbios-devel/forth/admin/userboot.fs
==============================================================================
--- trunk/openbios-devel/forth/admin/userboot.fs Tue Aug 17 17:42:10 2010 (r853)
+++ trunk/openbios-devel/forth/admin/userboot.fs Sat Aug 21 12:21:01 2010 (r854)
@@ -1,10 +1,22 @@
\ 7.4.3.5 User commands for booting
: boot ( "{param-text}<cr>" -- )
- (encode-bootpath) \ Setup bootpath/bootargs
+ linefeed parse
+
+ \ Copy NVRAM parameters from boot-file to bootargs in case any parameters have
+ \ been specified for the platform-specific boot code
+ s" boot-file" $find drop execute
+ encode-string
+ " /chosen" (find-dev) if
+ " bootargs" rot (property)
+ then
+
+ \ Execute platform-specific boot code, e.g. kernel
s" platform-boot" $find if
- execute \ Execute platform-specific boot code
+ execute
then
+
+ (encode-bootpath) \ Setup bootpath/bootargs
$load \ load and go
go
;
Modified: trunk/openbios-devel/forth/debugging/client.fs
==============================================================================
--- trunk/openbios-devel/forth/debugging/client.fs Tue Aug 17 17:42:10 2010 (r853)
+++ trunk/openbios-devel/forth/debugging/client.fs Sat Aug 21 12:21:01 2010 (r854)
@@ -55,16 +55,19 @@
then
;
-: (encode-bootpath) ( "{params}<cr>" -- bootpath-str bootpath-len)
- \ Parse the current input buffer of a load/boot command and set both
+: (encode-bootpath) ( param-str param-len -- bootpath-str bootpath-len)
+ \ Parse the <param> string from a load/boot command and set both
\ the bootargs and bootpath properties as appropriate.
- cr
\ bootpath
- bl parse dup 0= if
+ bl left-split \ argstr argstr-len bootdevstr bootdevstr-len
+ dup 0= if
\ None specified. As per IEEE-1275 specification, search through each value
\ in boot-device and use the first that returns a valid ihandle on open.
+
+ 2drop \ drop the empty device string as we're going to use our own
+
s" boot-device" $find drop execute
bl left-split
begin
@@ -80,8 +83,6 @@
then
repeat
2drop
- else
- 0 0 2swap \ Fake (empty) parse string
then
\ Set the bootpath property
@@ -91,7 +92,7 @@
then
\ bootargs
- linefeed parse dup 0= if
+ 2swap dup 0= if
\ None specified, use default from nvram
2drop s" boot-file" $find drop execute
then
@@ -101,9 +102,6 @@
" /chosen" (find-dev) if
" bootargs" rot (property)
then
-
- \ Remove the remaining string
- 2swap 2drop
;
: $load ( devstr len )
@@ -121,6 +119,7 @@
;
: load ( "{params}<cr>" -- )
+ linefeed parse
(encode-bootpath)
$load
;
[View Less]
I am trying to use the fword and feval functions in the file "kernel/forth.c". I know the header file for these functions are located in "include/libopenbios/bindings.h". I used this code to include the bindings.h file:
#include "libopenbios/bindings.h"
For some reason, I still see these errors:
Building OpenBIOS for x86
Building...error:
HOSTCC host/kernel/bootstrap.o
HOSTCC host/kernel/dict.o
HOSTCC host/kernel/primitives.o
HOSTCC host/kernel/stack.o
HOSTCC forthstrap
host/kernel/…
[View More]primitives.o: In function `setupLocalDictionary':
/home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1035: undefined reference to `_fword'
/home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1037: undefined reference to `_fword'
/home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1044: undefined reference to `feval'
/home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1045: undefined reference to `feval'
host/kernel/primitives.o: In function `loadLocalVariable':
/home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1072: undefined reference to `feval'
collect2: ld returned 1 exit status
make[1]: *** [forthstrap] Error 1
make[1]: Leaving directory `/home/user/Development/openbios-devel/obj-x86'
make: *** [build] Error 1
This is a simple function someone could use as an example to be used in the file forth.c
static void test(void)
{
feval("banner");
}
Anyone know what I am doing wrong or how to solve this problem?
[View Less]
Hi all,
I just compiled OpenBIOS (from trunk) with a ton of CONFIG_DEBUG*
options enabled, but I'm not getting any output from them (at least,
under QEMU). printk() seems to work for this portion:
>> =============================================================
>> OpenBIOS 1.0 [Aug 17 2010 21:39]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> Memory: 1024M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
But …
[View More]nothing after that point gets printed to the serial device.
Any ideas where I should be looking?
- Steven
[View Less]
> Gosh. cabc000 ~ 212M. I'm guessing this is a large boot_archive?
Wow, don't I feel stupid right about now. Default memory for qemu is 128 MB, and when the boot_archive on CD is 170 MB, it's going to be hard to load, eh? :-). Maybe the error message it threw should have been my first hint?!
So, after running qemu with "-m 512" to throw 512MB at it, I come up with the following (this is with fcode-debug? set to true):
0 > boot cdrom
Not a Linux kernel image
Not a bootable ELF image
…
[View More]Not a bootable a.out image
Loading FCode image...
Loaded 7420 bytes
entry point is 0x4000
doheaders isn't unique.
fs-pkg$ isn't unique.
fs-type$ isn't unique.
/buf-len isn't unique.
roundup isn't unique.
cstrlen isn't unique.
cscount isn't unique.
$append isn't unique.
$= isn't unique.
str++ isn't unique.
die isn't unique.
diag-cr? isn't unique.
find-abort isn't unique.
get-package isn't unique.
cif-ph isn't unique.
cif-open isn't unique.
cif-close isn't unique.
cif-read isn't unique.
cif-seek isn't unique.
cif-release isn't unique.
find-cif-method isn't unique.
chosen-ph isn't unique.
get-property isn't unique.
get-string-prop isn't unique.
get-int-prop isn't unique.
mmu-ih isn't unique.
mem-ih isn't unique.
mmu-claim isn't unique.
mmu-map isn't unique.
mem-claim isn't unique.
(mem-alloc) isn't unique.
vmem-alloc isn't unique.
mem-alloc isn't unique.
mem-free isn't unique.
/rd-fcode isn't unique.
rd-offset isn't unique.
open-abort isn't unique.
open-cstr isn't unique.
dev-open isn't unique.
dev-close isn't unique.
read-disk isn't unique.
root-ph isn't unique.
fs-ih isn't unique.
nested? isn't unique.
file-sz isn't unique.
boot-dev isn't unique.
boot-dev$ isn't unique.
loader-base isn't unique.
load-pkg isn't unique.
get-bootdev isn't unique.
mount-root isn't unique.
vmem-alloc-prop isn't unique.
get-file isn't unique.
is-elf? isn't unique.
is-archive? isn't unique.
check-elf isn't unique.
check-fcode isn't unique.
>bootblk isn't unique.
get-type isn't unique.
fflag? isn't unique.
boot-file isn't unique.
boot-file$ isn't unique.
kern? isn't unique.
kern-file isn't unique.
kern-file$ isn't unique.
plat-name isn't unique.
plat-name$ isn't unique.
arch-name isn't unique.
arch-name$ isn't unique.
targ-file isn't unique.
targ-file$ isn't unique.
try-platname isn't unique.
fj-check isn't unique.
get-def-arch isn't unique.
get-arch isn't unique.
open-path isn't unique.
lflag? isn't unique.
zflag? isn't unique.
fs-name isn't unique.
fs-name$ isn't unique.
open-zfs-fs isn't unique.
next-str isn't unique.
next-c isn't unique.
halt? isn't unique.
parse-bootargs isn't unique.
rd-alloc-sz isn't unique.
"ramdisk" isn't unique.
setup-bootprops isn't unique.
setup-ramdisk isn't unique.
fix-elf-mem isn't unique.
load-file isn't unique.
setup-props isn't unique.
exec-file isn't unique.
do-boot isn't unique.
byte-load: warning stack overflow, diff 1
byte-load: warning stack overflow, diff 1
Jumping to entry point 00000000010071d8 for type 0000000000000001...
switching to new context: entry point 0x10071d8 stack 0x00000000ffe02b59
warning:interpret: exception -13 caught
Unhandled Exception 0x0000000020016000
PC = 0x0000000001014710 NPC = 0x0000000001014714
Stopping execution
Can this be debugged using the OpenBIOS/forth debugging, or do I need to whip out gdb, now? Looks like this error is after it actually switches over to the OpenSolaris kernel, so I'm guessing the OpenBIOS/fcode debugging is going to be of limited value.
-Nick
--------
This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR.
[View Less]