Jorge Acereda | 23 Oct 12:18 2004
Picon

Booting without ofwboot

Hi,

I want to try NetBSD/ofppc on a Pegasos board. I tried to boot it
directly, but it hangs without showing any message. ofwboot seems to
work, but I can't see any way to use it to boot the kernel (no UFS
partitions or floppy disk on this machine). My questions:

- Why is ofwboot needed at all?
- Has anyone patches to boot directly from OF?

TIA,
  Jorge Acereda

Chuck Silvers | 23 Oct 17:12 2004

Re: Booting without ofwboot

On Sat, Oct 23, 2004 at 12:18:33PM +0200, Jorge Acereda wrote:
> Hi,
> 
> I want to try NetBSD/ofppc on a Pegasos board. I tried to boot it
> directly, but it hangs without showing any message. ofwboot seems to
> work, but I can't see any way to use it to boot the kernel (no UFS
> partitions or floppy disk on this machine). My questions:
> 
> - Why is ofwboot needed at all?

the ofppc port was originally written for FirePower boxes, and the
OF implementation there only understands fdisk labels and FAT file systems.
ofwboot understands BSD disklabels and FFS file systems, which makes it
easier to update kernels.  normally you never need to mount the FAT fs
where ofwboot lives.  ofwboot wasn't really required even for these boxes,
it was just an added convenience.

> - Has anyone patches to boot directly from OF?

the problem you saw with booting isn't because you didn't use ofwboot,
it's because the ofppc port is busted in general.  at least, that was
true the last time I tried to boot -current on my FirePower box
(maybe 6 months ago).

-Chuck

Jorge Acereda | 23 Oct 18:18 2004
Picon

Re: Booting without ofwboot

On Sat, 23 Oct 2004 08:12:02 -0700, Chuck Silvers <chuq <at> chuq.com> wrote:
> On Sat, Oct 23, 2004 at 12:18:33PM +0200, Jorge Acereda wrote:
> 
> > - Has anyone patches to boot directly from OF?
> 
> the problem you saw with booting isn't because you didn't use ofwboot,
> it's because the ofppc port is busted in general.  at least, that was
> true the last time I tried to boot -current on my FirePower box
> (maybe 6 months ago).

I have tested a 2.0RC4 kernel under gdb's simulator and it reaches the
point where it asks for a boot partition. That same kernel booted from
SmartFirmware doesn't produce any output. What is surprising is that
ofwboot seems to work correctly. Did you get any output in the
FirePower?

Jochen Kunz | 23 Oct 17:02 2004
Picon

Re: Booting without ofwboot

On Sat, 23 Oct 2004 12:18:33 +0200
Jorge Acereda <jacereda <at> gmail.com> wrote:

> I want to try NetBSD/ofppc on a Pegasos board. I tried to boot it
> directly, but it hangs without showing any message. ofwboot seems to
> work, but I can't see any way to use it to boot the kernel (no UFS
> partitions or floppy disk on this machine). My questions:
> 
> - Why is ofwboot needed at all?
> - Has anyone patches to boot directly from OF?
In theory you can boot an ELF kernel image directly via the
OpenFirmWare. As I hered nothing good about the Pegasos and its 
OFW incarnation in particular you may be without luck. (Have a look 
at the trouble the OpenBSD people had with the Pegasos. Hardware, 
Soft/Firmware and the company.)
--

-- 

tschüß,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/

Chuck Silvers | 23 Oct 20:34 2004

Re: Booting without ofwboot

On Sat, Oct 23, 2004 at 06:18:56PM +0200, Jorge Acereda wrote:
> On Sat, 23 Oct 2004 08:12:02 -0700, Chuck Silvers <chuq <at> chuq.com> wrote:
> > On Sat, Oct 23, 2004 at 12:18:33PM +0200, Jorge Acereda wrote:
> > 
> > > - Has anyone patches to boot directly from OF?
> > 
> > the problem you saw with booting isn't because you didn't use ofwboot,
> > it's because the ofppc port is busted in general.  at least, that was
> > true the last time I tried to boot -current on my FirePower box
> > (maybe 6 months ago).
> 
> I have tested a 2.0RC4 kernel under gdb's simulator and it reaches the
> point where it asks for a boot partition. That same kernel booted from
> SmartFirmware doesn't produce any output. What is surprising is that
> ofwboot seems to work correctly. Did you get any output in the
> FirePower?

as I recall, the FirePower box loaded ofwboot and the kernel, but then
the kernel didn't print anything... similar to what you saw on your box.

-Chuck

Jorge Acereda | 24 Oct 22:02 2004
Picon

Re: Booting without ofwboot

On Sat, 23 Oct 2004 11:34:22 -0700, Chuck Silvers <chuq <at> chuq.com> wrote:
> On Sat, Oct 23, 2004 at 06:18:56PM +0200, Jorge Acereda wrote:

> as I recall, the FirePower box loaded ofwboot and the kernel, but then
> the kernel didn't print anything... similar to what you saw on your box.

Hi,

I spent some time trying to figure out what the problem was, I can now
reach the point where the kernel asks for a boot partition. It seems
there's an issue with openfirmware(). My PPC skills are weak, so I
would appreciate any help in tracking the problem.

Here is the dirty patch, it is just what openfirmware() looked like
for ofppc in 1.6 days:

diff -u -r1.2 ofw_subr.S
--- sys/arch/powerpc/oea/ofw_subr.S	13 Feb 2003 15:02:49 -0000	1.2
+++ sys/arch/powerpc/oea/ofw_subr.S	24 Oct 2004 19:42:38 -0000
 <at>  <at>  -92,6 +92,33  <at>  <at> 
  */
 	.text
 ENTRY(openfirmware)
+#if 1 /* XXX */
+	mflr	0			/* save return address */
+	stw	0,4(1)
+	stwu	1,-16(1)		/* setup stack frame */
+
+	mfmsr	4			/* save msr */
+	stw	4,8(1)
(Continue reading)

Jorge Acereda | 25 Oct 17:23 2004
Picon

Re: Booting without ofwboot

On Sun, 24 Oct 2004 22:02:30 +0200, Jorge Acereda <jacereda <at> gmail.com> wrote:
> On Sat, 23 Oct 2004 11:34:22 -0700, Chuck Silvers <chuq <at> chuq.com> wrote:
> > On Sat, Oct 23, 2004 at 06:18:56PM +0200, Jorge Acereda wrote:
> 
> > as I recall, the FirePower box loaded ofwboot and the kernel, but then
> > the kernel didn't print anything... similar to what you saw on your box.
> 
> Hi,
> 
> I spent some time trying to figure out what the problem was, I can now
> reach the point where the kernel asks for a boot partition. It seems
> there's an issue with openfirmware(). My PPC skills are weak, so I
> would appreciate any help in tracking the problem.

More information, it seems that SmartFirmware (the OFW implementation
in the Pegasos II) runs in real-mode. At least the OFW "real-mode?"
value is -1.

Jorge Acereda | 25 Oct 17:56 2004
Picon

Re: Booting without ofwboot

Hi,

Well, when I look at the Pegasos board I don't see the troubles they
caused to other people, I only see a funny machine.

Anyway, if I had to worry about moral issues, I shouldn't be typing
this letter using a PC with a stupid processor manufactured by a
monopolistic company. The problems caused by that company are for me
orders of magnitude worse than those caused by the Pegasos people.

The Pegasos people may have problems paying, yes it is ugly (and I bet
it is just that they don't have any money, in which case their problem
is one of poor management). The other company has just fucked the
whole industry.

I don't have any involvement or sympathy for the people behind the
Pegasos, nor do I encourage anyone to buy the board. It is just that I
happen to have one of those boards and I'd like to see NetBSD running
on it.

Greetings,
  Jorge Acereda

On Sat, 23 Oct 2004 17:02:42 +0200, Jochen Kunz
<jkunz <at> unixag-kl.fh-kl.de> wrote:
> On Sat, 23 Oct 2004 12:18:33 +0200
> 
> 
> Jorge Acereda <jacereda <at> gmail.com> wrote:
> 
(Continue reading)


Gmane