All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] qemu static elf boot
@ 2003-07-24 13:08 Nicolas Ollinger
  2003-07-27 21:00 ` Nicolas Ollinger
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Ollinger @ 2003-07-24 13:08 UTC (permalink / raw)
  To: qemu-devel

Hi,

> A static ELF loader would be easy to add, but I don't know what is the
> standard way to pass command line parameters to an OS. I agree that it
> is an important feature. Do you have images of a complete netbsd system
> (kernel with serial console + small disk image) ?

I put a small disk image, kernels, and some files and instructions to use
them under bochs (for comparison purpose) at the following URL:

http://www.ens-lyon.fr/~nollinge/netbsd_bochs/

It works under bochs but it is quite slow (PII/333 here).

Concerning the boot process, I think the following files are worth
reading, even if they are very NetBSD involved:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/boot/boot2.c?rev=1.1&content-type=text/x-cvsweb-markup
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/lib/exec.c?rev=1.18&content-type=text/x-cvsweb-markup
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libsa/loadfile.c?rev=1.7.4.2&content-type=text/x-cvsweb-markup
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/lib/startprog.S?rev=1.3&content-type=text/x-cvsweb-markup

=> [bootit] calls [exec_netbsd] calls [loadfile] calls [startprog].

Some involved headers:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/reboot.h?rev=1.20&content-type=text/x-cvsweb-markup
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/boot_flag.h?rev=1.3&content-type=text/x-cvsweb-markup
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/lib/bootinfo.h?rev=1.5&content-type=text/x-cvsweb-markup

A more general source of information concerning multi-OS booting would be
a complex bootloader like GRUB.

Nicolas.
-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot
  2003-07-24 13:08 [Qemu-devel] qemu static elf boot Nicolas Ollinger
@ 2003-07-27 21:00 ` Nicolas Ollinger
  2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Ollinger @ 2003-07-27 21:00 UTC (permalink / raw)
  To: qemu-devel

Hi,

On Thu, 24 Jul 2003, Nicolas Ollinger wrote:

> I put a small disk image, kernels, and some files and instructions to use
> them under bochs (for comparison purpose) at the following URL:
>
> http://www.ens-lyon.fr/~nollinge/netbsd_bochs/

I just updated the content of the above webpage, it now contains a
bootable NetBSD/i386 filesystem which runs just (slowly) fine under bochs.

The kernel inside the filesystem is now relocated at 0x90000000 in order
to allow qemu boot. So with Fabrice's recent addition of real mode support
in qemu, vl is now able to charge the kernel into memory using the usual
bootloader. Unfortunately, for some reason, the kernel do not boot at all.
No abortion, no fatal error, just... void.

Regards,
Nicolas.
-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot / VGA emulation
  2003-07-27 21:00 ` Nicolas Ollinger
@ 2003-07-27 22:27   ` Fabrice Bellard
  2003-07-28  0:43     ` Stefano Marinelli
                       ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Fabrice Bellard @ 2003-07-27 22:27 UTC (permalink / raw)
  To: qemu-devel

Nicolas Ollinger wrote:
> Hi,
> 
> On Thu, 24 Jul 2003, Nicolas Ollinger wrote:
> 
> 
>>I put a small disk image, kernels, and some files and instructions to use
>>them under bochs (for comparison purpose) at the following URL:
>>
>>http://www.ens-lyon.fr/~nollinge/netbsd_bochs/
> 
> 
> I just updated the content of the above webpage, it now contains a
> bootable NetBSD/i386 filesystem which runs just (slowly) fine under bochs.
> 
> The kernel inside the filesystem is now relocated at 0x90000000 in order
> to allow qemu boot. So with Fabrice's recent addition of real mode support
> in qemu, vl is now able to charge the kernel into memory using the usual
> bootloader. Unfortunately, for some reason, the kernel do not boot at all.
> No abortion, no fatal error, just... void.

Try with my latest fix. I think now the problem is that a proper VGA 
emulation is needed. I plan to add it soon by using an SDL wrapper.

My only problem is to choose the right SVGA board to emulate (plain VGA 
is not suffisant to get proper graphical display). I have the following 
choices:

- Bochs VBE (easy but limited to 8bpp)
- VMware virtual SVGA (easy but potential driver license problem)
- Intel i810 (there are good docs but the acceleration is complicated)
- Another SVGA card ????

I am interested by any opinion on that matter!

Fabrice.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot / VGA emulation
  2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
@ 2003-07-28  0:43     ` Stefano Marinelli
  2003-07-28  2:04     ` Herbert Pötzl
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Stefano Marinelli @ 2003-07-28  0:43 UTC (permalink / raw)
  To: qemu-devel

Alle 00:27, lunedì 28 luglio 2003, Fabrice Bellard ha scritto:
> Try with my latest fix. I think now the problem is that a proper VGA
> emulation is needed. I plan to add it soon by using an SDL wrapper.

Wow...Fabrice, things are going far now...our dream is coming true! :)
Is anyone working on the software MMU?

> VGA is not suffisant to get proper graphical display). I have the
> following choices:
>
> - Bochs VBE (easy but limited to 8bpp)
> - VMware virtual SVGA (easy but potential driver license problem)
> - Intel i810 (there are good docs but the acceleration is
> complicated) - Another SVGA card ????

I don't really know. Bochs VBE could be a good starting point, but 8bpp 
is a bit low in order to use graphical operating systems. VMware is 
commercial, and qemu could become an enemy for them, license problems 
will likely be noticed and stopped. So Intel could be the best 
choice...

Stefano

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot / VGA emulation
  2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
  2003-07-28  0:43     ` Stefano Marinelli
@ 2003-07-28  2:04     ` Herbert Pötzl
  2003-07-28 10:36     ` [Qemu-devel] NetBSD is booting :) (was: qemu static elf boot / VGA emulation) Nicolas Ollinger
  2003-07-28 17:21     ` [Qemu-devel] qemu static elf boot / VGA emulation Johan Rydberg
  3 siblings, 0 replies; 10+ messages in thread
From: Herbert Pötzl @ 2003-07-28  2:04 UTC (permalink / raw)
  To: Fabrice Bellard; +Cc: qemu-devel

On Mon, Jul 28, 2003 at 12:27:50AM +0200, Fabrice Bellard wrote:
> Nicolas Ollinger wrote:
> >Hi,
> >
> >On Thu, 24 Jul 2003, Nicolas Ollinger wrote:
> >
> >
> >>I put a small disk image, kernels, and some files and instructions to use
> >>them under bochs (for comparison purpose) at the following URL:
> >>
> >>http://www.ens-lyon.fr/~nollinge/netbsd_bochs/
> >
> >
> >I just updated the content of the above webpage, it now contains a
> >bootable NetBSD/i386 filesystem which runs just (slowly) fine under bochs.
> >
> >The kernel inside the filesystem is now relocated at 0x90000000 in order
> >to allow qemu boot. So with Fabrice's recent addition of real mode support
> >in qemu, vl is now able to charge the kernel into memory using the usual
> >bootloader. Unfortunately, for some reason, the kernel do not boot at all.
> >No abortion, no fatal error, just... void.
> 
> Try with my latest fix. I think now the problem is that a proper VGA 
> emulation is needed. I plan to add it soon by using an SDL wrapper.
> 
> My only problem is to choose the right SVGA board to emulate (plain VGA 
> is not suffisant to get proper graphical display). I have the following 
> choices:
> 
> - Bochs VBE (easy but limited to 8bpp)
> - VMware virtual SVGA (easy but potential driver license problem)
> - Intel i810 (there are good docs but the acceleration is complicated)
> - Another SVGA card ????

hmm, you want something compatible, then IMHO go for VBE,
but do not limit yourself to the 8bpp modes of bochs,
VBE does define many more ...

on the other hand, it would be beneficial to define
something like VMware SVGA/XGA yourself, drivers can
be easily adapted to such a definition ...

best,
Herbert

> I am interested by any opinion on that matter!
> 
> Fabrice.
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] NetBSD is booting :) (was: qemu static elf boot / VGA emulation)
  2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
  2003-07-28  0:43     ` Stefano Marinelli
  2003-07-28  2:04     ` Herbert Pötzl
@ 2003-07-28 10:36     ` Nicolas Ollinger
  2003-07-28 17:21     ` [Qemu-devel] qemu static elf boot / VGA emulation Johan Rydberg
  3 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ollinger @ 2003-07-28 10:36 UTC (permalink / raw)
  To: qemu-devel

On Mon, 28 Jul 2003, Fabrice Bellard wrote:

> > The kernel inside the filesystem is now relocated at 0x90000000 in order
> > to allow qemu boot. So with Fabrice's recent addition of real mode support
> > in qemu, vl is now able to charge the kernel into memory using the usual
> > bootloader. Unfortunately, for some reason, the kernel do not boot at all.
> > No abortion, no fatal error, just... void.
>
> Try with my latest fix. I think now the problem is that a proper VGA
> emulation is needed. I plan to add it soon by using an SDL wrapper.

I replaced the usual vga console by a dumber one (aka pccons generic PC
console driver), updated qemu to current and retried. Now the kernel boots!

It seems that most of the periphericals are well handeld but the
coprocessor (complains concerning npx0) and that it failed when starting
init.

Due to the VGA BIOS stuff, the display is a little confused but here is
what I get (up to beautifying):

----------------------------------------------------------------------------
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6U (BLOP) #2: Mon Jul 28 11:54:15 CEST 2003
        nollinge@fraternite:/local/nollinge/qemu/obj/sys/arch/i386/compile/BLOP
total memory = 32380 KB
avail memory = 28344 KB
using 430 buffers containing 1720 KB of memory
BIOS32 rev. 0 found at 0xf9250
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium Pro (686-class), 647.22 MHz, id 0x613
cpu0: features a1bd<FPU,DE,PSE,TSC,MSR,MCE,CX8>
cpu0: features a1bd<PGE,CMOV>
isa0 at mainbus0
ne1 at isa0 port 0x300-0x31f irq 10
ne1: NE1000 Ethernet
ne1: Ethernet address 52:52:54:54:00:00
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 channel 0 drive 0: <QEMU HARDDISK>
wd0: drive supports 8-sector PIO transfers, LBA addressing
wd0: 66528 KB, 132 cyl, 16 head, 63 sec, 512 bytes/sect x 133056 sectors
npx0 at isa0 port 0xf0-0xff: error reporting broken; not using
pc0 at isa0 port 0x60-0x6f irq 1: color
pc0: console
boot device: <unknown>
root on wd0d dumps on wd0b
init: copying out path `/sbin/init' 11
----------------------------------------------------------------------------

Stuff availables at the same URL still:

http://www.ens-lyon.fr/~nollinge/netbsd_bochs/

Cheers,
Nicolas.
-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot / VGA emulation
  2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
                       ` (2 preceding siblings ...)
  2003-07-28 10:36     ` [Qemu-devel] NetBSD is booting :) (was: qemu static elf boot / VGA emulation) Nicolas Ollinger
@ 2003-07-28 17:21     ` Johan Rydberg
  2003-07-29 20:56       ` Fabrice Bellard
  3 siblings, 1 reply; 10+ messages in thread
From: Johan Rydberg @ 2003-07-28 17:21 UTC (permalink / raw)
  To: qemu-devel

Fabrice Bellard <fabrice.bellard@free.fr> wrote:

: My only problem is to choose the right SVGA board to emulate (plain VGA 
: is not suffisant to get proper graphical display). I have the following 
: choices:
: 
: - Bochs VBE (easy but limited to 8bpp)
: - VMware virtual SVGA (easy but potential driver license problem)
: - Intel i810 (there are good docs but the acceleration is complicated)
: - Another SVGA card ????

How about any some other card type? Such as a Mach* or S3 cards? Those
are pretty common and supported by must operating system, and S3 should
probably not be that hard to simulate.  But i810 is maybe easier.

-- 
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

Playing Justin Timberlake - Take It From Here

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot / VGA emulation
  2003-07-28 17:21     ` [Qemu-devel] qemu static elf boot / VGA emulation Johan Rydberg
@ 2003-07-29 20:56       ` Fabrice Bellard
  0 siblings, 0 replies; 10+ messages in thread
From: Fabrice Bellard @ 2003-07-29 20:56 UTC (permalink / raw)
  To: qemu-devel

Johan Rydberg wrote:
> Fabrice Bellard <fabrice.bellard@free.fr> wrote:
> 
> : My only problem is to choose the right SVGA board to emulate (plain VGA 
> : is not suffisant to get proper graphical display). I have the following 
> : choices:
> : 
> : - Bochs VBE (easy but limited to 8bpp)
> : - VMware virtual SVGA (easy but potential driver license problem)
> : - Intel i810 (there are good docs but the acceleration is complicated)
> : - Another SVGA card ????
> 
> How about any some other card type? Such as a Mach* or S3 cards? Those
> are pretty common and supported by must operating system, and S3 should
> probably not be that hard to simulate.  But i810 is maybe easier.

You are right. I will implement S3Trio23/64 support. Only ioport based 
acceleration will be supported in the first release.

Fabrice.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu static elf boot
  2003-07-23 20:08 [Qemu-devel] qemu static elf boot Nicolas Ollinger
@ 2003-07-24  8:10 ` Fabrice Bellard
  0 siblings, 0 replies; 10+ messages in thread
From: Fabrice Bellard @ 2003-07-24  8:10 UTC (permalink / raw)
  To: qemu-devel

Hi,

A static ELF loader would be easy to add, but I don't know what is the 
standard way to pass command line parameters to an OS. I agree that it 
is an important feature. Do you have images of a complete netbsd system 
(kernel with serial console + small disk image) ?

Fabrice.

Nicolas Ollinger wrote:
> Hi,
> 
> I just tried qemu and I am really impressed by its speed!
> 
> By reading vl.c, more precisely the part that loads the bzImage, I
> realized how messy the linux boot process is (please don't flame :-)).
> 
> Would it be possible to have a program in the spirit of vl which will
> just run a standard static ELF binary, passing the command line parameters
> to it. This would allow booting some other OS's kernel with more direct
> boot process, like for example NetBSD.
> 
> A sample (gzipped) ELF kernel is available at the URL
> 
> ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6/i386/binary/kernel/netbsd-GENERIC.gz
> 
> Regards,
> Nicolas.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] qemu static elf boot
@ 2003-07-23 20:08 Nicolas Ollinger
  2003-07-24  8:10 ` Fabrice Bellard
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Ollinger @ 2003-07-23 20:08 UTC (permalink / raw)
  To: qemu-devel

Hi,

I just tried qemu and I am really impressed by its speed!

By reading vl.c, more precisely the part that loads the bzImage, I
realized how messy the linux boot process is (please don't flame :-)).

Would it be possible to have a program in the spirit of vl which will
just run a standard static ELF binary, passing the command line parameters
to it. This would allow booting some other OS's kernel with more direct
boot process, like for example NetBSD.

A sample (gzipped) ELF kernel is available at the URL

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6/i386/binary/kernel/netbsd-GENERIC.gz

Regards,
Nicolas.
-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-29 20:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 13:08 [Qemu-devel] qemu static elf boot Nicolas Ollinger
2003-07-27 21:00 ` Nicolas Ollinger
2003-07-27 22:27   ` [Qemu-devel] qemu static elf boot / VGA emulation Fabrice Bellard
2003-07-28  0:43     ` Stefano Marinelli
2003-07-28  2:04     ` Herbert Pötzl
2003-07-28 10:36     ` [Qemu-devel] NetBSD is booting :) (was: qemu static elf boot / VGA emulation) Nicolas Ollinger
2003-07-28 17:21     ` [Qemu-devel] qemu static elf boot / VGA emulation Johan Rydberg
2003-07-29 20:56       ` Fabrice Bellard
  -- strict thread matches above, loose matches on Subject: below --
2003-07-23 20:08 [Qemu-devel] qemu static elf boot Nicolas Ollinger
2003-07-24  8:10 ` Fabrice Bellard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.